* BugFix: Correct compilation for MacOS by explicitly specifying C++11 for all libraries and C++17 for the engine itself.

This commit is contained in:
Robert MacGregor 2021-12-03 16:37:22 -05:00
parent 82b33b757a
commit 58f6431ff0
2 changed files with 6 additions and 3 deletions

View file

@ -348,6 +348,8 @@ macro(finishLibrary)
add_library("${PROJECT_NAME}" SHARED ${${PROJECT_NAME}_files})
endif()
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
# omg - only use the first folder ... otherwise we get lots of header name collisions
#foreach(dir ${${PROJECT_NAME}_paths})
addInclude("${firstDir}")
@ -384,6 +386,10 @@ macro(finishExecutable)
else()
add_executable("${PROJECT_NAME}" WIN32 ${${PROJECT_NAME}_files})
endif()
# Torque requires c++17
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
addInclude("${firstDir}")
_postTargetProcess()

View file

@ -656,9 +656,6 @@ finishExecutable()
###############################################################################
###############################################################################
# Torque requires c++17
target_compile_features(${TORQUE_APP_NAME} PRIVATE cxx_std_17)
# Set Visual Studio startup project
if(MSVC)
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TORQUE_APP_NAME})