summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-02-20 20:03:22 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-02-20 20:03:22 (GMT)
commit4ddfe5f9a461d2cd4c6cd7fd3ac9d08c256273f4 (patch)
treee244a19e5c22b3f777c6ceba39960a52000e27a3 /Source
parentd5cb0f48b73aa52d5bff98bd315a5b9b212f5793 (diff)
downloadCMake-4ddfe5f9a461d2cd4c6cd7fd3ac9d08c256273f4.zip
CMake-4ddfe5f9a461d2cd4c6cd7fd3ac9d08c256273f4.tar.gz
CMake-4ddfe5f9a461d2cd4c6cd7fd3ac9d08c256273f4.tar.bz2
ENH: only add the test for some platforms
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt29
1 files changed, 17 insertions, 12 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 3684f51..87801ee 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -1013,18 +1013,23 @@ IF(BUILD_TESTING)
ENDIF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
- ADD_TEST(SubDirSpaces ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/SubDirSpaces"
- "${CMake_BINARY_DIR}/Tests/SubDirSpaces"
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/SubDirSpaces/Executable Sources"
- --build-generator ${CMAKE_TEST_GENERATOR}
- --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
- --build-project SUBDIR
- --test-command test
- "${CMake_BINARY_DIR}/Tests/SubDirSpaces/ShouldBeHere"
- "${CMake_BINARY_DIR}/Tests/SubDirSpaces/testfromsubdir.obj"
- )
+ # only add this test on platforms that support it
+ # some old versions of make simply cannot handle spaces in paths
+ IF (${CMAKE_TEST_MAKEPROGRAM} MATCHES "nmake|gmake|wmake")
+ ADD_TEST(SubDirSpaces ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/SubDirSpaces"
+ "${CMake_BINARY_DIR}/Tests/SubDirSpaces"
+ --build-exe-dir
+ "${CMake_BINARY_DIR}/Tests/SubDirSpaces/Executable Sources"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project SUBDIR
+ --test-command test
+ "${CMake_BINARY_DIR}/Tests/SubDirSpaces/ShouldBeHere"
+ "${CMake_BINARY_DIR}/Tests/SubDirSpaces/testfromsubdir.obj"
+ )
+ ENDIF (${CMAKE_TEST_MAKEPROGRAM} MATCHES "nmake|gmake|wmake")
IF (WIN32)
ADD_TEST(SubDir ${CMAKE_CTEST_COMMAND}