summaryrefslogtreecommitdiff
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2013-01-24 23:15:13 +0100
committerRolf Eike Beer <eike@sf-mail.de>2013-01-25 00:31:41 +0100
commite03f83f394c53acbcc9dcff03f189170b2f33322 (patch)
treec2be55ec8ebcf166df98b7fb87e1dd1f458b35a6 /Tests/CMakeTests
parent21fc6c46df7f2271d7baace04f239f031785b917 (diff)
downloadcmake-e03f83f394c53acbcc9dcff03f189170b2f33322.tar.gz
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.txt5
-rw-r--r--Tests/CMakeTests/ProcessorCountTest.cmake.in2
2 files changed, 4 insertions, 3 deletions
diff --git a/Tests/CMakeTests/CMakeLists.txt b/Tests/CMakeTests/CMakeLists.txt
index d34d4a6185..b0499954bd 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 98f6ab16df..15e0219489 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)