[Cmake-commits] CMake branch, next, updated. v3.0.0-rc5-3285-g468db77
Stephen Kelly
steveire at gmail.com
Wed May 21 11:03: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 468db776c810c91a89ec22bd966b4946e369d7ff (commit)
via 1a19f7f741a499eebeea05c6bd9f88408b18676a (commit)
from d3f3478b3d91ade1fe6df1155da949fbdfc15c52 (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=468db776c810c91a89ec22bd966b4946e369d7ff
commit 468db776c810c91a89ec22bd966b4946e369d7ff
Merge: d3f3478 1a19f7f
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 21 11:03:16 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 21 11:03:16 2014 -0400
Merge topic 'COMPILE_FEATURES-genex' into next
1a19f7f7 Add some tests.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a19f7f741a499eebeea05c6bd9f88408b18676a
commit 1a19f7f741a499eebeea05c6bd9f88408b18676a
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed May 21 17:00:48 2014 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Wed May 21 17:00:48 2014 +0200
Add some tests.
diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1-result.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt
new file mode 100644
index 0000000..7f3b43b
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at NonValidTarget1.cmake:[0-9]+ \(add_custom_command\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_FEATURES:cxx_final>
+
+ \$<COMPILE_FEATURE> may only be used with binary targets. It may not be
+ used with add_custom_command or add_custom_target.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake
new file mode 100644
index 0000000..c6707c1
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake
@@ -0,0 +1,17 @@
+
+set(genexvar $<COMPILE_FEATURES:cxx_final>)
+
+if (HAVE_FINAL)
+ set(expected_result 1)
+else()
+ set(expected_result 0)
+endif()
+
+add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${HAVE_FINAL}.cpp"
+ COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp"
+)
+
+add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp")
+if (HAVE_FINAL)
+ target_compile_features(empty PRIVATE cxx_final)
+endif()
diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2-result.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt
new file mode 100644
index 0000000..635150c
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at NonValidTarget2.cmake:4 \(add_custom_target\):
+ Error evaluating generator expression:
+
+ \$<COMPILE_FEATURES:cxx_final>
+
+ \$<COMPILE_FEATURE> may only be used with binary targets. It may not be
+ used with add_custom_command or add_custom_target.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake
new file mode 100644
index 0000000..eb84692
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake
@@ -0,0 +1,8 @@
+
+set(genexvar $<COMPILE_FEATURES:cxx_final>)
+
+add_custom_target(copy_target
+ COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.txt"
+)
+
+add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp")
diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
index 8ae51be..7acd926 100644
--- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
@@ -31,6 +31,13 @@ else()
run_cmake(LinkImplementationFeatureCycleSolved)
endif()
+if (";${CXX_FEATURES};" MATCHES ";cxx_final;")
+ set(RunCMake_TEST_OPTIONS "-DHAVE_FINAL=1")
+endif()
+run_cmake(NonValidTarget1)
+run_cmake(NonValidTarget2)
+unset(RunCMake_TEST_OPTIONS)
+
foreach(standard 98 11)
file(READ
"${RunCMake_BINARY_DIR}/generate_feature_list-build/cxx${standard}_flag.txt"
-----------------------------------------------------------------------
Summary of changes:
.../NonValidTarget1-result.txt} | 0
.../CompileFeatures/NonValidTarget1-stderr.txt | 9 +++++++++
Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake | 17 +++++++++++++++++
.../NonValidTarget2-result.txt} | 0
.../CompileFeatures/NonValidTarget2-stderr.txt | 9 +++++++++
Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake | 8 ++++++++
Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake | 7 +++++++
7 files changed, 50 insertions(+)
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CompileFeatures/NonValidTarget1-result.txt} (100%)
create mode 100644 Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt
create mode 100644 Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CompileFeatures/NonValidTarget2-result.txt} (100%)
create mode 100644 Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt
create mode 100644 Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list