diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-01-24 22:15:13 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2013-01-24 23:31:41 (GMT) |
commit | e03f83f394c53acbcc9dcff03f189170b2f33322 (patch) | |
tree | c2be55ec8ebcf166df98b7fb87e1dd1f458b35a6 /Tests/CMakeTests | |
parent | 21fc6c46df7f2271d7baace04f239f031785b917 (diff) | |
download | CMake-e03f83f394c53acbcc9dcff03f189170b2f33322.zip CMake-e03f83f394c53acbcc9dcff03f189170b2f33322.tar.gz CMake-e03f83f394c53acbcc9dcff03f189170b2f33322.tar.bz2 |
ProcessorCount test: fix path to cmsysTestsCxx executable
Use a generator expression to get the real place of this target instead of
guessing it wrong.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r-- | Tests/CMakeTests/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/CMakeTests/ProcessorCountTest.cmake.in | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt index d34d4a6..b049995 100644 --- a/Tests/CMakeTests/CMakeLists.txt +++ b/Tests/CMakeTests/CMakeLists.txt @@ -4,7 +4,8 @@ set(CMAKE_EXECUTABLE "${CMake_BIN_DIR}/cmake") macro(AddCMakeTest TestName PreArgs) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${TestName}Test.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" @ONLY IMMEDIATE) - add_test(CMake.${TestName} ${CMAKE_EXECUTABLE} ${PreArgs} + add_test(NAME CMake.${TestName} + COMMAND ${CMAKE_EXECUTABLE} ${PreArgs} -P "${CMAKE_CURRENT_BINARY_DIR}/${TestName}Test.cmake" ${ARGN}) endmacro() @@ -28,7 +29,7 @@ AddCMakeTest(String "") AddCMakeTest(Math "") AddCMakeTest(CMakeMinimumRequired "") AddCMakeTest(CompilerIdVendor "") -AddCMakeTest(ProcessorCount "") +AddCMakeTest(ProcessorCount "-DKWSYS_TEST_EXE=$<TARGET_FILE:cmsysTestsCxx>") AddCMakeTest(PushCheckState "") AddCMakeTest(While "") diff --git a/Tests/CMakeTests/ProcessorCountTest.cmake.in b/Tests/CMakeTests/ProcessorCountTest.cmake.in index 98f6ab1..15e0219 100644 --- a/Tests/CMakeTests/ProcessorCountTest.cmake.in +++ b/Tests/CMakeTests/ProcessorCountTest.cmake.in @@ -9,7 +9,7 @@ message("### 3. ProcessorCount(...) function call is emitting output that it sho message("processor_count='${processor_count}'") execute_process( - COMMAND "@CMAKE_BINARY_DIR@/Source/kwsys/$ENV{CMAKE_CONFIG_TYPE}/cmsysTestsCxx" + COMMAND "${KWSYS_TEST_EXE}" testSystemInformation OUTPUT_VARIABLE tsi_out ERROR_VARIABLE tsi_err) |