You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to add an third build configuration (FastDebug) to vcpkg. As I recognized this is not easily possible.
So I decided to change the compiler flags of the default debug configuration instead.
However these are hardcoded into the the file vcpkg_configure_cmake.cmake
The user can only add additional flags by setting VCPKG_CXX_FLAGS Varibles
I suggest to put the configuration into the tripets files. Eg in variables as VCPKG_CXX_DEFAULT_FLAGS
The targeted code fragment where the flags are hardcoded:
On the master branch, these have been moved out into scripts\toolchains\windows.cmake, which can be entirely replaced by specifying (in your triplet file) VCPKG_CHAINLOAD_TOOLCHAIN_FILE.
However, this will currently suppress running vcvarsall.bat which means the build will not be able to locate cl.exe without you also specifying CMAKE_CXX_COMPILER (etcetera) in your toolchain file as well as the flags.
I tried to add an third build configuration (FastDebug) to vcpkg. As I recognized this is not easily possible.
So I decided to change the compiler flags of the default debug configuration instead.
However these are hardcoded into the the file vcpkg_configure_cmake.cmake
The user can only add additional flags by setting VCPKG_CXX_FLAGS Varibles
I suggest to put the configuration into the tripets files. Eg in variables as VCPKG_CXX_DEFAULT_FLAGS
The targeted code fragment where the flags are hardcoded:
common:
set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}")
set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}")
"-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
"-DCMAKE_SHARED_LINKER_FLAGS_DEBUG="
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG="
shared:
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
"-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
"-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
static:
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
"-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}"
"-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}"
The text was updated successfully, but these errors were encountered: