Skip to content

CMake#2157

Draft
brendan-nasa wants to merge 28 commits into
masterfrom
feature/cmake-transition
Draft

CMake#2157
brendan-nasa wants to merge 28 commits into
masterfrom
feature/cmake-transition

Conversation

@brendan-nasa

@brendan-nasa brendan-nasa commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

User simulations keep using plain make. Only building trick now uses cmake. Generated makefiles preserve autotools-built behavior. Autotools (./configure && make) build still works. The cmake build is out-of-tree (conventionally in build/ but can be dev-specified). Out-of-tree builds require patching tools/code/tests that assume builds (TRICK_HOME) are in-tree

Building with cmake

cmake -S . -B build                              # or: cmake --preset default
cmake --build build --target trick_io_src_gen    # runs ICG, writes the io_src list
cmake -S . -B build && cmake --build build       # picks the list up, builds everything
cmake --build build --target stage               # runnable TRICK_HOME in build/stage
ctest --test-dir build -L 'unit|sims'

The three-step bootstrap is only needed on a clean tree (see cmake/TrickICG.cmake); afterwards plain cmake --build build rebuilds incrementally, including re-running ICG when headers change.

Roadmap

  • cmake -S. -Bbuild checks match ./configure
  • cmake -S. -Bbuild generates equivalent share/trick/makefiles/config_user.mk but out-of-tree
  • cmake --build build builds trick-ICG and all nine trick archives matching make
  • a working cmake --install build (install into a specific prefix)
  • make test -> ctest
  • builds all java jars, data products, and civet web
  • ci runs that only use cmake
  • HDF5 support
  • GSL support
  • installation documentation
  • development documentation

Future work

  • remove autotools tooling
  • switch CI completely over to cmake

@coveralls

coveralls commented Jul 6, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 56.127%feature/cmake-transition into master. No base build found for master.

@brendan-nasa
brendan-nasa force-pushed the feature/cmake-transition branch from ec035dd to b3b88d5 Compare July 8, 2026 21:46
@brendan-nasa
brendan-nasa force-pushed the feature/cmake-transition branch from b3b88d5 to 13095e2 Compare July 8, 2026 21:47
@brendan-nasa
brendan-nasa force-pushed the feature/cmake-transition branch from d9f2c0e to 772e3ce Compare July 16, 2026 21:18
@brendan-nasa
brendan-nasa force-pushed the feature/cmake-transition branch from 772e3ce to 113da3f Compare July 16, 2026 21:19
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.

2 participants