forked from mpusz/mp-units
Warning and other compilation flags cleanup
This commit is contained in:
@@ -93,11 +93,13 @@ class UnitsConan(ConanFile):
|
|||||||
self.cpp_info.includedirs = ['include']
|
self.cpp_info.includedirs = ['include']
|
||||||
if self.settings.compiler == "gcc":
|
if self.settings.compiler == "gcc":
|
||||||
self.cpp_info.cxxflags = [
|
self.cpp_info.cxxflags = [
|
||||||
"-fconcepts",
|
|
||||||
"-Wno-literal-suffix",
|
"-Wno-literal-suffix",
|
||||||
"-Wno-non-template-friend",
|
"-Wno-non-template-friend",
|
||||||
"-Wno-stringop-overflow"
|
|
||||||
]
|
]
|
||||||
|
if Version(self.settings.compiler.version) < "10":
|
||||||
|
self.cpp_info.cxxflags.extend([
|
||||||
|
"-fconcepts"
|
||||||
|
])
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
self.info.settings.clear()
|
self.info.settings.clear()
|
||||||
|
@@ -65,18 +65,16 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
INTERFACE
|
INTERFACE
|
||||||
-Wno-literal-suffix
|
-Wno-literal-suffix
|
||||||
-Wno-non-template-friend
|
-Wno-non-template-friend
|
||||||
-Wno-stringop-overflow
|
|
||||||
)
|
)
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
|
||||||
target_link_libraries(units
|
|
||||||
INTERFACE
|
|
||||||
CONAN_PKG::range-v3
|
|
||||||
)
|
|
||||||
|
|
||||||
target_compile_options(units
|
target_compile_options(units
|
||||||
INTERFACE
|
INTERFACE
|
||||||
-fconcepts
|
-fconcepts
|
||||||
)
|
)
|
||||||
|
target_link_libraries(units
|
||||||
|
INTERFACE
|
||||||
|
CONAN_PKG::range-v3
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
add_library(mp::units ALIAS units)
|
add_library(mp::units ALIAS units)
|
||||||
|
Reference in New Issue
Block a user