Skip to content

Update cmake build - #245

Open
bredelings wants to merge 11 commits into
Genivia:masterfrom
bredelings:update-cmake
Open

Update cmake build#245
bredelings wants to merge 11 commits into
Genivia:masterfrom
bredelings:update-cmake

Conversation

@bredelings

@bredelings bredelings commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Hi,

Please find enclosed some modifications to the existing cmake build scripts. I am looking at this again because I've asked for re-flex to be packaged for Debian.

Changes:

  • Build the AVX2/AVX-512BW modules if they compile (not run) on the build machine.
  • Add libreflexmin.
  • Remove near-duplicate pkgconfig template.
  • Build and install rtest.
  • Install version info (i.e. version 6.3.0) along with cmake file.
  • Make it work on windows with MSVC-like compilers.
  • Add some comments to make the CMakeLists.txt easier to follow

For Debian, its important the we include the AVX2/AVX-512BW capability even if the package-builder CPU doesn't support it, because the package will be installed on a different machine. Debian also can't build packages with -march=native, since this would select the instruction set based on the build machine, not the installation machine.

Of ./build.sh, autoconf, and cmake, the cmake scripts work best with Debian. I guess the autoconf scripts don't build shared libraries, only static? It seems like ./build.sh kind of works, but modifying it sufficiently to put all the installed files in the right place and do all the other rigamarole would essentially be adding an additional build system. Whereas Debian can basically configure cmake to put everything in the right place to build a package.

I have tested that these changes work on linux, linux-arm, mac-arm, windows, and linux->windows cross via github actions in the test-multi-arch PR.

@bredelings

Copy link
Copy Markdown
Contributor Author

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.

1 participant