File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 29
29
30
30
project ( lua C )
31
31
32
+ # Remove -Werror from flags for LuaJIT compilation
33
+ string (REGEX REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
34
+ string (REGEX REPLACE "-Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
35
+ # Also remove any warning-as-error flags
36
+ string (REGEX REPLACE "-Wno-error=[^ ]*" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
37
+ string (REGEX REPLACE "-Wno-error=[^ ]*" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS} " )
38
+
32
39
# Download source
33
40
include (FetchContent )
34
41
FetchContent_Declare (
@@ -129,7 +136,7 @@ if (UNIX OR APPLE)
129
136
add_custom_command (
130
137
OUTPUT ${LUAJIT_LIB_PATH}
131
138
# COMMAND $(MAKE) -C ${LUA_BIN_FOLDER} PREFIX=${LUA_INSTALL_PATH}
132
- COMMAND $ (MAKE ) -C ${LUA_BIN_FOLDER} install PREFIX =${LUA_INSTALL_PATH}
139
+ COMMAND $ (MAKE ) -C ${LUA_BIN_FOLDER} install PREFIX =${LUA_INSTALL_PATH} "CFLAGS=-O2 -fomit-frame-pointer -Wno-empty-body -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-sign-compare -Wno-string-plus-int"
133
140
)
134
141
# endif()
135
142
add_custom_target (luajit_target DEPENDS ${LUAJIT_LIB_PATH} )
You can’t perform that action at this time.
0 commit comments