-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update CMakeLists #2
base: master
Are you sure you want to change the base?
Conversation
it probably needs to be updated somehow
-g -Wall -Wextra and such are already PUBLIC in RootFftwWrapper and so they propagate here
as per the original cmakelists
This is done through find_dependency(...) in the config file. This is needed for downstream projects to find RootFftwWrapper via this package.
no need to "generate" the config file. https://blog.vito.nyc/posts/cmake-pkg/
not used by this repo either
These flags were originally intended to be used in RootFftwWrapper (see its Master branch) but now if I use them in RootFftwWrapper, peuoSim seg faults. Also, if I put these things in AntarcticaRoot, everything seems fine.
find_package(ROOT CONFIG REQUIRED COMPONENTS HistPainter Physics Ged) | ||
find_package(ZLIB REQUIRED) # TODO: figure out if zlib is required | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS OFF) # turns -std=gnu++17 -> -std=c++17 |
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.
what's the advantage of c++17 over gnu++17? I wouldn't be surprised if GNU extensions are used somewhere (though I guess in that case it wouldn't have compiled would it...)
if(USE_HEALPIX) | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
find_package(HealPix REQUIRED) | ||
# TODO: this preprocessor definition doesn't seem to be implemented in the source code? |
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.
I don't think HEALPIX functionality was ported from ANITA
A PR to go with pueoBuilder's CleanUp branch
and libRootFftwWrapper's updateCMake branch
and NiceMC's updateCMake branch
and pueoSim's updateCMake branch
and pueo-data's updateCMake branch
and pueoEvent's updateCMake branch
THESE PRs NEED TO BE MERGED SIMULTANEOUSLY
general
target_*()
commands whenever possible to avoid adding things globally.find_package()
and obtain thePUBLIC
compiler flags/definitions, header files, and library automatically when they link againstAntarcticaRoot
; resources:modern way to package things
find_package(CONFIG)
mode and linking throughNamespace::target
wherever possible; e.g.ZLIB::ZLIB
(although not sure if zlib is actually needed).find_package(FFTW)
: not used byAntarcticaRoot
(although still linking against fftw libraries through upstreamRootFftwWrapper
because it is set toPUBLIC
there)find_package()
can correctly identifyAntarcticaRoot
's include path automatically;AntarcticaRoot
's header files now grouped together in a single directory in the install treecompiler flags and definitions
USE_FFT_TOOLS
removed (not used by any repo)USE_GEOGRAPHIC_LIB
compiled and is set toPRIVATE
at the moment (because downstream projects don't seem to use these compiler definitions)USE_HEALPIX
seems broken although set toPUBLIC
(NiceMC
could need this). That said,USE_HEALPIX
doesn't seem to be utilized byAntarcticaRoot
's source code-g
and-O2
removed since these are determined by CMake build types-Wall
and-Wextra
inDebug
mode; resources:Modern CMake generator expression
FORCE_OLD_GPP_ABI
; the associated compiler flag should come from upstreamRootFftwWrapper
(ie. if upstream is built with this option, the flag will propagate)-march=native
now comes from upstreamRootFftwWrapper
'sNATIVE_ARCH
option (ie. if upstream is built with this option, the flag will propagate)CERN ROOT
#include <>
directives in the source files to determine theROOT::<targets>
to link against (instead of linking against the entire ROOT library${ROOT_LIBRARIES}
). See CERN ROOT's CMake project example. The checklist is stored incmake/rootLibList.txt
.CERN ROOT Forum
Modern CMake CERN ROOT section
ROOT::<targets>
PRIVATE
ly to avoid redundant linking downstream.