mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-08-16 16:26:26 +00:00
compiles now on macos
This commit is contained in:
parent
5f9726f10f
commit
40e5496819
@ -173,6 +173,11 @@ add_library(commandline_static
|
|||||||
deps/commandline/src/backends/BufferedBackend.cpp
|
deps/commandline/src/backends/BufferedBackend.cpp
|
||||||
deps/commandline/src/backends/BufferedBackend.h
|
deps/commandline/src/backends/BufferedBackend.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Ensure the commandline library uses C++11
|
||||||
|
set_target_properties(commandline_static PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES)
|
||||||
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_compile_definitions(commandline_static PRIVATE -DPLATFORM_WINDOWS=1)
|
target_compile_definitions(commandline_static PRIVATE -DPLATFORM_WINDOWS=1)
|
||||||
else ()
|
else ()
|
||||||
@ -217,3 +222,7 @@ if(${PROJECT_NAME}_ENABLE_UNIT_TESTING)
|
|||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Specific AppleClang options to suppress C++11 extension warnings - probably optional because it could hinder trouble shooting
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
add_compile_options(-Wno-c++11-extensions)
|
||||||
|
endif ()
|
@ -268,7 +268,7 @@ std::vector<std::string> TLuaEngine::StateThreadData::GetStateTableKeys(const st
|
|||||||
|
|
||||||
for (size_t i = 0; i < keys.size(); ++i) {
|
for (size_t i = 0; i < keys.size(); ++i) {
|
||||||
auto obj = current.get<sol::object>(keys.at(i));
|
auto obj = current.get<sol::object>(keys.at(i));
|
||||||
if (obj.get_type() == sol::type::nil) {
|
if (obj.get_type() == sol::type::none) {
|
||||||
// error
|
// error
|
||||||
break;
|
break;
|
||||||
} else if (i == keys.size() - 1) {
|
} else if (i == keys.size() - 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user