Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework libintern #1312

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ set( CMAKE_BUILD_RPATH
# the RPATH to be used when installing, but only if it's not a system directory
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib64:${CMAKE_INSTALL_PREFIX}/lib")
endif("${isSystemDir}" STREQUAL "-1")

# Setting the include directory for the application to find config.h
Expand Down Expand Up @@ -131,9 +131,16 @@ pkg_check_modules(UUID REQUIRED IMPORTED_TARGET uuid)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.66 REQUIRED COMPONENTS
find_package(Boost CONFIG 1.66 COMPONENTS
trws marked this conversation as resolved.
Show resolved Hide resolved
graph
)
)
# if the upstream boost cmake config is not found, fall back
# TODO: remove this when we require 1.70+
if (NOT Boost_FOUND)
find_package(Boost 1.66 REQUIRED COMPONENTS
graph
)
endif ()
message(STATUS "Boost version: ${Boost_VERSION}")

# Install paths
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindFluxCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ else()
if(FLUX)
get_filename_component(EXTRA_FLUX_CORE_PREFIX_BIN ${FLUX} DIRECTORY)
get_filename_component(EXTRA_FLUX_CORE_PREFIX ${EXTRA_FLUX_CORE_PREFIX_BIN} DIRECTORY)
set(ENV{PKG_CONFIG_PATH} "${EXTRA_FLUX_CORE_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
set(ENV{PKG_CONFIG_PATH} "${EXTRA_FLUX_CORE_PREFIX}/lib64/pkgconfig:${EXTRA_FLUX_CORE_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
message(STATUS "found ${FLUX} in PATH with prefix=${EXTRA_FLUX_CORE_PREFIX}")
endif()
endif()
Expand Down
1 change: 0 additions & 1 deletion qmanager/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ target_link_libraries(sched-fluxion-qmanager PRIVATE
flux::core
flux::schedutil
PkgConfig::JANSSON
intern
cppwrappers
)
11 changes: 8 additions & 3 deletions resource/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
add_library(fluxion-data SHARED schema/data_std.cpp)
install(TARGETS fluxion-data LIBRARY)
target_link_libraries(fluxion-data PRIVATE
intern
)
set_target_properties(fluxion-data PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
install(TARGETS fluxion-data LIBRARY NAMELINK_SKIP)
add_subdirectory(libjobspec)
add_subdirectory(planner)
set(RESOURCE_HEADERS
Expand Down Expand Up @@ -77,7 +84,6 @@ add_library(resource STATIC
target_include_directories(resource PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(resource PRIVATE
planner
intern
)
target_link_libraries(resource PUBLIC
flux::hostlist
Expand All @@ -87,7 +93,6 @@ target_link_libraries(resource PUBLIC
PkgConfig::UUID
Boost::graph
jobspec_conv
fluxion-data
)
add_sanitizers(resource)

Expand Down
3 changes: 1 addition & 2 deletions resource/libjobspec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ add_sanitizers(jobspec_conv)
target_link_libraries(jobspec_conv PUBLIC flux::hostlist flux::idset
flux::core yaml-cpp PkgConfig::JANSSON
PkgConfig::UUID
intern
fluxion-data
)

Expand All @@ -26,5 +25,5 @@ target_link_libraries(flux-jobspec-validate PRIVATE jobspec_conv)

add_executable(test_constraint.t test/constraint.cpp)
add_sanitizers(test_constraint.t)
target_link_libraries(test_constraint.t jobspec_conv libtap intern)
target_link_libraries(test_constraint.t jobspec_conv libtap)
flux_add_test(NAME test_constraint COMMAND test_constraint.t)
1 change: 0 additions & 1 deletion resource/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ target_link_libraries (sched-fluxion-resource PRIVATE
resource
PkgConfig::JANSSON
PkgConfig::UUID
intern
cppwrappers
)
4 changes: 1 addition & 3 deletions src/common/libintern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
add_library(intern SHARED
add_library(intern STATIC
interner.cpp)
install(TARGETS intern
LIBRARY)

add_executable(interned_string_test test/interned_string_test.cpp)
add_sanitizers(interned_string_test)
Expand Down
Loading