diff options
author | Robert Goulet <robert.goulet@autodesk.com> | 2015-08-11 19:19:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-12 17:43:00 (GMT) |
commit | d25819bc2623b5144ffc57b694500993ac5759b4 (patch) | |
tree | 89116aa3d941ae23e5cb53a0c85dc255abd5ee0d /Tests/RunCMake/GeneratorExpression | |
parent | e36a05fd7f7d008c4c1e75ebf46eac3072ef71b1 (diff) | |
download | CMake-d25819bc2623b5144ffc57b694500993ac5759b4.zip CMake-d25819bc2623b5144ffc57b694500993ac5759b4.tar.gz CMake-d25819bc2623b5144ffc57b694500993ac5759b4.tar.bz2 |
Add generator expression support to OUTPUT_DIRECTORY target properties
If {ARCHIVE,LIBRARY,RUNTIME}_OUTPUT_DIRECTORY is set with a genex then
do not add the per-config subdirectory on multi-config generators.
This will allow projects to use $<CONFIG> to place the per-config
part of the directory path somewhere other than the end.
Diffstat (limited to 'Tests/RunCMake/GeneratorExpression')
4 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index cba3941..21fc851 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -25,6 +25,7 @@ run_cmake(COMPILE_LANGUAGE-add_executable) 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(ImportedTarget-TARGET_PDB_FILE) if(LINKER_SUPPORTS_PDB) diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion-result.txt b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion-stderr.txt b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion-stderr.txt new file mode 100644 index 0000000..5b15526 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at TARGET_FILE-recursion.cmake:[0-9]+ \(add_executable\): + Target 'empty1' OUTPUT_DIRECTORY depends on itself. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake new file mode 100644 index 0000000..7633be1 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/TARGET_FILE-recursion.cmake @@ -0,0 +1,3 @@ +enable_language(C) +add_executable(empty1 empty.c) +set_property(TARGET empty1 PROPERTY RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:empty1>) |