From e622ecb35aaa12fd3acffe7da84899fe1f3e190d Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Mon, 23 Dec 2019 13:19:34 +0100 Subject: [PATCH] Warning and other compilation flags cleanup --- conanfile.py | 6 ++++-- src/CMakeLists.txt | 10 ++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conanfile.py b/conanfile.py index 56035345..fba6d3c0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -93,11 +93,13 @@ class UnitsConan(ConanFile): self.cpp_info.includedirs = ['include'] if self.settings.compiler == "gcc": self.cpp_info.cxxflags = [ - "-fconcepts", "-Wno-literal-suffix", "-Wno-non-template-friend", - "-Wno-stringop-overflow" ] + if Version(self.settings.compiler.version) < "10": + self.cpp_info.cxxflags.extend([ + "-fconcepts" + ]) def package_id(self): self.info.settings.clear() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2352b3c3..0f0d6720 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -65,18 +65,16 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) INTERFACE -Wno-literal-suffix -Wno-non-template-friend - -Wno-stringop-overflow ) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0) - target_link_libraries(units - INTERFACE - CONAN_PKG::range-v3 - ) - target_compile_options(units INTERFACE -fconcepts ) + target_link_libraries(units + INTERFACE + CONAN_PKG::range-v3 + ) endif() endif() add_library(mp::units ALIAS units)