Skip to content

Commit

Permalink
fix(build): Fix debug build on Windows
Browse files Browse the repository at this point in the history
The -O2 compiler option is only available in release.
  • Loading branch information
narnaud committed Jul 3, 2024
1 parent b6a5541 commit 9164f63
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ add_subdirectory(ksyntaxhighlighting)

# * Enable optimizations even in debug mode (in a portable way)
function(enable_optimizations target)
if(MSVC)
target_compile_options(${target} PRIVATE /O2)
else()
if(NOT MSVC)
target_compile_options(${target} PRIVATE -O3)
endif()
endfunction()
Expand Down

0 comments on commit 9164f63

Please sign in to comment.