[Cmake-commits] CMake branch, next, updated. v3.5.2-1237-gd15f5e9
Brad King
brad.king at kitware.com
Tue May 3 10:48:29 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via d15f5e91eff915a395a121893ab4ef5e2cd12e6d (commit)
via eccfc0d185526b746b722ed3d3d1302515698c9e (commit)
via 8de778118becd964310a4137e22baf9264c88627 (commit)
from c63b5111b8b2f9d43e6cca882cbb2573aaaa8843 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d15f5e91eff915a395a121893ab4ef5e2cd12e6d
commit d15f5e91eff915a395a121893ab4ef5e2cd12e6d
Merge: c63b511 eccfc0d
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue May 3 10:48:28 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue May 3 10:48:28 2016 -0400
Merge topic 'test-CROSSCOMPILING_EMULATOR' into next
eccfc0d1 Tests: Improve source file name in RunCMake.CrosscompilingEmulator
8de77811 Tests: Cover genex behavior in CROSSCOMPILING_EMULATOR test case
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eccfc0d185526b746b722ed3d3d1302515698c9e
commit eccfc0d185526b746b722ed3d3d1302515698c9e
Author: Jean-Christophe Fillion-Robin <jchris.fillionr at kitware.com>
AuthorDate: Mon May 2 22:48:21 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue May 3 10:42:21 2016 -0400
Tests: Improve source file name in RunCMake.CrosscompilingEmulator
The test executable returns with an error, so indicate this in the
source name.
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
index d304835..23e2e8d 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
@@ -3,7 +3,7 @@ enable_testing()
add_test(NAME DoesNotUseEmulator
COMMAND ${CMAKE_COMMAND} -E echo "Hi")
-add_executable(generated_exe simple_src.cxx)
+add_executable(generated_exe simple_src_exiterror.cxx)
add_test(NAME UsesEmulator
COMMAND generated_exe)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt
index f3d11d5..025b54c 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt
@@ -1,3 +1,5 @@
-add_executable(generated_exe_in_subdir_added_to_test_without_genex ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src.cxx)
+add_executable(generated_exe_in_subdir_added_to_test_without_genex
+ ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src_exiterror.cxx)
-add_executable(generated_exe_in_subdir_added_to_test_with_genex ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src.cxx)
+add_executable(generated_exe_in_subdir_added_to_test_with_genex
+ ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src_exiterror.cxx)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake b/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
index 22d537c..1aeb510 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/CrosscompilingEmulatorProperty.cmake
@@ -3,7 +3,7 @@
# -DCMAKE_CROSSCOMPILING_EMULATOR=/path/to/pseudo_emulator is passed to this
# test
-add_executable(target_with_emulator simple_src.cxx)
+add_executable(target_with_emulator simple_src_exiterror.cxx)
get_property(emulator TARGET target_with_emulator
PROPERTY CROSSCOMPILING_EMULATOR)
if(NOT "${emulator}" MATCHES "pseudo_emulator")
@@ -20,7 +20,7 @@ if(NOT "${emulator}" MATCHES "another_emulator")
endif()
unset(CMAKE_CROSSCOMPILING_EMULATOR CACHE)
-add_executable(target_without_emulator simple_src.cxx)
+add_executable(target_without_emulator simple_src_exiterror.cxx)
get_property(emulator TARGET target_without_emulator
PROPERTY CROSSCOMPILING_EMULATOR)
if(NOT "${emulator}" STREQUAL "")
diff --git a/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake b/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake
index 4851cc7..af3712c 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake
@@ -2,7 +2,7 @@ set(CMAKE_CROSSCOMPILING 1)
try_run(run_result compile_result
${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/simple_src.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/simple_src_exiterror.cxx
RUN_OUTPUT_VARIABLE run_output)
message(STATUS "run_output: ${run_output}")
@@ -13,6 +13,6 @@ set(CMAKE_CROSSCOMPILING_EMULATOR ${CMAKE_CROSSCOMPILING_EMULATOR}
"multi arg")
try_run(run_result compile_result
${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/simple_src.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/simple_src_exiterror.cxx
RUN_OUTPUT_VARIABLE run_output)
message(STATUS "Emulator with arguments run_output: ${run_output}")
diff --git a/Tests/RunCMake/CrosscompilingEmulator/simple_src.cxx b/Tests/RunCMake/CrosscompilingEmulator/simple_src_exiterror.cxx
similarity index 100%
rename from Tests/RunCMake/CrosscompilingEmulator/simple_src.cxx
rename to Tests/RunCMake/CrosscompilingEmulator/simple_src_exiterror.cxx
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8de778118becd964310a4137e22baf9264c88627
commit 8de778118becd964310a4137e22baf9264c88627
Author: Jean-Christophe Fillion-Robin <jchris.fillionr at kitware.com>
AuthorDate: Mon Apr 18 11:34:07 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue May 3 10:41:52 2016 -0400
Tests: Cover genex behavior in CROSSCOMPILING_EMULATOR test case
A `$<TARGET_FILE:tgt>` generator expression does not cause insertion of
the emulator. Add a test covering this. While at it, extend the test
case to cover executables in a subdirectory. Also make the test
matching expressions more robust to support multiple add_test calls
without mixing them while matching.
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
index 0aae06c..588b77b 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
@@ -4,9 +4,25 @@ if(EXISTS "${testfile}")
else()
message(FATAL_ERROR "Could not find expected CTestTestfile.cmake.")
endif()
-if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator ^(pseudo_emulator)+$")
- message(SEND_ERROR "Used emulator when it should not be used.")
+
+set(error_details "There is a problem with generated test file: ${testfile}")
+
+if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator [^\n]+pseudo_emulator[^\n]+\n")
+ message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
-if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator .+pseudo_emulator.+$")
- message(SEND_ERROR "Did not use emulator when it should be used.")
+
+if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator [^\n]+pseudo_emulator[^\n]+\n")
+ message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}")
+endif()
+
+if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulatorWithGenex [^\n]+pseudo_emulator[^\n]+\n")
+ message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
+endif()
+
+if(NOT testfile_contents MATCHES "add_test[(]UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex [^\n]+pseudo_emulator[^\n]+\n")
+ message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}")
+endif()
+
+if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulatorWithExecTargetFromSubdirAddedWithGenex [^\n]+pseudo_emulator[^\n]+\n")
+ message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
index 41850f2..d304835 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest.cmake
@@ -4,5 +4,17 @@ add_test(NAME DoesNotUseEmulator
COMMAND ${CMAKE_COMMAND} -E echo "Hi")
add_executable(generated_exe simple_src.cxx)
+
add_test(NAME UsesEmulator
COMMAND generated_exe)
+
+add_test(NAME DoesNotUseEmulatorWithGenex
+ COMMAND $<TARGET_FILE:generated_exe>)
+
+add_subdirectory(AddTest)
+
+add_test(NAME UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex
+ COMMAND generated_exe_in_subdir_added_to_test_without_genex)
+
+add_test(NAME DoesNotUseEmulatorWithExecTargetFromSubdirAddedWithGenex
+ COMMAND $<TARGET_FILE:generated_exe_in_subdir_added_to_test_with_genex>)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt b/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt
new file mode 100644
index 0000000..f3d11d5
--- /dev/null
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt
@@ -0,0 +1,3 @@
+add_executable(generated_exe_in_subdir_added_to_test_without_genex ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src.cxx)
+
+add_executable(generated_exe_in_subdir_added_to_test_with_genex ${CMAKE_CURRENT_SOURCE_DIR}/../simple_src.cxx)
-----------------------------------------------------------------------
Summary of changes:
.../CrosscompilingEmulator/AddTest-check.cmake | 24 ++++++++++++++++----
.../RunCMake/CrosscompilingEmulator/AddTest.cmake | 14 +++++++++++-
.../CrosscompilingEmulator/AddTest/CMakeLists.txt | 5 ++++
.../CrosscompilingEmulatorProperty.cmake | 4 ++--
Tests/RunCMake/CrosscompilingEmulator/TryRun.cmake | 4 ++--
.../{simple_src.cxx => simple_src_exiterror.cxx} | 0
6 files changed, 42 insertions(+), 9 deletions(-)
create mode 100644 Tests/RunCMake/CrosscompilingEmulator/AddTest/CMakeLists.txt
rename Tests/RunCMake/CrosscompilingEmulator/{simple_src.cxx => simple_src_exiterror.cxx} (100%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list