Skip to content
Snippets Groups Projects
Commit 49c9a27b authored by Markus Blatt's avatar Markus Blatt
Browse files

[cmake,release] Do not try to set BUILD_SHARED from other variables.

With this patch the default is again building static libraries unless
one specifies -DBUILD_SHARED=True to cmake. This is not a fix but a
workaround for flyspray #1429
https://dune-project.org/flyspray/index.php?do=details&task_id=1429
parent 569204ee
No related branches found
No related tags found
No related merge requests found
......@@ -558,13 +558,13 @@ macro(dune_project)
option(DUNE_USE_ONLY_STATIC_LIBS "If set to ON, we will force static linkage everywhere" OFF)
if(DUNE_USE_ONLY_STATIC_LIBS)
set(_default_enable_shared OFF)
set(_default_enable_static ON)
else(DUNE_USE_ONLY_STATIC_LIBS)
set(_default_enable_shared ON)
set(_default_enable_static OFF)
if(BUILD_SHARED_LIBS)
message(FATAL_ERROR "Your requesting to use only static libraries "
"(DUNE_USE_ONLY_STATIC_LIBS==True) while at same time requesting to "
"build shared libraries (BUILD_SHARED_LIBS==True). This is a "
"contradiction!")
endif(BUILD_SHARED_LIBS)
endif(DUNE_USE_ONLY_STATIC_LIBS)
option(BUILD_SHARED_LIBS "If set to ON, shared libs will be built" ${_default_enable_shared})
option(DUNE_BUILD_BOTH_LIBS "If set to ON, shared and static libs will be built"
${_default_enable_static})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment