Redistributable builds
Introduction
If a binary runs on a different machine depends on a lot of factors. The following sections provide some tips to maximize portability. In general Windows binaries are more portable than *nix binaries.
CPU Architecture Optimization
Default compiler flags
/favor:blend: Optimizes for AMD and Intel architectures, see MSDN docs/arch:sse2on 32-bit ,/archundefined on 64-bit
Optimization CMake options
OGS_CPU_ARCHITECTURE: possible valuesAMD64orINTEL64(sets/favor:{AMD64 | INTEL64}flag)
Default compiler flags
-march=native: Optimizes for current CPU
CMake options
For redistribution
OGS_CPU_ARCHITECTURE: set togenericfor good balance between optimization and portability; set tocore2for maximum portability, more info on GCC docs
For optimization
OGS_CPU_ARCHITECTURE: tot tonativefor best optimization for your current CPU, possible values are listed here , more info on GCC docs
Package the build
Use the package-target which tries to gather all dependencies and fixes up shared library paths:
make packageThis creates a zip- or tar-archive which should be redistributable.
This article was written by Lars Bilke. If you are missing something or you find an error please reach out
to us on our forum.
Generated with Hugo 0.164.0
in CI job 825193
|
Last revision: April 20, 2026
Commit: refactor(MeshLib): remove PropertyVector::push_back 870422dde
| Edit this page on