diff options
author | Yuchen Deng <loaden@gmail.com> | 2012-09-25 09:30:42 +0800 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-09-25 15:23:35 -0400 |
commit | 3f60dbf1484575f4c28a15c89e1af071648c8f2d (patch) | |
tree | 2ff89c5574c9515a4f1a61d210dfbcc7b020af56 /Tests/PDBDirectoryAndName/CMakeLists.txt | |
parent | d550801a3df96b991caf918435025aa233130bb4 (diff) | |
download | cmake-3f60dbf1484575f4c28a15c89e1af071648c8f2d.tar.gz |
Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
This enables changing the name and output folder of the debug symbol
files produced by MS compilers.
Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
Diffstat (limited to 'Tests/PDBDirectoryAndName/CMakeLists.txt')
-rw-r--r-- | Tests/PDBDirectoryAndName/CMakeLists.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt new file mode 100644 index 0000000000..ef1cae1eb9 --- /dev/null +++ b/Tests/PDBDirectoryAndName/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 2.8) +project(PDBDirectoryAndName C) + +if(NOT MSVC) + MESSAGE(FATAL_ERROR "The PDB file test works only with MSVC") +endif() + +add_library(mylibA SHARED mylibA.c) +set_target_properties(mylibA PROPERTIES + PDB_NAME "mylibA_Special" + PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibA_PDB" +) + +add_library(mylibB STATIC mylibB.c) +set_target_properties(mylibB PROPERTIES + PDB_NAME "mylibB_Special" + PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibB_PDB" +) + +add_library(mylibC SHARED mylibC.c) +set_target_properties(mylibC PROPERTIES + PDB_NAME "mylibC_Special" +) + +add_library(mylibD STATIC mylibD.c) +set_target_properties(mylibD PROPERTIES + PDB_NAME "mylibD_Special" +) + +add_executable(myexe myexe.c) +set_target_properties(myexe PROPERTIES + PDB_NAME "myexe_Special" + PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/myexe_PDB" +) + +target_link_libraries(myexe mylibA mylibB mylibC mylibD) + +add_executable(myexe2 myexe2.c) +set_target_properties(myexe2 PROPERTIES + PDB_NAME "myexe2_Special" +) + +target_link_libraries(myexe2 mylibA mylibD) |