forked from mpusz/mp-units
build: header-only mode enabled for Conan
This commit is contained in:
@@ -79,7 +79,8 @@ class UnitsConan(ConanFile):
|
|||||||
raise ConanInvalidConfiguration("mp-units requires at least Visual Studio 16")
|
raise ConanInvalidConfiguration("mp-units requires at least Visual Studio 16")
|
||||||
else:
|
else:
|
||||||
raise ConanInvalidConfiguration("mp-units is supported only by gcc and Visual Studio so far")
|
raise ConanInvalidConfiguration("mp-units is supported only by gcc and Visual Studio so far")
|
||||||
check_min_cppstd(self, "20")
|
if compiler.get_safe("cppstd"):
|
||||||
|
check_min_cppstd(self, "20")
|
||||||
|
|
||||||
def _configure_cmake(self, folder="src"):
|
def _configure_cmake(self, folder="src"):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
@@ -119,9 +120,7 @@ class UnitsConan(ConanFile):
|
|||||||
cmake.install()
|
cmake.install()
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
self.info.settings.clear()
|
self.info.header_only()
|
||||||
self.info.settings.compiler = self.settings.compiler
|
|
||||||
self.info.settings.compiler.version = self.settings.compiler.version
|
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
compiler = self.settings.compiler
|
compiler = self.settings.compiler
|
||||||
|
Reference in New Issue
Block a user