[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3344-ga068a96
Nils Gladitz
nilsgladitz at gmail.com
Fri May 23 16:08:17 EDT 2014
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 a068a96e7479d6a91622da3aedae3d29f1e9a4a2 (commit)
via 4658f3bf9eb550fad59971179e0df3830ab8fb6e (commit)
from 0a074737c85cd860a809103c960fdc895f4fdc19 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a068a96e7479d6a91622da3aedae3d29f1e9a4a2
commit a068a96e7479d6a91622da3aedae3d29f1e9a4a2
Merge: 0a07473 4658f3b
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri May 23 16:08:16 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 23 16:08:16 2014 -0400
Merge topic 'cpack-properties' into next
4658f3bf CPack: Add new sub-test for multi-configuration generated properties
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4658f3bf9eb550fad59971179e0df3830ab8fb6e
commit 4658f3bf9eb550fad59971179e0df3830ab8fb6e
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri May 23 22:07:42 2014 +0200
Commit: Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Fri May 23 22:07:42 2014 +0200
CPack: Add new sub-test for multi-configuration generated properties
diff --git a/Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake b/Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake
new file mode 100644
index 0000000..2966d88
--- /dev/null
+++ b/Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake
@@ -0,0 +1,13 @@
+include(${RunCMake_SOURCE_DIR}/check.cmake)
+
+file(GLOB INFO_FILES ${RunCMake_TEST_BINARY_DIR}/runtest_info_*.cmake)
+
+if(NOT INFO_FILES)
+ message(FATAL_ERROR "missing expected info files")
+endif()
+
+foreach(INFO_FILE IN LISTS INFO_FILES)
+ include(${INFO_FILE})
+ include(${RunCMake_TEST_BINARY_DIR}/CPackProperties.cmake)
+ test_property("config.cpp" FOO ${EXPECTED_MYTEST_NAME})
+endforeach()
diff --git a/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
new file mode 100644
index 0000000..399ec97
--- /dev/null
+++ b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
@@ -0,0 +1,14 @@
+add_executable(mytest test.cpp)
+
+foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES)
+ set(TOUPPER ${CONFIG} UPPER_CONFIG)
+ set_property(TARGET mytest PROPERTY
+ OUTPUT_NAME_${UPPER_CONFIG} bar_${CONFIG})
+endforeach()
+
+file(GENERATE OUTPUT runtest_info_$<CONFIG>.cmake CONTENT [[
+set(CPACK_BUILD_CONFIG "$<CONFIG>")
+set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>")
+]])
+
+set_property(INSTALL config.cpp PROPERTY FOO $<TARGET_FILE_NAME:mytest>)
diff --git a/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake b/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake
index 0d604a8..d244ac5 100644
--- a/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake
@@ -6,3 +6,4 @@ run_cmake(ValueGenex)
run_cmake(MultipleValues)
run_cmake(Append)
run_cmake(Replace)
+run_cmake(PerConfigValue)
diff --git a/Tests/RunCMake/CPackInstallProperties/check.cmake b/Tests/RunCMake/CPackInstallProperties/check.cmake
index 8c6ef2b..65aa467 100644
--- a/Tests/RunCMake/CPackInstallProperties/check.cmake
+++ b/Tests/RunCMake/CPackInstallProperties/check.cmake
@@ -2,7 +2,7 @@ function(test_property FILE NAME EXPECTED_VALUE)
get_property(ACTUAL_VALUE INSTALL "${FILE}" PROPERTY "${NAME}")
if(NOT "${ACTUAL_VALUE}" STREQUAL "${EXPECTED_VALUE}")
- message(FATAL_ERROR "${NAME}@${FILE}: property mismatch expected [${EXPECTED_VALUE}] actual [${ACTUAL_VALUE}]")
+ message(FATAL_ERROR "${NAME}@${FILE}: property mismatch expected [${EXPECTED_VALUE}] actual [${ACTUAL_VALUE}] (Config:${CPACK_BUILD_CONFIG})")
endif()
endfunction()
-----------------------------------------------------------------------
Summary of changes:
.../CPackInstallProperties/PerConfigValue-check.cmake | 13 +++++++++++++
.../RunCMake/CPackInstallProperties/PerConfigValue.cmake | 14 ++++++++++++++
Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake | 1 +
Tests/RunCMake/CPackInstallProperties/check.cmake | 2 +-
4 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake
create mode 100644 Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list