Browse Source

if hwloc is present on mac, it is also linked as otherwise, we get linker errors

tempestpy_adaptions
Sebastian Junges 8 years ago
parent
commit
e27ffb5b23
  1. 16
      resources/3rdparty/CMakeLists.txt
  2. 3
      resources/cmake/find_modules/FindHwloc.cmake

16
resources/3rdparty/CMakeLists.txt

@ -364,14 +364,14 @@ add_imported_library(sylvan STATIC ${Sylvan_LIBRARY} ${Sylvan_INCLUDE_DIR})
add_dependencies(sylvan_STATIC sylvan)
list(APPEND STORM_DEP_TARGETS sylvan_STATIC)
if(${OPERATING_SYSTEM} MATCHES "Linux")
find_package(Hwloc QUIET REQUIRED)
if(HWLOC_FOUND)
message(STATUS "Storm - Linking with hwloc ${HWLOC_VERSION}.")
add_imported_library(hwloc STATIC ${HWLOC_LIBRARIES} "")
list(APPEND STORM_DEP_TARGETS hwloc_STATIC)
else()
message(FATAL_ERROR "HWLOC is required but was not found.")
find_package(Hwloc QUIET REQUIRED)
if(HWLOC_FOUND)
message(STATUS "Storm - Linking with hwloc ${HWLOC_VERSION}.")
add_imported_library(hwloc STATIC ${HWLOC_LIBRARIES} "")
list(APPEND STORM_DEP_TARGETS hwloc_STATIC)
else()
if(${OPERATING_SYSTEM} MATCHES "Linux")
message(FATAL_ERROR "HWLOC is required on Linux but was not found.")
endif()
endif()

3
resources/cmake/find_modules/FindHwloc.cmake

@ -19,7 +19,6 @@ if (NOT HWLOC_PREFIX AND NOT $ENV{HWLOC_BASE} STREQUAL "")
set(HWLOC_PREFIX $ENV{HWLOC_BASE})
endif()
message(STATUS "Searching for hwloc library in path " ${HWLOC_PREFIX})
find_library(
HWLOC_LIBRARIES
@ -50,6 +49,4 @@ if (HWLOC_FOUND)
if (NOT $ENV{HWLOC_LIB} STREQUAL "")
# set(HWLOC_LIBRARIES "$ENV{HWLOC_LIB}")
endif()
message(STATUS "hwloc includes: " ${HWLOC_INCLUDE_DIRS})
message(STATUS "hwloc libraries: " ${HWLOC_LIBRARIES})
endif()
Loading…
Cancel
Save