mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Remove hard-coded C++ version checking from CMake and replaced with CXX_STANDARD CMake property
This commit is contained in:
@@ -106,23 +106,11 @@ function (set_compile_settings project)
|
||||
${APP_SERVICES_LIBRARY}
|
||||
)
|
||||
elseif (UNIX)
|
||||
include (CheckCXXCompilerFlag)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
|
||||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
|
||||
mark_as_advanced(COMPILER_SUPPORTS_CXX11, COMPILER_SUPPORTS_CXX0X)
|
||||
if (COMPILER_SUPPORTS_CXX11)
|
||||
target_compile_options(${project} PUBLIC "-std=c++11")
|
||||
elseif (COMPILER_SUPPORTS_CXX0X)
|
||||
target_compile_options(${project} PUBLIC "-std=c++0x")
|
||||
else ()
|
||||
message(FATAL_ERROR "Compiler does not have C++11 support")
|
||||
endif ()
|
||||
target_compile_options(${project} PUBLIC "-ggdb" "-Wall" "-Wno-long-long" "-pedantic" "-Wextra")
|
||||
|
||||
if (OPENSPACE_WARNINGS_AS_ERRORS)
|
||||
target_compile_options(${project} PUBLIC "-Werror")
|
||||
endif ()
|
||||
|
||||
target_compile_options(${project} PUBLIC "-ggdb" "-Wall" "-Wno-long-long" "-pedantic" "-Wextra")
|
||||
endif ()
|
||||
endfunction ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user