Skip to content

Commit 46ae64f

Browse files
disable compiler optimizations on Mac debug builds
Clang treats -Og the same as -O1, which prevents the viewing of many variables while debugging, so we need to use -O0 directly.
1 parent 21ebd10 commit 46ae64f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/toolchain-apple-clang.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
1515

1616
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wno-unused-variable -Wno-unused-parameter")
1717

18-
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -Wshadow")
18+
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wshadow")

0 commit comments

Comments
 (0)