-
Notifications
You must be signed in to change notification settings - Fork 12
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
External hipo #63
External hipo #63
Conversation
Here are HIPO builder steps you can adapt for your CI workflow: - name: checkout hipo
uses: actions/checkout@v4
with:
repository: gavalian/hipo
ref: 4.0.1 # if you want to use a fixed tag; remove if you want to use `main`
path: hipo_src
- name: build hipo
run: |
cmake -S hipo_src -B hipo_build --install-prefix $HIPO # you might prefer a different prefix
cmake --build hipo_build -j4
cmake --install hipo_build |
Clas12Banks/clas12writer.h
Outdated
#include "utils.h" | ||
#include "dictionary.h" | ||
#include <hipo4/utils.h> | ||
#include <hipo4/bank.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean dictionary.h
here?
#include <hipo4/bank.h> | |
#include <hipo4/dictionary.h> |
Clas12Banks/ftbparticle.cpp
Outdated
@@ -5,7 +5,7 @@ | |||
*/ | |||
|
|||
#include "ftbparticle.h" | |||
#include "dictionary.h" | |||
#include <hipo4/bank.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <hipo4/bank.h> | |
#include <hipo4/dictionary.h> |
Clas12Banks/ftbparticle.h
Outdated
#include "bank.h" | ||
#include "dictionary.h" | ||
#include <hipo4/bank.h> | ||
#include <hipo4/bank.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <hipo4/bank.h> | |
#include <hipo4/dictionary.h> |
Clas12Banks/particle.cpp
Outdated
@@ -5,7 +5,7 @@ | |||
*/ | |||
|
|||
#include "particle.h" | |||
#include "dictionary.h" | |||
#include <hipo4/bank.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <hipo4/bank.h> | |
#include <hipo4/dictionary.h> |
Clas12Banks/scaler_reader.h
Outdated
#include "reader.h" | ||
#include "dictionary.h" | ||
#include <hipo4/reader.h> | ||
#include <hipo4/bank.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <hipo4/bank.h> | |
#include <hipo4/dictionary.h> |
@@ -12,8 +12,6 @@ void LoadClas12Root(){ | |||
|
|||
TString CLAS12ROOT=gSystem->Getenv("CLAS12ROOT"); | |||
TString LIB=CLAS12ROOT+"/lib/"; | |||
gSystem->Load(LIB+"liblz4"); | |||
gSystem->Load(LIB+"libHipo4"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these library loads still be needed, regardless of whether or not they are externally built?
CMakeLists.txt
Outdated
@@ -11,7 +11,7 @@ set(CMAKE_CXX_FLAGS "-fPIC -O3") | |||
|
|||
##########For local ROOT cmake files comment in the line below and remove the lines commented ##USEROOTSYS | |||
#####include("cmake/FindROOT.cmake") | |||
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}) ############USEROOTSYS | |||
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS} /home/dglazier/Dropbox/clas12/gagik/hipo) ############USEROOTSYS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ENV{HIPO}
? Or instruct users to set -DCMAKE_PREFIX_PATH
?
CMakeLists.txt
Outdated
MESSAGE( STATUS "HIPO4 INCLUDE_DIR : " ${hipo4_INCLUDE_DIRS} ) | ||
MESSAGE( STATUS "HIPO4 LIBRARIES : " ${hipo4_LIBRARIES} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These variables aren't needed since the PkgConfig::hipo4
target can be used.
MESSAGE( STATUS "HIPO4 INCLUDE_DIR : " ${hipo4_INCLUDE_DIRS} ) | |
MESSAGE( STATUS "HIPO4 LIBRARIES : " ${hipo4_LIBRARIES} ) |
I also had to modify --- a/Clas12Root/src/CMakeLists.txt
+++ b/Clas12Root/src/CMakeLists.txt
@@ -1,16 +1,20 @@
set(CLAS12ROOT Clas12Root)
add_executable (clas12root clas12root.cpp)
-target_link_libraries(clas12root ${ROOT_LIBRARIES})
+target_link_libraries(clas12root ${ROOT_LIBRARIES} PkgConfig::hipo4)
+target_include_directories(clas12root SYSTEM PUBLIC PkgConfig::hipo4)
add_executable (clas12proof clas12proof.cpp)
-target_link_libraries(clas12proof ${ROOT_LIBRARIES})
+target_link_libraries(clas12proof ${ROOT_LIBRARIES} PkgConfig::hipo4)
+target_include_directories(clas12proof SYSTEM PUBLIC PkgConfig::hipo4)
add_executable (particleDraw particleDraw.cpp)
-target_link_libraries(particleDraw ${ROOT_LIBRARIES})
+target_link_libraries(particleDraw ${ROOT_LIBRARIES} PkgConfig::hipo4)
+target_include_directories(particleDraw SYSTEM PUBLIC PkgConfig::hipo4)
add_executable (particleTree particleTree.cpp)
-target_link_libraries(particleTree ${ROOT_LIBRARIES})
+target_link_libraries(particleTree ${ROOT_LIBRARIES} PkgConfig::hipo4)
+target_include_directories(particleTree SYSTEM PUBLIC PkgConfig::hipo4)
install (TARGETS clas12root clas12proof particleDraw particleTree DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable (makeHipoSelector makeHipoSelector.cpp) |
Perhaps the |
Provisional changes for using external hipo