mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 06:40:48 -06:00
There is no need to do so. Be consistent with include directories and ensure uniqueness. This requires changing the API of the cmLocalGenerator::AppendDefines method, and changing the generators to match. The test unfortunately can't test for uniqueness, but it at least verifies that nothing gets lost.
29 lines
570 B
C++
29 lines
570 B
C++
|
|
#ifndef CMAKE_IS_FUN
|
|
#error Expect CMAKE_IS_FUN definition
|
|
#endif
|
|
|
|
#if CMAKE_IS != Fun
|
|
#error Expect CMAKE_IS=Fun definition
|
|
#endif
|
|
|
|
|
|
template<bool test>
|
|
struct CMakeStaticAssert;
|
|
|
|
template<>
|
|
struct CMakeStaticAssert<true> {};
|
|
|
|
static const char fun_string[] = CMAKE_IS_;
|
|
static const char very_fun_string[] = CMAKE_IS_REALLY;
|
|
|
|
enum {
|
|
StringLiteralTest1 = sizeof(CMakeStaticAssert<sizeof(CMAKE_IS_) == sizeof("Fun")>),
|
|
StringLiteralTest2 = sizeof(CMakeStaticAssert<sizeof(CMAKE_IS_REALLY) == sizeof("Very Fun")>)
|
|
};
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
return 0;
|
|
}
|