summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake
blob: b23d3c7df339ec68024bc140959a179054f005a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
add_executable(mytest test.cpp)

foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES)
  string(TOUPPER ${CONFIG} UPPER_CONFIG)
  set_property(TARGET mytest PROPERTY
    OUTPUT_NAME_${UPPER_CONFIG} bar_${CONFIG})
endforeach()

file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info_$<CONFIG>.cmake CONTENT [[
set(CPACK_BUILD_CONFIG "$<CONFIG>")
set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>")
]])

set_property(INSTALL config.cpp PROPERTY FOO $<TARGET_FILE_NAME:mytest>)