build: made use of mold linker optional
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
light7734 2025-07-17 17:42:18 +03:30
parent 05f6fab1b8
commit dac89f64ce
No known key found for this signature in database
GPG key ID: 195E37E1A0C88275

View file

@ -13,13 +13,15 @@ class LightRecipe(ConanFile):
options = { options = {
"enable_tests": [True, False], "enable_tests": [True, False],
"enable_static_analysis": [True, False], "enable_static_analysis": [True, False],
"use_mold": [True, False],
"export_compile_commands": [True, False], "export_compile_commands": [True, False],
} }
default_options = { default_options = {
"enable_tests": True, "enable_tests": True,
"export_compile_commands": True,
"enable_static_analysis": False, "enable_static_analysis": False,
"use_mold": False,
"export_compile_commands": True,
} }
def requirements(self): def requirements(self):
@ -36,6 +38,8 @@ class LightRecipe(ConanFile):
tc = CMakeToolchain(self) tc = CMakeToolchain(self)
tc.variables["CMAKE_BUILD_TYPE"] = self.settings.build_type tc.variables["CMAKE_BUILD_TYPE"] = self.settings.build_type
if self.options.use_mold:
tc.cache_variables["CMAKE_LINKER_TYPE"] = "MOLD" tc.cache_variables["CMAKE_LINKER_TYPE"] = "MOLD"
tc.cache_variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = self.options.export_compile_commands tc.cache_variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = self.options.export_compile_commands