mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-23 21:27:45 +00:00

- The libraries/external is not correctly mapped for windows cmake, had an extra '../' - add build flag for msvc for building with multiple processors /MP
31 lines
960 B
CMake
31 lines
960 B
CMake
|
|
if(UNIX)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
|
|
else()
|
|
add_definitions(-D_WIN32_WINNT=0x601)
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
# disabling SAFESEH
|
|
message(STATUS "Disabling Safe Exception Handlers..")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
|
|
|
# edit and continue
|
|
message(STATUS "Enabling Edit and Continue..")
|
|
add_definitions(/ZI)
|
|
|
|
# incremental linking
|
|
message(STATUS "Enabling Incremental Linking..")
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /INCREMENTAL")
|
|
|
|
# enable building with multiple processes
|
|
message(STATUS "Enabling Build with Multiple Processes..")
|
|
add_definitions(/MP)
|
|
endif()
|
|
endif()
|
|
|
|
|