fixed for remove COMMAND

This commit is contained in:
Ken Martin 2002-04-22 11:51:26 -04:00
parent 9c69be42de
commit 7aa35093b8
15 changed files with 96 additions and 15 deletions

View File

@ -3,7 +3,6 @@
#
PROJECT (Complex)
CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
#
@ -138,6 +137,13 @@ IF (WIN32)
ENDIF (NOT UNIX)
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)

View File

@ -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")

View File

@ -0,0 +1 @@
#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"

View File

@ -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

View File

@ -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}"

View File

@ -3,7 +3,6 @@
#
PROJECT (Complex)
CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
#
@ -138,6 +137,13 @@ IF (WIN32)
ENDIF (NOT UNIX)
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)

View File

@ -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")

View File

@ -0,0 +1 @@
#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"

View File

@ -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

View File

@ -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}"

View File

@ -3,7 +3,6 @@
#
PROJECT (Complex)
CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
#
@ -138,6 +137,13 @@ IF (WIN32)
ENDIF (NOT UNIX)
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)

View File

@ -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")

View File

@ -0,0 +1 @@
#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"

View File

@ -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

View File

@ -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}"