diff options
Diffstat (limited to 'cmake/compiler')
-rw-r--r-- | cmake/compiler/clang/settings.cmake | 9 | ||||
-rw-r--r-- | cmake/compiler/gcc/settings.cmake | 6 | ||||
-rw-r--r-- | cmake/compiler/icc/settings.cmake | 2 | ||||
-rw-r--r-- | cmake/compiler/mingw/settings.cmake | 2 | ||||
-rw-r--r-- | cmake/compiler/msvc/settings.cmake | 2 |
5 files changed, 16 insertions, 5 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index f958d8c16ae..222271c8990 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -1,7 +1,7 @@ # Set build-directive (used in core to tell which buildtype we used) target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}") + -D_BUILD_DIRECTIVE="$<CONFIG>") if(WITH_WARNINGS) target_compile_options(trinity-warning-interface @@ -13,6 +13,12 @@ if(WITH_WARNINGS) -Wfatal-errors -Wno-mismatched-tags -Woverloaded-virtual) + + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10) + target_compile_options(trinity-warning-interface + INTERFACE + -Wno-deprecated-copy) # warning in g3d + endif() message(STATUS "Clang: All warnings enabled") endif() @@ -45,6 +51,7 @@ endif() # -Wno-narrowing needed to suppress a warning in g3d # -Wno-deprecated-register is needed to suppress 185 gsoap warnings on Unix systems. +# -Wno-deprecated-copy needed to suppress a warning in g3d target_compile_options(trinity-compile-option-interface INTERFACE -Wno-narrowing diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index c2fbfee0345..a0dce55019c 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -1,7 +1,7 @@ # Set build-directive (used in core to tell which buildtype we used) target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}") + -D_BUILD_DIRECTIVE="$<CONFIG>") set(GCC_EXPECTED_VERSION 7.1.0) @@ -35,6 +35,10 @@ if( WITH_WARNINGS ) -Wfatal-errors -Woverloaded-virtual) + target_compile_options(trinity-warning-interface + INTERFACE + -Wno-deprecated-copy) # warning in g3d + message(STATUS "GCC: All warnings enabled") endif() diff --git a/cmake/compiler/icc/settings.cmake b/cmake/compiler/icc/settings.cmake index 563b92d6b9b..fd591440355 100644 --- a/cmake/compiler/icc/settings.cmake +++ b/cmake/compiler/icc/settings.cmake @@ -1,6 +1,6 @@ target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}") + -D_BUILD_DIRECTIVE="$<CONFIG>") if(PLATFORM EQUAL 32) target_compile_options(trinity-compile-option-interface diff --git a/cmake/compiler/mingw/settings.cmake b/cmake/compiler/mingw/settings.cmake index e3c75581648..0268de93ff5 100644 --- a/cmake/compiler/mingw/settings.cmake +++ b/cmake/compiler/mingw/settings.cmake @@ -4,7 +4,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # Set build-directive (used in core to tell which buildtype we used) target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}") + -D_BUILD_DIRECTIVE="$<CONFIG>") if(PLATFORM EQUAL 32) # Required on 32-bit systems to enable SSE2 (standard on x64) diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 5ab1ca4cef0..fea0eaf8a79 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -59,7 +59,7 @@ else() # while all make-like generators do (nmake, ninja) target_compile_definitions(trinity-compile-option-interface INTERFACE - -D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}") + -D_BUILD_DIRECTIVE="$<CONFIG>") endif() # multithreaded compiling on VS |