mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 21:42:43 +00:00
Merge branch 'main' into feat/printer-agent-impl
This commit is contained in:
@@ -362,6 +362,22 @@ if (MSVC)
|
||||
if (SLIC3R_MSVC_COMPILE_PARALLEL AND CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
add_compile_options(/MP)
|
||||
endif ()
|
||||
|
||||
# Parse lambdas the way the standard says, as clang and GCC already do. Without it
|
||||
# MSVC keeps its legacy lambda processor under /std:c++17 and rejects reading a
|
||||
# constexpr constant inside a lambda that does not capture it (C3493), which no
|
||||
# other compiler requires. Implied by /std:c++20 and /permissive-, so it is only
|
||||
# needed while we are on C++17. clang-cl is conforming already and does not take
|
||||
# the flag. Requires VS2019 16.8 or newer.
|
||||
if (NOT IS_CLANG_CL)
|
||||
# cl.exe only warns (D9002) about an unknown /Zc: option, so without this the
|
||||
# flag would be dropped and the first lambda reading a constexpr constant would
|
||||
# fail with C3493 far from the cause.
|
||||
if (MSVC_VERSION LESS 1928)
|
||||
message(FATAL_ERROR "Visual Studio 2019 16.8 (MSVC 19.28) or newer is required; detected MSVC ${MSVC_VERSION}.")
|
||||
endif ()
|
||||
add_compile_options(/Zc:lambda)
|
||||
endif ()
|
||||
# /bigobj (Increase Number of Sections in .Obj file)
|
||||
# error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm90' or greater
|
||||
# Generate symbols at every build target, even for the release.
|
||||
|
||||
Reference in New Issue
Block a user