Skip to content

Commit

Permalink
Collapse arbor-sim#2390 into this and guard installation behing flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorstenhater committed Sep 2, 2024
1 parent a38a52f commit 6e3cccf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,24 +296,23 @@ else()
endif()
endif()

add_subdirectory(ext)
install(TARGETS ext-hwloc EXPORT arbor-targets)
install(TARGETS ext-random123 EXPORT arbor-targets)
target_link_libraries(arbor-public-deps INTERFACE ext-units)
install(TARGETS compile_flags_target EXPORT arbor-targets)

add_library(ext-units INTERFACE)
if(ARB_USE_BUNDLED_UNITS)
target_link_libraries(ext-units INTERFACE units::units)
install(TARGETS ext-units units EXPORT arbor-targets)
else()
find_package(units REQUIRED)
target_link_directories(ext-units INTERFACE ${units_LIBRARY_DIRS})
target_link_libraries(ext-units INTERFACE ${units_LIBRARY})
target_include_directories(ext-units INTERFACE ${units_INCLUDE_DIR})
endif()


add_subdirectory(ext)
install(TARGETS ext-hwloc EXPORT arbor-targets)
install(TARGETS ext-random123 EXPORT arbor-targets)
target_link_libraries(arbor-public-deps INTERFACE ext-units)
install(TARGETS ext-units EXPORT arbor-targets)
install(TARGETS units compile_flags_target EXPORT arbor-targets)

# Keep track of packages we need to add to the generated CMake config
# file for arbor.

Expand Down
2 changes: 1 addition & 1 deletion ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ if (ARB_USE_BUNDLED_UNITS)
set(UNITS_BUILD_CONVERTER_APP OFF CACHE INTERNAL "")
set(UNITS_BUILD_WEBSERVER OFF CACHE INTERNAL "")
set(UNITS_INSTALL ON CACHE INTERNAL "")
# set(UNITS_NAMESPACE "llnl::units" CACHE INTERNAL "")
set(UNITS_BINARY_ONLY_INSTALL ON CACHE INTERNAL "")

add_subdirectory("${PROJECT_SOURCE_DIR}/ext/units" "${PROJECT_BINARY_DIR}/ext/units")

Expand Down

0 comments on commit 6e3cccf

Please sign in to comment.