summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/GenEx-TARGET_FILE/ValidTarget-TARGET_PDB_FILE.cmake
blob: a66394b423d17c33ec7c9f5545d3b3d135851478 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

enable_language(C)

add_library(empty SHARED empty.c)

get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
  list(GET CMAKE_CONFIGURATION_TYPES 0 FIRST_CONFIG)
  set(GENERATE_CONDITION CONDITION $<CONFIG:${FIRST_CONFIG}>)
endif()

file(GENERATE
  OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/test.txt"
  CONTENT
[[$<TARGET_PDB_FILE:empty>
$<TARGET_PDB_FILE_NAME:empty>
$<TARGET_PDB_FILE_DIR:empty>
]]
  ${GENERATE_CONDITION}
)