Skip to content

506 Modernize CMake build and fix installation - #1596

Open
xsaschako wants to merge 5 commits into
mainfrom
506-cmake-cleanup
Open

xsaschako wants to merge 5 commits into
mainfrom
506-cmake-cleanup

Conversation

@xsaschako

Copy link
Copy Markdown
Member

Changes and Information

  • Raise minimum CMake to 3.28; use FILE_SET headers, COMPILE_WARNING_AS_ERROR, PROJECT_IS_TOP_LEVEL and SYSTEM/EXCLUDE_FROM_ALL for FetchContent dependencies
  • Fix installation: export all targets (core, models, bundled header-only deps), working find_package(memilio), relocatable RPATH, C++20 propagated via cxx_std_20
  • Add memilio_add_model() helper and new option MEMILIO_ENABLE_INSTALL; remove no-op MEMILIO_BUILD_STATIC_LIBS
  • Fix sanitizer link flags, enable sanitizers for Clang, fix Google Benchmark build on Clang
  • Set project version to 2.4.1 (was 1.0.0)

Reviewers: Windows/MSVC, system Boost, Ipopt and SBML builds were not tested locally.

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below).
  • New code adheres to coding guidelines.
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.).
  • Tests are added for new functionality and a local test run was successful (with and without OpenMP).
  • Appropriate documentation within the code (Doxygen) for new functionality has been added in the code.
  • Appropriate external documentation (ReadTheDocs) for new functionality has been added to the online documentation and checked in the preview.
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added.
  • (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed.
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.).
  • Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease).
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.).
  • On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

Closes #506
Closes #647
Related to #89

…d config.json

- Find likwid with FindLikwid.cmake and link the imported target likwid::likwid, also for installed packages
- Update Google Benchmark to v1.9.5
- memilio-generation: stop tracking the generated config.json, find libclang next to the compiler, remove invalid install RPATH
MEMILIO_BUILD_SHARED_LIBS now defaults to OFF with MSVC, so Windows builds no longer warn on every configure. The warning remains if ON is set explicitly.
@xsaschako
xsaschako marked this pull request as ready for review October 12, 2026 08:25
# Conflicts:
#	pycode/memilio-generation/CMakeLists.txt
Configured headers get their own file set, as base directories of one file set must not be nested.
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.55%. Comparing base (c717a8c) to head (6f95502).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1596   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         190      190           
  Lines       16048    16048           
=======================================
  Hits        15655    15655           
  Misses        393      393           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up CMake Files Overhaul Cmake generation

1 participant