Fix warning about tempnam, add in basic optimization for release build
This commit is contained in:
parent
2b9d66b787
commit
8e7f2f5bfc
1 changed files with 9 additions and 2 deletions
11
third-party/lua-5.1.5/src/CMakeLists.txt
vendored
11
third-party/lua-5.1.5/src/CMakeLists.txt
vendored
|
@ -45,9 +45,16 @@ set_target_properties(lua51_static PROPERTIES OUTPUT_NAME "lua51")
|
|||
|
||||
add_executable(lua51 "${LUA_SRC}" "${LUA_LIB_SRC}")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
|
||||
if(UNIX)
|
||||
target_compile_definitions(lua51_static PUBLIC "LUA_USE_DLOPEN")
|
||||
target_compile_definitions(lua51 PUBLIC "LUA_USE_DLOPEN")
|
||||
target_compile_definitions(lua51_static PUBLIC "LUA_USE_DLOPEN" "LUA_USE_MKSTEMP")
|
||||
target_compile_definitions(lua51 PUBLIC "LUA_USE_DLOPEN" "LUA_USE_MKSTEMP")
|
||||
target_link_libraries(lua51 PUBLIC ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(lua51_static PUBLIC ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue