mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-12-01 22:58:49 +03:00
26 lines
775 B
CMake
26 lines
775 B
CMake
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
||
|
-Wall \
|
||
|
-Wextra \
|
||
|
-Werror \
|
||
|
-pipe \
|
||
|
-pedantic \
|
||
|
-Wunreachable-code")
|
||
|
|
||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||
|
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
||
|
|
||
|
if (GCC_VERSION VERSION_GREATER 4.9)
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" )
|
||
|
endif()
|
||
|
endif()
|
||
|
|
||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" )
|
||
|
endif()
|
||
|
endif()
|
||
|
|
||
|
if(NOT APPLE AND NOT MSVC)
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||
|
endif()
|