Commit 7aa35093 authored by Ken Martin's avatar Ken Martin
Browse files

fixed for remove COMMAND

parent 9c69be42
......@@ -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)
......
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")
#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"
#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
......
......@@ -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}"
......@@ -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)
......
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")
#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"
#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
......
......@@ -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}"
......@@ -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)
......
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")
#define CMAKE_MINIMUM_REQUIRED_VERSION "${CMAKE_MINIMUM_REQUIRED_VERSION}"
#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
......
......@@ -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}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment