Skip to content

Commit fcb33fa

Browse files
committed
release下编译器优化开到O3
1 parent 28756ee commit fcb33fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
1313
add_definitions(-DMSVC)
1414
endif ()
1515

16+
if (CMAKE_BUILD_TYPE STREQUAL "Release" )
17+
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O3")
18+
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
19+
endif()
20+
1621
add_subdirectory(LuaParser)
1722
add_subdirectory(CodeService)
1823
add_subdirectory(Util)

0 commit comments

Comments
 (0)