diff --git a/cmake/rules.cmake b/cmake/rules.cmake index 988c2fb..897a0c8 100644 --- a/cmake/rules.cmake +++ b/cmake/rules.cmake @@ -1,8 +1,23 @@ #cmake_policy( SET CMP0002 OLD ) -add_compile_options( -std=c++23 ) +# C++23 isn't widely supported among gnu-ish compilers yet... so 2b will have to do, for now. +add_compile_options( -std=c++2b ) + +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" ) add_compile_options( -fdiagnostics-column-unit=byte ) add_compile_options( -fconcepts-diagnostics-depth=0 ) +endif() + +if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" ) +add_compile_options( -Wno-inline-namespace-reopened-noninline ) +add_compile_options( -Wno-unknown-warning-option ) +add_compile_options( -Wno-unused-comparison ) +add_compile_options( -Wno-inconsistent-missing-override ) +add_compile_options( -DBOOST_NO_CXX98_FUNCTION_BASE ) +endif() + + + include_directories( ${CMAKE_BINARY_DIR} . ) if( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )