summaryrefslogtreecommitdiffstats
path: root/Tests/MSManifest/Subdir/CMakeLists.txt
blob: 68c66fe209a1693d25dd6915fa175e3d320f4ab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
configure_file(test.manifest.in test.manifest)
add_executable(MSManifest main.c ${CMAKE_CURRENT_BINARY_DIR}/test.manifest)

if(MSVC AND NOT MSVC_VERSION LESS 1400)
  add_test(NAME MSManifest.Single COMMAND
    ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSManifest>
    -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
  add_executable(MSManifestNonIncremental main.c ${CMAKE_CURRENT_BINARY_DIR}/test.manifest)
  set_property(TARGET MSManifestNonIncremental PROPERTY LINK_FLAGS "/INCREMENTAL:NO")
  add_test(NAME MSManifest.Single.NonIncremental COMMAND
    ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSManifestNonIncremental>
    -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
  add_executable(MSManifestNone main.c)
  set_property(TARGET MSManifestNone PROPERTY LINK_FLAGS "/MANIFEST:NO")
elseif(WIN32 AND CMAKE_C_COMPILER_ID MATCHES "Clang")
  add_test(NAME MSManifest.Single COMMAND
    ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSManifest>
    -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake)
endif()