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.
/favor:blend: Optimizes for AMD and Intel architectures, see MSDN docs/arch:sse2 on 32-bit, /arch undefined on 64-bitOGS_CPU_ARCHITECTURE: possible values AMD64 or INTEL64 (sets /favor:{AMD64 | INTEL64} flag)OGS_ENABLE_AVX2: boolean (sets /arch:AVX2 when set to true), requires at least Intel Haswell or AMD Excavator-based processors-march=native: Optimizes for current cpuOGS_CPU_ARCHITECTURE: set to generic for good balance between optimization and portability; set to core2 for maximum portability, more info on gcc docsOGS_CPU_ARCHITECTURE: tot to native for best optimization for your current cpu, possible values are listed here, more info on gcc docsOGS_ENABLE_AVX2: boolean (sets -march=core-avx2 when set to true), requires at least Haswell processorsSee Linux-tab!
Try to use static libraries as much as possible. For OGS itself use BUILD_SHARED_LIBS=OFF, which already defaults to OFF.
Third-party libraries installed via the systems package package manager are often provided as shared libraries. You may want to use Conan which provides lots of libraries (e.g. VTK) as static libs.
Use the package-target which tries to gather all dependencies and fixes up shared library paths:
This 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 let us know.
Generated with Hugo 0.54.0. Last revision: August 20, 2018
Commit: [web] Fixed old CMS-style links. 89b32b8bf
| Edit this page on