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

Clean up JANA/Compatibility #392

Merged
merged 6 commits into from
Dec 8, 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
2 changes: 1 addition & 1 deletion src/examples/PodioExample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (USE_PODIO)

add_executable(PodioExample ${PodioExample_SOURCES})
target_link_libraries(PodioExample
PUBLIC jana2 PodioDatamodel PodioDatamodelDict podio::podioRootIO)
PUBLIC jana2_static_lib PodioDatamodel PodioDatamodelDict podio::podioRootIO)

set_target_properties(PodioExample PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)

Expand Down
1 change: 1 addition & 0 deletions src/external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

add_subdirectory(catch2)
add_subdirectory(md5)
add_subdirectory(tomlplusplus)
6 changes: 6 additions & 0 deletions src/external/md5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

add_library(VendoredMD5 OBJECT md5.c)
target_include_directories(VendoredMD5 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)



File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/libraries/JANA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ set(JANA2_SOURCES
Compatibility/JStreamLogBuffer.cc
Compatibility/JGeometryManager.cc
Compatibility/JGeometryXML.cc
Compatibility/md5.c
)

if (${USE_PODIO})
Expand All @@ -70,6 +69,7 @@ find_package(Threads REQUIRED)
set(THREADS_PREFER_PTHREAD_FLAG ON)
target_link_libraries(jana2 PUBLIC ${CMAKE_DL_LIBS} Threads::Threads)
target_link_libraries(jana2 PRIVATE VendoredTomlPlusPlus)
target_link_libraries(jana2 PRIVATE VendoredMD5) # To pull in the header file

if (${USE_PODIO})
target_link_libraries(jana2 PUBLIC podio::podio podio::podioRootIO ${ROOT_LIBRARIES})
Expand All @@ -79,7 +79,7 @@ endif()


# static library, always there
add_library(jana2_static_lib STATIC $<TARGET_OBJECTS:jana2>)
add_library(jana2_static_lib STATIC $<TARGET_OBJECTS:jana2> $<TARGET_OBJECTS:VendoredMD5>)
set_target_properties(jana2_static_lib PROPERTIES PREFIX "lib" OUTPUT_NAME "JANA")

target_include_directories(jana2_static_lib PUBLIC $<INSTALL_INTERFACE:include>)
Expand All @@ -96,7 +96,7 @@ install(TARGETS jana2_static_lib EXPORT jana2_targets DESTINATION lib)
# optionally build shared lib
if (BUILD_SHARED_LIBS)
message(STATUS "Building both shared and static libraries")
add_library(jana2_shared_lib SHARED $<TARGET_OBJECTS:jana2>)
add_library(jana2_shared_lib SHARED $<TARGET_OBJECTS:jana2> $<TARGET_OBJECTS:VendoredMD5>)
set_target_properties(jana2_shared_lib PROPERTIES PREFIX "lib" OUTPUT_NAME "JANA")

target_include_directories(jana2_shared_lib PUBLIC $<INSTALL_INTERFACE:include>)
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/JANA/Calibrations/JLargeCalibration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ using namespace std;

#include <JANA/Services/JParameterManager.h>
#include <JANA/Calibrations/JLargeCalibration.h>
#include "JANA/Compatibility/md5.h"
#include <md5.h>


static pthread_mutex_t resource_manager_mutex = PTHREAD_MUTEX_INITIALIZER;
Expand Down
1 change: 0 additions & 1 deletion src/libraries/JANA/Compatibility/JGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

#pragma once
#include "jerror.h"

#include <map>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/libraries/JANA/Compatibility/JGeometryXML.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ using namespace std;
#include <JANA/JApplication.h>
#include <JANA/Calibrations/JCalibrationManager.h>
#include <JANA/Services/JParameterManager.h>
#include <md5.h>
#include "JGeometryXML.h"

#if JANA2_HAVE_XERCES
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/JANA/Compatibility/JGeometryXML.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
#pragma once
#include <iostream>

#include <JANA/Compatibility/jerror.h>
#include <JANA/Compatibility/JGeometry.h>
#include <JANA/Compatibility/JStreamLog.h>
#include <JANA/Calibrations/JCalibration.h>
#include <JANA/JVersion.h>

#include <JANA/Compatibility/md5.h>



#if JANA2_HAVE_XERCES
#if !defined(__CINT__) && !defined(__CLING__)
Expand Down
32 changes: 0 additions & 32 deletions src/libraries/JANA/Compatibility/JGetObjectsFactory.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/programs/jana/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
add_executable(jana jana.cc )

find_package(Threads REQUIRED)
target_link_libraries(jana jana2 Threads::Threads)
target_link_libraries(jana jana2_static_lib Threads::Threads)
target_link_options(jana PRIVATE -rdynamic)
install(TARGETS jana DESTINATION bin)

Loading