summaryrefslogtreecommitdiffstats
path: root/Tests/PDBDirectoryAndName
diff options
context:
space:
mode:
authorMarian Klymov <nekto1989@gmail.com>2018-05-16 21:19:56 (GMT)
committerBrad King <brad.king@kitware.com>2018-05-21 15:00:12 (GMT)
commit79ca546ed2d7d0ef546533978dfc4af4023d7194 (patch)
tree8bef32df5dfbe61af8d4337feb27e67846c3f76e /Tests/PDBDirectoryAndName
parentacb97101628d900aca9bfc869f168c1f2bd1de30 (diff)
downloadCMake-79ca546ed2d7d0ef546533978dfc4af4023d7194.zip
CMake-79ca546ed2d7d0ef546533978dfc4af4023d7194.tar.gz
CMake-79ca546ed2d7d0ef546533978dfc4af4023d7194.tar.bz2
Add generator expression support to PDB_OUTPUT_DIRECTORY target property
Fixes: #16365
Diffstat (limited to 'Tests/PDBDirectoryAndName')
-rw-r--r--Tests/PDBDirectoryAndName/CMakeLists.txt10
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}"