diff options
author | Brad King <brad.king@kitware.com> | 2015-08-21 13:29:02 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-08-21 13:29:02 (GMT) |
commit | c450686ef20597d43d4f019b315275cc8a6ba4a2 (patch) | |
tree | 8f6f507617f4b565c627c01e3273c4e756a438c3 /Tests/RunCMake | |
parent | 870d839f0d050e1db117c945d478938db657072e (diff) | |
parent | 3c37d2642d9000a2d01bc46ad0ea74a741bdb658 (diff) | |
download | CMake-c450686ef20597d43d4f019b315275cc8a6ba4a2.zip CMake-c450686ef20597d43d4f019b315275cc8a6ba4a2.tar.gz CMake-c450686ef20597d43d4f019b315275cc8a6ba4a2.tar.bz2 |
Merge topic 'OUTPUT_NAME-genex-no-recursion'
3c37d264 cmGeneratorTarget: Avoid recursion in GetOutputName method
Diffstat (limited to 'Tests/RunCMake')
5 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt new file mode 100644 index 0000000..bf592e7 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at OUTPUT_NAME-recursion.cmake:[0-9]+ \(add_executable\): + Target 'empty1' OUTPUT_NAME depends on itself. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake new file mode 100644 index 0000000..5cb8050 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/OUTPUT_NAME-recursion.cmake @@ -0,0 +1,3 @@ +enable_language(C) +add_executable(empty1 empty.c) +set_property(TARGET empty1 PROPERTY OUTPUT_NAME $<TARGET_FILE_NAME:empty1>) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 21fc851..0679024 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -26,6 +26,7 @@ run_cmake(COMPILE_LANGUAGE-add_library) run_cmake(COMPILE_LANGUAGE-add_test) run_cmake(COMPILE_LANGUAGE-unknown-lang) run_cmake(TARGET_FILE-recursion) +run_cmake(OUTPUT_NAME-recursion) run_cmake(ImportedTarget-TARGET_PDB_FILE) if(LINKER_SUPPORTS_PDB) diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake index 7633be1..e780103 100644 --- a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake +++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake @@ -1,3 +1,4 @@ enable_language(C) add_executable(empty1 empty.c) +set_property(TARGET empty1 PROPERTY OUTPUT_NAME $<TARGET_FILE_NAME:empty1>) set_property(TARGET empty1 PROPERTY RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:empty1>) |