Skip to content

Commit

Permalink
update compiler-options
Browse files Browse the repository at this point in the history
  • Loading branch information
derjasper committed Dec 9, 2022
1 parent 26a95ef commit 623e9d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmake/compiler-options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # Matches "Clang" and "AppleClan
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
else()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
message(FATAL_ERROR " clang version must be at least 5!")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
message(FATAL_ERROR " clang version must be at least 13!")
endif()
message(STATUS "Using clang ${CMAKE_CXX_COMPILER_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
Expand All @@ -29,14 +29,14 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # Matches "Clang" and "AppleClan
endif()
set(CLANG_DEFAULT_CXX_STDLIB libc++)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7)
message(FATAL_ERROR " g++ version must be at least 7!")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11)
message(FATAL_ERROR " g++ version must be at least 11!")
endif()
message(STATUS "Using g++ ${CMAKE_CXX_COMPILER_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunknown-pragmas")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -fmax-errors=5 -fdiagnostics-color=auto")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O1 -gdwarf-4")
set(LIB_FILESYSTEM "stdc++fs")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
message("-- Using Visual Studio C++ ${CMAKE_CXX_COMPILER_VERSION}")
Expand Down

0 comments on commit 623e9d9

Please sign in to comment.