Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Golden
CMake
Commits
0ca122fc
Commit
0ca122fc
authored
9 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
Tests: Isolate policy changes in ExportImport test
Use cmake_policy(PUSH/POP) to isolate CMP0022 policy changes.
parent
43a32bdf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tests/ExportImport/Export/CMakeLists.txt
+5
-2
5 additions, 2 deletions
Tests/ExportImport/Export/CMakeLists.txt
with
5 additions
and
2 deletions
Tests/ExportImport/Export/CMakeLists.txt
+
5
−
2
View file @
0ca122fc
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment