cmake: build ci and and release with static runtime library

(The Visual Studio projects do this as well)
This commit is contained in:
Anonymous Maarten
2024-07-10 19:07:27 +02:00
parent 21aba2b19c
commit d1eab18de2
3 changed files with 17 additions and 6 deletions

View File

@@ -471,6 +471,10 @@ class Releaser:
"-DCMAKE_EXE_LINKER_FLAGS=-DEBUG",
# Linker flag for shared libraries
"-DCMAKE_SHARED_LINKER_FLAGS=-INCREMENTAL:NO -DEBUG -OPT:REF -OPT:ICF",
# MSVC runtime library flags are selected by an abstraction
"-DCMAKE_POLICY_DEFAULT_CMP0091=NEW",
# Use statically linked runtime (-MT) (ideally, should be "MultiThreaded$<$<CONFIG:Debug>:Debug>")
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded",
])
with self.section_printer.group(f"Build VC CMake project for {arch}"):