Update Windows build flags

/MP2 limits the build processes to a maximum of 2. Many CPU's nowadays have more than two cores, so the integer specifier is removed so that the build is not artificially constrained to two cores.

/FS allows multiple compiler processes to write to the .pdb file; it should be used in conjunction with /MP to speed up the build.

/permissive- disables certain MSVC-specific extensions and follows the C standard more closely. Using this flag should help to ensure behavior matches gcc & clang a little more closely.

Note, /utf-8 does NOT build the program with Unicode support. It merely indicates to the compiler that the source files are using UTF-8 encoding.
This commit is contained in:
sukibaby
2025-05-23 19:09:16 -07:00
committed by teejusb
parent 71cb44bde3
commit 45925badfd
+1 -1
View File
@@ -150,7 +150,7 @@ endif()
if(MSVC)
# TODO: Find a way to do this cleanly for non MSVC users.
set(SM_COMPILE_FLAGS "${SM_COMPILE_FLAGS} /MP2 /utf-8")
set(SM_COMPILE_FLAGS "${SM_COMPILE_FLAGS} /MP /permissive- /utf-8")
endif()
set_target_properties("${SM_EXE_NAME}"