Skip to content

Commit 20269f1

Browse files
committed
优化降低到O2
1 parent fcb33fa commit 20269f1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
1414
endif ()
1515

1616
if (CMAKE_BUILD_TYPE STREQUAL "Release" )
17-
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O3")
18-
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
17+
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
18+
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG -O2")
19+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG -O2")
20+
endif ()
1921
endif()
2022

2123
add_subdirectory(LuaParser)

include/LuaParser/LuaAstNode/LuaAstNodeType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ enum class LuaAstNodeType
109109

110110

111111
#define LUA_AST(ASTClass)\
112-
inline static constexpr LuaAstNodeType ASTIndex = LuaAstNodeType::ASTClass
112+
inline static constexpr LuaAstNodeType ASTIndex = LuaAstNodeType::ASTClass

0 commit comments

Comments
 (0)