diff options
author | Brad King <brad.king@kitware.com> | 2016-01-15 14:54:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-01-15 14:55:26 (GMT) |
commit | 0ca122fcb3df3331a6daaeec090bd967daa0f2b9 (patch) | |
tree | 537f0fd49848026b5dc0fc7178fcf21cbc4d5353 /Tests/ExportImport | |
parent | 43a32bdff6b452016a9b59224cd83e3c79c58e28 (diff) | |
download | CMake-0ca122fcb3df3331a6daaeec090bd967daa0f2b9.zip CMake-0ca122fcb3df3331a6daaeec090bd967daa0f2b9.tar.gz CMake-0ca122fcb3df3331a6daaeec090bd967daa0f2b9.tar.bz2 |
Tests: Isolate policy changes in ExportImport test
Use cmake_policy(PUSH/POP) to isolate CMP0022 policy changes.
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index dcba9ac..9b6a543 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -270,6 +270,7 @@ install(FILES DESTINATION include/testSharedLibRequiredUser ) +cmake_policy(PUSH) cmake_policy(SET CMP0022 NEW) add_library(testSharedLibRequiredUser2 SHARED testSharedLibRequiredUser2.cpp) generate_export_header(testSharedLibRequiredUser2) @@ -283,7 +284,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/testsharedlibrequireduser2_export.h" DESTINATION include/testSharedLibRequiredUser2 ) -cmake_policy(SET CMP0022 OLD) +cmake_policy(POP) add_library(testSharedLibDepends SHARED testSharedLibDepends.cpp) set_property(TARGET testSharedLibDepends APPEND PROPERTY @@ -311,6 +312,8 @@ target_link_libraries(testSharedLibDepends LINK_PUBLIC renamed_on_export) target_link_libraries(testSharedLibDepends LINK_INTERFACE_LIBRARIES $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:$<TARGET_NAME:testSharedLibRequired>>) +cmake_policy(PUSH) +cmake_policy(SET CMP0022 OLD) add_library(cmp0022OLD SHARED cmp0022_vs6_1.cpp) generate_export_header(cmp0022OLD BASE_NAME cmp0022) target_include_directories(cmp0022OLD PUBLIC @@ -324,7 +327,7 @@ target_include_directories(cmp0022NEW PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>" "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/cmp0022>" ) -cmake_policy(SET CMP0022 OLD) +cmake_policy(POP) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmp0022.h" "${CMAKE_CURRENT_BINARY_DIR}/cmp0022_export.h" |