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

[CMake][bugfix] Remove CMAKE_REQUIRED* from FindUMFPack.cmake.

The removed lines would be necessary if the included headers
or libraries would be tested. As this is not the case, they can
be safely removed.
The way they were used, every test tried to link to the libraries
amd and umfpack causing every test to fail if the libraries are
not present. The changed declaration of CMAKE_REQUIRED_* should
be encapsulated together with the test inside
  include(CMakePushCheckState)
  cmake_push_check_state()
and
  cmake_pop_check_state()
to ensure that the definitions do not leak the test.
parent a81b4274
Branches
Tags
No related merge requests found
......@@ -60,19 +60,6 @@ find_library(UMFPACK_LIBRARY
)
# behave like a CMake module is supposed to behave
if(UMFPACK_INCLUDE_DIR)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${UMFPACK_INCLUDE_DIR} ${AMD_INCLUDE_DIR})
endif()
if(UMFPACK_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${UMFPACK_LIBRARY})
endif()
if(BLAS_LIBRARIES)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${BLAS_LIBRARIES})
endif()
if(AMD_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${AMD_LIBRARY})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
"UMFPack"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment