summaryrefslogtreecommitdiffstats
path: root/Tests/ComplexOneConfig
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-04-22 15:51:26 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-04-22 15:51:26 (GMT)
commit7aa35093b8f96ef75bbf9160a55739be4861b9ea (patch)
tree224dacac83a61d4d08ec7a78301f636d38440655 /Tests/ComplexOneConfig
parent9c69be42deb1aba6c37eaad2d5b2c07bae58a13a (diff)
downloadCMake-7aa35093b8f96ef75bbf9160a55739be4861b9ea.zip
CMake-7aa35093b8f96ef75bbf9160a55739be4861b9ea.tar.gz
CMake-7aa35093b8f96ef75bbf9160a55739be4861b9ea.tar.bz2
fixed for remove COMMAND
Diffstat (limited to 'Tests/ComplexOneConfig')
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt8
-rw-r--r--Tests/ComplexOneConfig/Executable/CMakeLists.txt11
-rw-r--r--Tests/ComplexOneConfig/Executable/cmVersion.h.in1
-rw-r--r--Tests/ComplexOneConfig/Executable/complex.cxx13
-rw-r--r--Tests/ComplexOneConfig/cmTestConfigure.h.in4
5 files changed, 32 insertions, 5 deletions
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index d80d654..609a43e 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -3,7 +3,6 @@
#
PROJECT (Complex)
-CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
#
@@ -139,6 +138,13 @@ IF (WIN32)
ENDIF (WIN32)
#
+# Test a set and a remove
+#
+SET(REMOVE_STRING a b c d e f)
+SET(removeVar1 c e)
+REMOVE(REMOVE_STRING ${removeVar1} f)
+
+#
# Configure file
# (plug vars to #define so that they can be tested)
#
diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
index 1533f3e..165e7cd 100644
--- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt
@@ -1,9 +1,10 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
#
# Create exe.
#
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
-SET_SOURCE_FILES_PROPERTIES(complex
- COMPILE_FLAGS "-DFILE_HAS_EXTRA_COMPILE_FLAGS")
+SET_SOURCE_FILES_PROPERTIES(complex COMPILE_FLAGS
+ "-DFILE_HAS_EXTRA_COMPILE_FLAGS")
ADD_EXECUTABLE(complex complex)
SET(COMPLEX_LIBS CMakeTestLibrary;CMakeTestLibraryShared;CMakeTestCLibraryShared)
@@ -19,7 +20,7 @@ LINK_DIRECTORIES(${Complex_BINARY_DIR}/../../Source)
TARGET_LINK_LIBRARIES(complex
CMakeLib
debug CMakeLib
- optimized CMakeLib)
+ optimized CgMakeLib)
#
# Output the files required by 'complex' to a file.
@@ -36,4 +37,8 @@ SUBDIRS(Temp)
INSTALL_TARGETS(/tmp complex)
INSTALL_PROGRAMS(/tmp complex)
+CONFIGURE_FILE(
+ ${Complex_SOURCE_DIR}/Executable/cmVersion.h.in
+ ${Complex_BINARY_DIR}/cmVersion.h)
+
SOURCE_GROUP(A_GROUP ".cxx")
diff --git a/Tests/ComplexOneConfig/Executable/cmVersion.h.in b/Tests/ComplexOneConfig/Executable/cmVersion.h.in
new file mode 100644
index 0000000..de7522d
--- /dev/null
+++ b/Tests/ComplexOneConfig/Executable/cmVersion.h.in
@@ -0,0 +1 @@
+#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 7d86179..89c3436 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -1,4 +1,5 @@
#include "cmTestConfigure.h"
+#include "cmVersion.h"
#include "ExtraSources/file1.h"
#include "file2.h"
#include "sharedFile.h"
@@ -655,6 +656,18 @@ int main()
{
cmFailed("CMAKE_MINIMUM_REQUIRED_VERSION is not set to the expected 1.3");
}
+
+ // ----------------------------------------------------------------------
+ // Test REMOVE command
+ if (strcmp("a;b;d",REMOVE_STRING))
+ {
+ cmPassed("REMOVE is working");
+ }
+ else
+ {
+ cmFailed("REMOVE is not working");
+ }
+
// ----------------------------------------------------------------------
// Summary
diff --git a/Tests/ComplexOneConfig/cmTestConfigure.h.in b/Tests/ComplexOneConfig/cmTestConfigure.h.in
index 58a3f60..ed111fb 100644
--- a/Tests/ComplexOneConfig/cmTestConfigure.h.in
+++ b/Tests/ComplexOneConfig/cmTestConfigure.h.in
@@ -54,4 +54,6 @@
#if defined(_WIN32) && !defined(__CYGWIN__)
#define REGISTRY_TEST_PATH "${REGISTRY_TEST_PATH}"
#endif
-#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"
+
+// Test Remove command
+#define REMOVE_STRING "${REMOVE_STRING}"