How to override the Optimization level for the Release and Debug build. #1076
-
I would like to be able to turn the optimization level to
I've read it's not really possible to control the optimization level using the configuration flags.
I wonder what's the be way to add this feature in Jolt. Do you think an IF condition here is ok? Something like this: if (DEBUG_RELEASE)
set(CMAKE_CXX_FLAGS_RELEASE "/GS /Od /Ob0 /RTC1")
else()
set(CMAKE_CXX_FLAGS_RELEASE "/GS- /Gy /O2 /Oi /Ot")
endif() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
If Unreal uses a config called DebugGame then I'd expect you to need to override |
Beta Was this translation helpful? Give feedback.
In that case you can use
OVERRIDE_CXX_FLAGS
to skip setting the cxx flags from Jolt's CMakeLists.txt so that you can set it yourself (note this used to work for clang only, I just submitted a fix that makes this work for MSVC too).