diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-10-22 13:05:49 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-07 16:11:18 (GMT) |
commit | baff44345cff8e635766e020d316da514616c16e (patch) | |
tree | 5d5052e16ad545de670d3ec116a378297b2f482c /Tests/RunCMake | |
parent | f97bf4370c283432c4e14fe54ed481d5d9b7ceef (diff) | |
download | CMake-baff44345cff8e635766e020d316da514616c16e.zip CMake-baff44345cff8e635766e020d316da514616c16e.tar.gz CMake-baff44345cff8e635766e020d316da514616c16e.tar.bz2 |
cmTarget: Allow populating COMPILE_FEATURES using generator expressions.
Delay validation of the content as a feature if it contains a
generator expression. It will be checked again at generate-time
after evaluation.
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-stderr.txt new file mode 100644 index 0000000..ff60e50 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-stderr.txt @@ -0,0 +1,2 @@ +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureGenex.cmake b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex.cmake new file mode 100644 index 0000000..ad2bd37 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex.cmake @@ -0,0 +1,3 @@ + +add_library(somelib STATIC empty.cpp) +set_property(TARGET somelib PROPERTY COMPILE_FEATURES "$<1:not_a_feature>") diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake index 3c999e6..da9477d 100644 --- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake @@ -1,3 +1,4 @@ include(RunCMake) run_cmake(NotAFeature) +run_cmake(NotAFeatureGenex) |