From 276135607610630f5c63303d6fcefcf4e3baaf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Tue, 29 Sep 2015 22:33:02 +0200 Subject: [PATCH] [CMake] Remove enable trick for SuperLU and ARPACKPP --- cmake/modules/AddARPACKPPFlags.cmake | 2 +- cmake/modules/AddSuperLUFlags.cmake | 2 +- cmake/modules/FindARPACKPP.cmake | 3 +-- cmake/modules/FindSuperLU.cmake | 3 +-- config.h.cmake | 8 ++++---- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cmake/modules/AddARPACKPPFlags.cmake b/cmake/modules/AddARPACKPPFlags.cmake index 651ce079e..f7dee74eb 100644 --- a/cmake/modules/AddARPACKPPFlags.cmake +++ b/cmake/modules/AddARPACKPPFlags.cmake @@ -14,7 +14,7 @@ function(add_dune_arpackpp_flags _targets) get_target_property(_props ${_target} COMPILE_FLAGS) string(REPLACE "_props-NOTFOUND" "" _props "${_props}") set_target_properties(${_target} PROPERTIES COMPILE_FLAGS - "${_props} ${ARPACKPP_DUNE_COMPILE_FLAGS} -DENABLE_ARPACKPP=1") + "${_props} ${ARPACKPP_DUNE_COMPILE_FLAGS}") endforeach(_target ${_targets}) endif(ARPACKPP_FOUND) endfunction(add_dune_arpackpp_flags) diff --git a/cmake/modules/AddSuperLUFlags.cmake b/cmake/modules/AddSuperLUFlags.cmake index e087b89ac..78b5f97ef 100644 --- a/cmake/modules/AddSuperLUFlags.cmake +++ b/cmake/modules/AddSuperLUFlags.cmake @@ -17,7 +17,7 @@ function(add_dune_superlu_flags) get_target_property(_props ${_target} COMPILE_FLAGS) string(REPLACE "_props-NOTFOUND" "" _props "${_props}") set_target_properties(${_target} PROPERTIES COMPILE_FLAGS - "${_props} ${SUPERLU_DUNE_COMPILE_FLAGS} -DENABLE_SUPERLU=1") + "${_props} ${SUPERLU_DUNE_COMPILE_FLAGS}") endforeach() endif(SUPERLU_FOUND) endfunction(add_dune_superlu_flags) diff --git a/cmake/modules/FindARPACKPP.cmake b/cmake/modules/FindARPACKPP.cmake index 286ad7f09..f68b851e1 100644 --- a/cmake/modules/FindARPACKPP.cmake +++ b/cmake/modules/FindARPACKPP.cmake @@ -137,7 +137,6 @@ set(HAVE_ARPACKPP ${ARPACKPP_FOUND}) # register all ARPACK++ related flags if(ARPACKPP_FOUND) - dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_ARPACKPP=1" - LIBRARIES "${ARPACKPP_LIBRARIES}" + dune_register_package_flags(LIBRARIES "${ARPACKPP_LIBRARIES}" INCLUDE_DIRS "${ARPACKPP_INCLUDE_DIRS}") endif(ARPACKPP_FOUND) diff --git a/cmake/modules/FindSuperLU.cmake b/cmake/modules/FindSuperLU.cmake index 4f04ee4b2..0426e3d66 100644 --- a/cmake/modules/FindSuperLU.cmake +++ b/cmake/modules/FindSuperLU.cmake @@ -135,7 +135,6 @@ set(HAVE_SUPERLU ${SUPERLU_FOUND}) # register all superlu related flags if(SUPERLU_FOUND) - dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_SUPERLU=1" - LIBRARIES "${SUPERLU_DUNE_LIBRARIES}" + dune_register_package_flags(LIBRARIES "${SUPERLU_DUNE_LIBRARIES}" INCLUDE_DIRS "${SUPERLU_INCLUDE_DIRS}") endif() diff --git a/config.h.cmake b/config.h.cmake index d419a47cf..a4256b2b1 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -28,11 +28,11 @@ /* end private */ -/* Define to ENABLE_SUPERLU if the SuperLU library is available */ -#cmakedefine HAVE_SUPERLU ENABLE_SUPERLU +/* Define to 1 if the SuperLU library is available */ +#cmakedefine HAVE_SUPERLU 1 -/* Define to ENABLE_ARPACKPP if the ARPACK++ library is available */ -#cmakedefine HAVE_ARPACKPP ENABLE_ARPACKPP +/* Define to 1 if the ARPACK++ library is available */ +#cmakedefine HAVE_ARPACKPP 1 /* define to 1 because older versions of SuperLU are no longer supported*/ #define SUPERLU_POST_2005_VERSION 1 -- GitLab