Skip to content
Snippets Groups Projects
Commit 1fb1dbd0 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Revert "[CMake] Remove enable trick for SuperLU and ARPACKPP"

The commit broke compiling / linking if one package was found but
the includes / libraries were not added. We need a different
approach to hide the ENABLE_* trick from the user and keep full
testing capabilities.
This reverts commit 27613560.
parent 1e08036f
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ function(add_dune_arpackpp_flags _targets) ...@@ -14,7 +14,7 @@ function(add_dune_arpackpp_flags _targets)
get_target_property(_props ${_target} COMPILE_FLAGS) get_target_property(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}") string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS set_target_properties(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${ARPACKPP_DUNE_COMPILE_FLAGS}") "${_props} ${ARPACKPP_DUNE_COMPILE_FLAGS} -DENABLE_ARPACKPP=1")
endforeach(_target ${_targets}) endforeach(_target ${_targets})
endif(ARPACKPP_FOUND) endif(ARPACKPP_FOUND)
endfunction(add_dune_arpackpp_flags) endfunction(add_dune_arpackpp_flags)
...@@ -17,7 +17,7 @@ function(add_dune_superlu_flags) ...@@ -17,7 +17,7 @@ function(add_dune_superlu_flags)
get_target_property(_props ${_target} COMPILE_FLAGS) get_target_property(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}") string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS set_target_properties(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${SUPERLU_DUNE_COMPILE_FLAGS}") "${_props} ${SUPERLU_DUNE_COMPILE_FLAGS} -DENABLE_SUPERLU=1")
endforeach() endforeach()
endif(SUPERLU_FOUND) endif(SUPERLU_FOUND)
endfunction(add_dune_superlu_flags) endfunction(add_dune_superlu_flags)
......
...@@ -137,6 +137,7 @@ set(HAVE_ARPACKPP ${ARPACKPP_FOUND}) ...@@ -137,6 +137,7 @@ set(HAVE_ARPACKPP ${ARPACKPP_FOUND})
# register all ARPACK++ related flags # register all ARPACK++ related flags
if(ARPACKPP_FOUND) if(ARPACKPP_FOUND)
dune_register_package_flags(LIBRARIES "${ARPACKPP_LIBRARIES}" dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_ARPACKPP=1"
LIBRARIES "${ARPACKPP_LIBRARIES}"
INCLUDE_DIRS "${ARPACKPP_INCLUDE_DIRS}") INCLUDE_DIRS "${ARPACKPP_INCLUDE_DIRS}")
endif(ARPACKPP_FOUND) endif(ARPACKPP_FOUND)
...@@ -135,6 +135,7 @@ set(HAVE_SUPERLU ${SUPERLU_FOUND}) ...@@ -135,6 +135,7 @@ set(HAVE_SUPERLU ${SUPERLU_FOUND})
# register all superlu related flags # register all superlu related flags
if(SUPERLU_FOUND) if(SUPERLU_FOUND)
dune_register_package_flags(LIBRARIES "${SUPERLU_DUNE_LIBRARIES}" dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_SUPERLU=1"
LIBRARIES "${SUPERLU_DUNE_LIBRARIES}"
INCLUDE_DIRS "${SUPERLU_INCLUDE_DIRS}") INCLUDE_DIRS "${SUPERLU_INCLUDE_DIRS}")
endif() endif()
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
/* end private */ /* end private */
/* Define to 1 if the SuperLU library is available */ /* Define to ENABLE_SUPERLU if the SuperLU library is available */
#cmakedefine HAVE_SUPERLU 1 #cmakedefine HAVE_SUPERLU ENABLE_SUPERLU
/* Define to 1 if the ARPACK++ library is available */ /* Define to ENABLE_ARPACKPP if the ARPACK++ library is available */
#cmakedefine HAVE_ARPACKPP 1 #cmakedefine HAVE_ARPACKPP ENABLE_ARPACKPP
/* define to 1 because older versions of SuperLU are no longer supported*/ /* define to 1 because older versions of SuperLU are no longer supported*/
#define SUPERLU_POST_2005_VERSION 1 #define SUPERLU_POST_2005_VERSION 1
......
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