mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Swift: Disable optimization when compiling in Debug
By default no `-O...` flag is specified for Debug configuration for Swift so Xcode adds a (wrong) `-O` flag that prevents one from accessing variables while debugging. Add `-Onone` to the Swift Debug configuration to avoid this. Fixes: #23818
This commit is contained in:
committed by
Brad King
parent
365613d98b
commit
20fe9cf7e9
@@ -65,7 +65,7 @@ set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL -libc MD)
|
||||
set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug -libc MTd)
|
||||
set(CMAKE_Swift_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL -libc MDd)
|
||||
|
||||
set(CMAKE_Swift_FLAGS_DEBUG_INIT "-g")
|
||||
set(CMAKE_Swift_FLAGS_DEBUG_INIT "-Onone -g")
|
||||
set(CMAKE_Swift_FLAGS_RELEASE_INIT "-O")
|
||||
set(CMAKE_Swift_FLAGS_RELWITHDEBINFO_INIT "-O -g")
|
||||
set(CMAKE_Swift_FLAGS_MINSIZEREL_INIT "-Osize")
|
||||
|
||||
Reference in New Issue
Block a user