Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Podhorszki, Norbert
ADIOS2
Commits
877087db
Commit
877087db
authored
Jun 28, 2017
by
Atkins, Charles Vernon
Browse files
Fix how shared / static option is handled
parent
64d13b27
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
877087db
...
...
@@ -55,14 +55,19 @@ include(CMakeDependentOption)
# Setup shared library / -fPIC stuff
get_property
(
SHARED_LIBS_SUPPORTED GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS
)
cmake_dependent_option
(
ADIOS2_BUILD_SHARED_LIBS
"Whether or not to build shared libraries"
ON
"SHARED_LIBS_SUPPORTED"
OFF
)
option
(
BUILD_SHARED_LIBS
"Build shared libraries (so/dylib/dll)."
${
SHARED_LIBS_SUPPORTED
}
)
if
(
NOT SHARED_LIBS_SUPPORTED
)
if
(
BUILD_SHARED_LIBS
)
message
(
WARNING
"A shared library build was requested but is not supported on this platform / compiler. Unexpected build results will likely occur"
)
endif
()
set
(
BUILD_SHARED_LIBS OFF CACHE BOOL
"Build shared libraries (so/dylib/dll)."
FORCE
)
endif
()
cmake_dependent_option
(
ADIOS2_ENABLE_PIC
"Build with Position Independent Code"
ON
"SHARED_LIBS_SUPPORTED"
OFF
)
set
(
BUILD_SHARED_LIBS
${
ADIOS2_BUILD_SHARED_LIBS
}
)
if
(
ADIOS2_ENABLE_PIC
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
endif
()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment