Migrate build from make to cmake#121
Closed
slanzi00 wants to merge 5 commits into
Closed
Conversation
Replace Makefile and src/Makefile with a modern CMake build system (≥3.20) that produces the same artifacts: libND_CAFMaker.so, makeCAF, and optionally testHDF.
- Version derived from git tags instead of hardcoded - ROOT uses imported targets (ROOT::*) instead of root-config flags - find_ups_package() calls expanded to multi-line keyword style - Add .cmake-format.yaml with find_ups_package() signature
- Extract find_ups_package() helper into cmake/FindUPSPackage.cmake - Drop the RelWithDebInfo CMAKE_BUILD_TYPE default - Replace -Wall with a full set of warning flags (-Wextra, -Wpedantic, -Wconversion, -Wsign-conversion, -Wshadow, etc.) - Add ASan + UBSan for Debug builds, with _GLIBCXX_SANITIZE_STD_ALLOCATOR on GCC - Add "Build environment" section documenting the required Singularity image (fnal-wn-sl7:latest) and ndcaf_setup.sh step before CMake
Member
|
Is this PR superseded by #123? It seems like the feature branch in that PR has all the commits of this one. If so could we add the information given in the description here to 123 and close this PR? |
Member
Author
|
Yes, exactly! I'll move the description over to #123. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing GNU Make build was fragile. This PR replaces both
Makefileandsrc/Makefilewith a proper CMake setup.each UPS package is wrapped in a proper
INTERFACE IMPORTEDtarget (deps::hdf5,deps::genie, etc.)Out-of-source builds — build artifacts go under
build/, keeping the source tree clean.Version derived from git tag —
project(VERSION ...)is populated bygit describe --tags, so the version is no longer a hardcoded string.Optional features as CMake options —
ENABLE_TMS(default ON) andENABLE_TESTEXE(default OFF) replace the ad-hocENABLE_TMS=0Make variable.SANDReco auto-detection — unchanged in behaviour, but now expressed as a proper CMake
if(DEFINED ENV{...})block that creates a no-op target when absent, so consumers can link unconditionally.Expanded warning set —
-Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wshadow -Wimplicit-fallthrough -Wextra-semi -Wold-style-castreplaces the old-Wallonly.