forked from teamnwah/openmw-tes3coop
[General] Use correct versions of C++ per target
C++11 for client, components and launcher C++14 for server, browser and masterserver
This commit is contained in:
parent
e85d0db771
commit
4e869a2974
4 changed files with 7 additions and 9 deletions
|
@ -376,8 +376,7 @@ if (NOT WIN32 AND NOT APPLE)
|
|||
endif()
|
||||
|
||||
# CXX Compiler settings
|
||||
# tes3mp's server requires C++14
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long")
|
||||
add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON )
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
set (CMAKE_CXX_STANDARD 14)
|
||||
|
||||
set(BROWSER_UI
|
||||
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/Main.ui
|
||||
${CMAKE_SOURCE_DIR}/files/tes3mp/ui/ServerInfo.ui
|
||||
|
@ -75,6 +72,8 @@ add_executable(tes3mp-browser
|
|||
${UI_HDRS}
|
||||
)
|
||||
|
||||
set_property(TARGET tes3mp-browser PROPERTY CXX_STANDARD 14)
|
||||
|
||||
if (WIN32)
|
||||
INSTALL(TARGETS tes3mp-browser RUNTIME DESTINATION ".")
|
||||
endif (WIN32)
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
project(masterserver)
|
||||
|
||||
#set(CMAKE_CXX_STANDARD 14)
|
||||
add_definitions(-std=gnu++14)
|
||||
|
||||
include_directories("./")
|
||||
|
||||
set(SOURCE_FILES main.cpp MasterServer.cpp MasterServer.hpp RestServer.cpp RestServer.hpp AdminRest.cpp)
|
||||
|
@ -10,6 +7,8 @@ set(SOURCE_FILES main.cpp MasterServer.cpp MasterServer.hpp RestServer.cpp RestS
|
|||
add_executable(masterserver ${SOURCE_FILES})
|
||||
target_link_libraries(masterserver ${RakNet_LIBRARY} ${LuaJit_LIBRARIES} ${OPENSSL_LIBRARIES} components)
|
||||
|
||||
set_property(TARGET masterserver PROPERTY CXX_STANDARD 14)
|
||||
|
||||
option(BUILD_MASTER_TEST "build master server test program" OFF)
|
||||
|
||||
if(BUILD_MASTER_TEST)
|
||||
|
|
|
@ -133,8 +133,9 @@ target_compile_definitions(tes3mp-server PRIVATE $<$<CONFIG:Debug>:SOL_SAFE_FUNC
|
|||
target_compile_definitions(tes3mp-server PRIVATE $<$<CONFIG:Debug>:SOL_SAFE_USERTYPE> $<$<CONFIG:RelWithDebInfo>:SOL_SAFE_USERTYPE>)
|
||||
target_compile_definitions(tes3mp-server PRIVATE $<$<CONFIG:Debug>:SERVER_DEBUG> $<$<CONFIG:RelWithDebInfo>:SERVER_DEBUG>)
|
||||
|
||||
set_property(TARGET tes3mp-server PROPERTY CXX_STANDARD 14)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(tes3mp-server PRIVATE -std=gnu++14 -Wno-ignored-qualifiers -ftemplate-depth=2048)
|
||||
target_compile_options(tes3mp-server PRIVATE -Wno-ignored-qualifiers -ftemplate-depth=2048)
|
||||
endif()
|
||||
|
||||
target_link_libraries(tes3mp-server
|
||||
|
|
Loading…
Reference in a new issue