Skip to content

MSVC Build Arguments

alef edited this page Jul 15, 2024 · 6 revisions

CMakeLists.txt vs. Cataclysm-vcpkg-static.sln

  • /wds and /Ds in SLN are double-quoted while are not in CMake.

Debug build

  • CMake defaults /D: SDL_SOUND, USE_HOME_DIR, WIN32
    • CMake: GIT_VERSION
    • SLN: _DEBUG
  • /errorReport:, CMake = queue, SLN = prompt
  • CMake cmake_pch.hxx vs. SLN stdafx.h
  • CMake /external:I for vcpkg includes and third-party
  • CMake /external:W0 ?
  • CMake /GF ?
  • CMake /Gy ?
  • SLN /IZ on third-party
  • CMake /MT instead of SLN /MTd ?
  • CMake /Ob0 ?
  • CMake /TP ?
  • SLN not using /utf-8 ?
  • SLN only /wd4661

Release build ( <- sln cmake -> )

  • /Oi -- /Ob2 => /Oi generate intrinsic functions, /Ob2 inline function expansion
  • -- /TP => Force C++
  • -- /utf-8 => source + exec
  • -- /D NDEBUG ...

Cataclysm-lib-vcpkg-static / Release x64 / Configuration Properties / C/C++ / Command Line

/permissive-
/Yu"Z:\alef\msvc-full-features\..\pch\main-pch.hpp"
/MP
/ifcOutput "Z:\alef\msvc-full-features\..\objwin\Release\x64\Cataclysm-lib-vcpkg-static\"
/GS-
/W1
/wd"4661"
/wd"4819"
/wd"4146"
/wd"26495"
/wd"26444"
/wd"26451"
/wd"4068"
/wd"6319"
/wd"6237"
/Gy
/Zc:wchar_t
/I"Z:\alef\msvc-full-features\..\pch"
/I"Z:\alef\msvc-full-features\..\src"
/I"Z:\alef\msvc-full-features\..\src\third-party"
/Zi
/Gm-
/O2
/sdl-
/Fd"Z:\alef\msvc-full-features\..\objwin\Release\x64\Cataclysm-lib-vcpkg-static\Cataclysm-lib-vcpkg-static-Release-x64.pdb"
/FI"Z:\alef\msvc-full-features\..\pch\main-pch.hpp"
/Zc:inline
/fp:precise
/D "_CONSOLE"
/D "SDL_SOUND"
/D "TILES"
/D "RELEASE"
/D "_SCL_SECURE_NO_WARNINGS"
/D "_CRT_SECURE_NO_WARNINGS"
/D "WIN32_LEAN_AND_MEAN"
/D "LOCALIZE"
/D "USE_VCPKG"
/D "_MBCS"
/errorReport:prompt
/WX-
/Zc:forScope
/Gd
/Oi
/MT
/std:c++17
/FC
/Fa"Z:\alef\msvc-full-features\..\objwin\Release\x64\Cataclysm-lib-vcpkg-static\"
/EHsc
/nologo
/Fo"Z:\alef\msvc-full-features\..\objwin\Release\x64\Cataclysm-lib-vcpkg-static\"
/Fp"Z:\alef\msvc-full-features\..\objwin\Release\x64\Cataclysm-lib-vcpkg-static\Cataclysm-lib-vcpkg-static-Release-x64.pch"
/diagnostics:column 

cmake --build --preset windows-tiles-sounds-x64-msvc

c:\program files (x86)\microsoft visual studio\2019\community\vc\tools\msvc\14.29.30133\bin\hostx64\x64\cl.exe
/c
/iz:\alef\src
/nologo
/w1
/wx-
/diagnostics:column
/sdl-
/mp
/o2
/ob2
/d _mbcs
/d win32
/d _windows
/d ndebug
/d tiles
/d _scl_secure_no_warnings
/d _crt_secure_no_warnings
/d win32_lean_and_mean
/d localize
/d use_vcpkg
/d cmake
/d git_version
/d release
/d backtrace
/d use_home_dir
/d use_winmain
/d sdl_sound
/d imgui_disable_obsolete_keyio
/d "cmake_intdir=\"release\""
/gf
/gm-
/ehsc
/mt
/gs-
/gy
/fp:precise
/permissive-
/zc:wchar_t
/zc:forscope
/zc:inline
/std:c++17
/yu"z:/alef/out/build/windows-tiles-sounds-x64-msvc/src/cmakefiles/cataclysm-tiles-common.dir/release/cmake_pch.hxx"
/fp"z:/alef/out/build/windows-tiles-sounds-x64-msvc/src/cataclysm-tiles-common.dir/release/cmake_pch.pch"
/fo"cataclysm-tiles-common.dir\release\\"
/fd"cataclysm-tiles-common.dir\release\cataclysm-tiles-common.pdb"
/external:w0
/gd
/tp
/wd4068
/wd4146
/wd4661
/wd4819
/wd6237
/wd6319
/wd26444
/wd26451
/wd26495
/fi"z:/alef/out/build/windows-tiles-sounds-x64-msvc/src/cmakefiles/cataclysm-tiles-common.dir/release/cmake_pch.hxx"
/fc
/errorreport:queue
/external:i "z:/alef/src/third-party"
/external:i "z:/alef/out/build/windows-tiles-sounds-x64-msvc/vcpkg_installed/x64-windows-static/include"
/external:i "z:/alef/out/build/windows-tiles-sounds-x64-msvc/vcpkg_installed/x64-windows-static/include/sdl2"
/utf-8
/bigobj