diff options
Diffstat (limited to 'Tests/ComplexRelativePaths')
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/complex.cxx | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 6a217f0..dae5775 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt @@ -55,6 +55,14 @@ IF ("${LF_VALUE}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt;${CMAKE_C ADD_DEFINITIONS(-DCMAKE_FOUND_LISTFILE_STACK) ENDIF ("${LF_VALUE}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt;${CMAKE_CURRENT_SOURCE_DIR}/Included.cmake") +# Test add/remove definitions. +ADD_DEFINITIONS( + -DCOMPLEX_DEFINED_PRE + -DCOMPLEX_DEFINED + -DCOMPLEX_DEFINED_POST + -DCOMPLEX_DEFINED + ) +REMOVE_DEFINITIONS(-DCOMPLEX_DEFINED) # Test pre-build/pre-link/post-build rules for an executable. ADD_CUSTOM_COMMAND(TARGET complex PRE_BUILD diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index a80487b..816414c 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -42,6 +42,18 @@ void cmPassed(const char* Message, const char* m2="") cm_passed++; } +#ifndef COMPLEX_DEFINED_PRE +# error "COMPLEX_DEFINED_PRE not defined!" +#endif + +#ifdef COMPLEX_DEFINED +# error "COMPLEX_DEFINED is defined but it should not!" +#endif + +#ifndef COMPLEX_DEFINED_POST +# error "COMPLEX_DEFINED_POST not defined!" +#endif + #ifndef CMAKE_IS_REALLY_FUN This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work #endif |