diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-15 17:59:29 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-04-15 17:59:29 (GMT) |
commit | 23a154941bd44ed1fec701e7c8367e32ab19f759 (patch) | |
tree | 0a1f58719ce9757824392ccb447ec3af180e2666 /Tests | |
parent | 504d0bc3b38574d8394995b589214ce9cb0f6d3a (diff) | |
download | CMake-23a154941bd44ed1fec701e7c8367e32ab19f759.zip CMake-23a154941bd44ed1fec701e7c8367e32ab19f759.tar.gz CMake-23a154941bd44ed1fec701e7c8367e32ab19f759.tar.bz2 |
ENH: Add test for REMOVE_DEFINITION
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Complex/CMakeLists.txt | 23 | ||||
-rw-r--r-- | Tests/Complex/Executable/complex.cxx | 3 | ||||
-rw-r--r-- | Tests/Complex/Library/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Complex/Library/file2.cxx | 4 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/CMakeLists.txt | 23 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 3 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/ComplexOneConfig/Library/file2.cxx | 4 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/CMakeLists.txt | 23 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Executable/complex.cxx | 3 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Library/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Library/file2.cxx | 4 |
12 files changed, 63 insertions, 33 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 2aaa407..c93713e 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -31,6 +31,7 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") ADD_DEFINITIONS(-DCMAKE_IS_FUN) +ADD_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) SET(TEST_SEP "a b c") SEPARATE_ARGUMENTS(TEST_SEP) @@ -147,20 +148,20 @@ FIND_LIBRARY(FIND_DUMMY_LIB # Test SET_SOURCE_FILES_PROPERTIES # SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 - GENERATED - ABSTRACT - WRAP_EXCLUDE - COMPILE_FLAGS "-foo -bar") + GENERATED + ABSTRACT + WRAP_EXCLUDE + COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT) GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file2 WRAP_EXCLUDE) GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file2 COMPILE_FLAGS) SET_SOURCE_FILES_PROPERTIES(nonexisting_file3 PROPERTIES - GENERATED 1 - ABSTRACT 1 - WRAP_EXCLUDE 1 - COMPILE_FLAGS "-foo -bar") + GENERATED 1 + ABSTRACT 1 + WRAP_EXCLUDE 1 + COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file3 ABSTRACT) GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file3 WRAP_EXCLUDE) GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file3 COMPILE_FLAGS) @@ -181,8 +182,8 @@ IF (WIN32) COPYONLY IMMEDIATE) EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"") FIND_PATH(REGISTRY_TEST_PATH - ${file} - "[${hkey}]" DOC "Registry_Test_Path") + ${file} + "[${hkey}]" DOC "Registry_Test_Path") EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"") EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E remove \"${dir}/${file}\"") ENDIF (NOT UNIX) @@ -238,7 +239,7 @@ IF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$") ENDIF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$") IF(NOT STRING_REGEX_PASSED) MESSAGE(SEND_ERROR - "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") + "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") ENDIF(NOT STRING_REGEX_PASSED) # diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 067bf66..7ad9997 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -15,6 +15,9 @@ extern "C" { int cm_passed = 0; int cm_failed = 0; +#ifndef CMAKE_IS_REALLY_FUN +This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work +#endif // Here is a stupid function that tries to use std::string methods // so that the dec cxx compiler will instantiate the stuff that // we are using from the CMakeLib library.... diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index 488f4e7..7c58fad 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -1,3 +1,5 @@ +REMOVE_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) + # # Small utility used to create file # UTILITY_SOURCE is used for coverage and for getting the exact name diff --git a/Tests/Complex/Library/file2.cxx b/Tests/Complex/Library/file2.cxx index b52e547..863fcaa 100644 --- a/Tests/Complex/Library/file2.cxx +++ b/Tests/Complex/Library/file2.cxx @@ -1,5 +1,9 @@ #include <string.h> +#ifdef CMAKE_IS_REALLY_FUN +This is a problem. Looks like REMOVE_DEFINITION does not work +#endif + int file2() { return 1; diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 2aaa407..c93713e 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -31,6 +31,7 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") ADD_DEFINITIONS(-DCMAKE_IS_FUN) +ADD_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) SET(TEST_SEP "a b c") SEPARATE_ARGUMENTS(TEST_SEP) @@ -147,20 +148,20 @@ FIND_LIBRARY(FIND_DUMMY_LIB # Test SET_SOURCE_FILES_PROPERTIES # SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 - GENERATED - ABSTRACT - WRAP_EXCLUDE - COMPILE_FLAGS "-foo -bar") + GENERATED + ABSTRACT + WRAP_EXCLUDE + COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT) GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file2 WRAP_EXCLUDE) GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file2 COMPILE_FLAGS) SET_SOURCE_FILES_PROPERTIES(nonexisting_file3 PROPERTIES - GENERATED 1 - ABSTRACT 1 - WRAP_EXCLUDE 1 - COMPILE_FLAGS "-foo -bar") + GENERATED 1 + ABSTRACT 1 + WRAP_EXCLUDE 1 + COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file3 ABSTRACT) GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file3 WRAP_EXCLUDE) GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file3 COMPILE_FLAGS) @@ -181,8 +182,8 @@ IF (WIN32) COPYONLY IMMEDIATE) EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"") FIND_PATH(REGISTRY_TEST_PATH - ${file} - "[${hkey}]" DOC "Registry_Test_Path") + ${file} + "[${hkey}]" DOC "Registry_Test_Path") EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"") EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E remove \"${dir}/${file}\"") ENDIF (NOT UNIX) @@ -238,7 +239,7 @@ IF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$") ENDIF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$") IF(NOT STRING_REGEX_PASSED) MESSAGE(SEND_ERROR - "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") + "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") ENDIF(NOT STRING_REGEX_PASSED) # diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 067bf66..7ad9997 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -15,6 +15,9 @@ extern "C" { int cm_passed = 0; int cm_failed = 0; +#ifndef CMAKE_IS_REALLY_FUN +This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work +#endif // Here is a stupid function that tries to use std::string methods // so that the dec cxx compiler will instantiate the stuff that // we are using from the CMakeLib library.... diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt index 488f4e7..7c58fad 100644 --- a/Tests/ComplexOneConfig/Library/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt @@ -1,3 +1,5 @@ +REMOVE_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) + # # Small utility used to create file # UTILITY_SOURCE is used for coverage and for getting the exact name diff --git a/Tests/ComplexOneConfig/Library/file2.cxx b/Tests/ComplexOneConfig/Library/file2.cxx index b52e547..863fcaa 100644 --- a/Tests/ComplexOneConfig/Library/file2.cxx +++ b/Tests/ComplexOneConfig/Library/file2.cxx @@ -1,5 +1,9 @@ #include <string.h> +#ifdef CMAKE_IS_REALLY_FUN +This is a problem. Looks like REMOVE_DEFINITION does not work +#endif + int file2() { return 1; diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index 2aaa407..c93713e 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -31,6 +31,7 @@ ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") ADD_DEFINITIONS(-DCMAKE_IS_FUN) +ADD_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) SET(TEST_SEP "a b c") SEPARATE_ARGUMENTS(TEST_SEP) @@ -147,20 +148,20 @@ FIND_LIBRARY(FIND_DUMMY_LIB # Test SET_SOURCE_FILES_PROPERTIES # SET_SOURCE_FILES_PROPERTIES(nonexisting_file2 - GENERATED - ABSTRACT - WRAP_EXCLUDE - COMPILE_FLAGS "-foo -bar") + GENERATED + ABSTRACT + WRAP_EXCLUDE + COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT) GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file2 WRAP_EXCLUDE) GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file2 COMPILE_FLAGS) SET_SOURCE_FILES_PROPERTIES(nonexisting_file3 PROPERTIES - GENERATED 1 - ABSTRACT 1 - WRAP_EXCLUDE 1 - COMPILE_FLAGS "-foo -bar") + GENERATED 1 + ABSTRACT 1 + WRAP_EXCLUDE 1 + COMPILE_FLAGS "-foo -bar") GET_SOURCE_FILE_PROPERTY(FILE_HAS_ABSTRACT nonexisting_file3 ABSTRACT) GET_SOURCE_FILE_PROPERTY(FILE_HAS_WRAP_EXCLUDE nonexisting_file3 WRAP_EXCLUDE) GET_SOURCE_FILE_PROPERTY(FILE_COMPILE_FLAGS nonexisting_file3 COMPILE_FLAGS) @@ -181,8 +182,8 @@ IF (WIN32) COPYONLY IMMEDIATE) EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"") FIND_PATH(REGISTRY_TEST_PATH - ${file} - "[${hkey}]" DOC "Registry_Test_Path") + ${file} + "[${hkey}]" DOC "Registry_Test_Path") EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"") EXEC_PROGRAM(${CMAKE_COMMAND} ARGS "-E remove \"${dir}/${file}\"") ENDIF (NOT UNIX) @@ -238,7 +239,7 @@ IF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$") ENDIF("x${RESULT}" MATCHES "^xa\\[b\\]c\\[d\\]e$") IF(NOT STRING_REGEX_PASSED) MESSAGE(SEND_ERROR - "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") + "STRING(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") ENDIF(NOT STRING_REGEX_PASSED) # diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index 067bf66..7ad9997 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -15,6 +15,9 @@ extern "C" { int cm_passed = 0; int cm_failed = 0; +#ifndef CMAKE_IS_REALLY_FUN +This is a problem. Looks like ADD_DEFINITIONS and REMOVE_DEFINITIONS does not work +#endif // Here is a stupid function that tries to use std::string methods // so that the dec cxx compiler will instantiate the stuff that // we are using from the CMakeLib library.... diff --git a/Tests/ComplexRelativePaths/Library/CMakeLists.txt b/Tests/ComplexRelativePaths/Library/CMakeLists.txt index 488f4e7..7c58fad 100644 --- a/Tests/ComplexRelativePaths/Library/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Library/CMakeLists.txt @@ -1,3 +1,5 @@ +REMOVE_DEFINITIONS(-DCMAKE_IS_REALLY_FUN) + # # Small utility used to create file # UTILITY_SOURCE is used for coverage and for getting the exact name diff --git a/Tests/ComplexRelativePaths/Library/file2.cxx b/Tests/ComplexRelativePaths/Library/file2.cxx index b52e547..863fcaa 100644 --- a/Tests/ComplexRelativePaths/Library/file2.cxx +++ b/Tests/ComplexRelativePaths/Library/file2.cxx @@ -1,5 +1,9 @@ #include <string.h> +#ifdef CMAKE_IS_REALLY_FUN +This is a problem. Looks like REMOVE_DEFINITION does not work +#endif + int file2() { return 1; |