From 4ddfe5f9a461d2cd4c6cd7fd3ac9d08c256273f4 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Tue, 20 Feb 2007 15:03:22 -0500 Subject: [PATCH] ENH: only add the test for some platforms --- Source/CMakeLists.txt | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 3684f51d33..87801eeb4e 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}