diff options
author | Brad King <brad.king@kitware.com> | 2018-05-21 15:02:33 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-05-21 15:02:42 (GMT) |
commit | 7b42ffce09b589b8a7b1af348920e9c4808bd69f (patch) | |
tree | f29f8f8748a7b91c6e5e2bd853d4436c9b47bc42 /Tests | |
parent | 963a33f4a86d8dd181446696bb5c64db91276906 (diff) | |
parent | 79ca546ed2d7d0ef546533978dfc4af4023d7194 (diff) | |
download | CMake-7b42ffce09b589b8a7b1af348920e9c4808bd69f.zip CMake-7b42ffce09b589b8a7b1af348920e9c4808bd69f.tar.gz CMake-7b42ffce09b589b8a7b1af348920e9c4808bd69f.tar.bz2 |
Merge topic 'PDBDirectoryGenExpression'
79ca546ed2 Add generator expression support to PDB_OUTPUT_DIRECTORY target property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2083
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/PDBDirectoryAndName/CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt index 2fb894e..6d8d6cc 100644 --- a/Tests/PDBDirectoryAndName/CMakeLists.txt +++ b/Tests/PDBDirectoryAndName/CMakeLists.txt @@ -19,7 +19,7 @@ set(my_targets "") add_library(mylibA SHARED mylibA.c) set_target_properties(mylibA PROPERTIES PDB_NAME "mylibA_Special" - PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibA_PDB" + PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibA_PDB/$<CONFIG>" ) list(APPEND my_targets mylibA) @@ -87,7 +87,13 @@ foreach(t ${my_targets}) if(NOT pdb_dir) set(pdb_dir ${CMAKE_CURRENT_BINARY_DIR}) endif() - list(APPEND pdbs ${pdb_dir}/${CMAKE_CFG_INTDIR}/${pdb_name}.pdb) + if (pdb_dir MATCHES "\\$<.*>") + # Skip per-configuration subdirectory if the value contained + # a generator expression. + list(APPEND pdbs ${pdb_dir}/${pdb_name}.pdb) + else() + list(APPEND pdbs ${pdb_dir}/${CMAKE_CFG_INTDIR}/${pdb_name}.pdb) + endif() endforeach() add_custom_target(check_pdbs ALL VERBATIM COMMAND ${CMAKE_COMMAND} -Dconfig=$<CONFIGURATION> "-Dpdbs=${pdbs}" |