Skip to content

Commit

Permalink
intern: fold into fluxion-data and version the so
Browse files Browse the repository at this point in the history
problem: the libintern so wasn't being versioned, causing problems on
upgrades, see #1308

solution: the real dependency should be on libfluxion-data anyway, which
was closer to how we wanted it.  The libintern library is now built
static, linked into libfluxion-data, and provided that way.

Additionally, the libfluxion-data library is installed as
`libfluxion-data.so.{version without git suffix}` and linked as
`libfluxion-data.so.{version major}.{version minor}` with no unsuffixed
link installed.
  • Loading branch information
trws committed Nov 5, 2024
1 parent 735caba commit 58458db
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
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

0 comments on commit 58458db

Please sign in to comment.