summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-22 14:37:48 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-22 14:37:48 (GMT)
commit5ce40619db2d89f7cfbc2cd47968346fb22fa795 (patch)
treea964e2227eb25fa745c719e536a4c8360dc2345e /Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
parent04fc5dd493b6ccb24972a69641d5e41f1a76bf8e (diff)
parent0dfe395e3cb1a720c4853087db554a6827feaadb (diff)
downloadCMake-5ce40619db2d89f7cfbc2cd47968346fb22fa795.zip
CMake-5ce40619db2d89f7cfbc2cd47968346fb22fa795.tar.gz
CMake-5ce40619db2d89f7cfbc2cd47968346fb22fa795.tar.bz2
Merge topic 'COMPILE_FEATURES-genex'
0dfe395e Features: Add COMPILE_FEATURES generator expression. aa8a6fce cmMakefile: Add methods for checking availability of a feature. b6dedf03 cmMakefile: Extract CheckNeeded{C,Cxx}Language methods. 8dd129df cmMakefile: Extract CompileFeaturesAvailable method. 6b9b2fff cmMakefile: Extract CompileFeatureKnown method.
Diffstat (limited to 'Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake')
-rw-r--r--Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
new file mode 100644
index 0000000..9d56bc0
--- /dev/null
+++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake
@@ -0,0 +1,15 @@
+
+add_library(empty1 empty.cpp)
+
+add_library(empty2 INTERFACE)
+add_library(empty3 INTERFACE)
+target_compile_features(empty3 INTERFACE cxx_constexpr)
+
+target_link_libraries(empty1
+ # When starting, $<COMPILE_FEATURES:cxx_final> is '0', so 'freeze' the
+ # CXX_STANDARD at 98 during computation.
+ $<$<COMPILE_FEATURES:cxx_final>:empty2>
+ # This would add cxx_constexpr, but that would require CXX_STANDARD = 11,
+ # which is not allowed after freeze. Report an error.
+ empty3
+)