From 6cc58e5f9b88ed071be75f5e6eccaaa8063056f1 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 30 Apr 2002 14:01:07 -0400 Subject: [PATCH] ENH: add test for SEPARATE_ARGUMENTS --- Tests/Complex/CMakeLists.txt | 4 ++++ Tests/Complex/Executable/complex.cxx | 12 +++++++++++- Tests/Complex/cmTestConfigure.h.in | 2 ++ Tests/ComplexOneConfig/CMakeLists.txt | 4 ++++ Tests/ComplexOneConfig/Executable/complex.cxx | 12 +++++++++++- Tests/ComplexOneConfig/cmTestConfigure.h.in | 2 ++ Tests/ComplexRelativePaths/CMakeLists.txt | 4 ++++ Tests/ComplexRelativePaths/Executable/complex.cxx | 12 +++++++++++- Tests/ComplexRelativePaths/cmTestConfigure.h.in | 2 ++ 9 files changed, 51 insertions(+), 3 deletions(-) diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 609a43e6c..5cead768a 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -14,6 +14,10 @@ ENDIF (CMAKE_ANSI_CXXFLAGS) ADD_DEFINITIONS(-DCMAKE_IS_FUN) +SET(TEST_SEP "a b c") +SEPARATE_ARGUMENTS(TEST_SEP) + + # # Include vars from a file and from a cache # diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 89c3436b6..fb268c4d9 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -667,7 +667,17 @@ int main() { cmFailed("REMOVE is not working"); } - + + // ---------------------------------------------------------------------- + // Test SEPARATE_ARGUMENTS + if(strcmp("a;b;c", TEST_SEP) == 0) + { + cmPassed("SEPARATE_ARGUMENTS is working"); + } + else + { + cmFailed("SEPARATE_ARGUMENTS is not working"); + } // ---------------------------------------------------------------------- // Summary diff --git a/Tests/Complex/cmTestConfigure.h.in b/Tests/Complex/cmTestConfigure.h.in index ed111fb43..873123a12 100644 --- a/Tests/Complex/cmTestConfigure.h.in +++ b/Tests/Complex/cmTestConfigure.h.in @@ -49,6 +49,8 @@ #cmakedefine FILE_HAS_WRAP_EXCLUDE #define FILE_COMPILE_FLAGS "${FILE_COMPILE_FLAGS}" +#define TEST_SEP "${TEST_SEP}" + // Test registry read #if defined(_WIN32) && !defined(__CYGWIN__) diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 609a43e6c..5cead768a 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -14,6 +14,10 @@ ENDIF (CMAKE_ANSI_CXXFLAGS) ADD_DEFINITIONS(-DCMAKE_IS_FUN) +SET(TEST_SEP "a b c") +SEPARATE_ARGUMENTS(TEST_SEP) + + # # Include vars from a file and from a cache # diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 89c3436b6..fb268c4d9 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -667,7 +667,17 @@ int main() { cmFailed("REMOVE is not working"); } - + + // ---------------------------------------------------------------------- + // Test SEPARATE_ARGUMENTS + if(strcmp("a;b;c", TEST_SEP) == 0) + { + cmPassed("SEPARATE_ARGUMENTS is working"); + } + else + { + cmFailed("SEPARATE_ARGUMENTS is not working"); + } // ---------------------------------------------------------------------- // Summary diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in index ed111fb43..873123a12 100644 --- a/Tests/ComplexOneConfig/cmTestConfigure.h.in +++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in @@ -49,6 +49,8 @@ #cmakedefine FILE_HAS_WRAP_EXCLUDE #define FILE_COMPILE_FLAGS "${FILE_COMPILE_FLAGS}" +#define TEST_SEP "${TEST_SEP}" + // Test registry read #if defined(_WIN32) && !defined(__CYGWIN__) diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index 609a43e6c..5cead768a 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -14,6 +14,10 @@ ENDIF (CMAKE_ANSI_CXXFLAGS) ADD_DEFINITIONS(-DCMAKE_IS_FUN) +SET(TEST_SEP "a b c") +SEPARATE_ARGUMENTS(TEST_SEP) + + # # Include vars from a file and from a cache # diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index 89c3436b6..fb268c4d9 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -667,7 +667,17 @@ int main() { cmFailed("REMOVE is not working"); } - + + // ---------------------------------------------------------------------- + // Test SEPARATE_ARGUMENTS + if(strcmp("a;b;c", TEST_SEP) == 0) + { + cmPassed("SEPARATE_ARGUMENTS is working"); + } + else + { + cmFailed("SEPARATE_ARGUMENTS is not working"); + } // ---------------------------------------------------------------------- // Summary diff --git a/Tests/ComplexRelativePaths/cmTestConfigure.h.in b/Tests/ComplexRelativePaths/cmTestConfigure.h.in index ed111fb43..873123a12 100644 --- a/Tests/ComplexRelativePaths/cmTestConfigure.h.in +++ b/Tests/ComplexRelativePaths/cmTestConfigure.h.in @@ -49,6 +49,8 @@ #cmakedefine FILE_HAS_WRAP_EXCLUDE #define FILE_COMPILE_FLAGS "${FILE_COMPILE_FLAGS}" +#define TEST_SEP "${TEST_SEP}" + // Test registry read #if defined(_WIN32) && !defined(__CYGWIN__)