diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-09-13 15:51:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-09-13 18:10:41 (GMT) |
commit | 2aafaccc5e6d6a0cd557bc80d874a0b77baf8303 (patch) | |
tree | 7813afa388d8b35806efd1fc4e597d9e7452ae17 /Tests | |
parent | 70089d0769902c58da925eb571ad430bec40e9da (diff) | |
download | CMake-2aafaccc5e6d6a0cd557bc80d874a0b77baf8303.zip CMake-2aafaccc5e6d6a0cd557bc80d874a0b77baf8303.tar.gz CMake-2aafaccc5e6d6a0cd557bc80d874a0b77baf8303.tar.bz2 |
genex: Test preprocessing incomplete expressions.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/include_directories/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/include_directories/incomplete-genex.cmake | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake index f0704f4..f66823e 100644 --- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake @@ -10,3 +10,4 @@ run_cmake(ImportedTarget) run_cmake(RelativePathInGenex) run_cmake(CMP0021) run_cmake(install_config) +run_cmake(incomplete-genex) diff --git a/Tests/RunCMake/include_directories/incomplete-genex.cmake b/Tests/RunCMake/include_directories/incomplete-genex.cmake new file mode 100644 index 0000000..b6900a4 --- /dev/null +++ b/Tests/RunCMake/include_directories/incomplete-genex.cmake @@ -0,0 +1,23 @@ +project(incomplete-genex) + +cmake_policy(SET CMP0022 NEW) +cmake_policy(SET CMP0023 NEW) + +add_library(somelib empty.cpp) + +# This test ensures that some internal mechanisms of cmGeneratorExpression +# do not segfault (#14410). + +# Test that cmGeneratorExpression::Preprocess(StripAllGeneratorExpressions) +# does not segfault +target_include_directories(somelib PUBLIC + "/include;/include/$<BUILD_INTERFACE:subdir" +) + +# Test that cmGeneratorExpression::Preprocess(BuildInterface) does not segfault +export(TARGETS somelib FILE somelibTargets.cmake) + +install(TARGETS somelib EXPORT someExport DESTINATION prefix) +# Test that cmGeneratorExpression::Preprocess(InstallInterface) +# and cmGeneratorExpression::Split do not segfault +install(EXPORT someExport DESTINATION prefix) |