From 7656e91ff360b856213827b0a182cd38b2315937 Mon Sep 17 00:00:00 2001 From: "Nelles, David" Date: Fri, 24 Nov 2023 14:29:18 +0100 Subject: [PATCH] fix: Path separator depends on os --- recipes/cantera/all/conanfile.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/recipes/cantera/all/conanfile.py b/recipes/cantera/all/conanfile.py index 215d67bf898c32..133cf6f64b8ff6 100644 --- a/recipes/cantera/all/conanfile.py +++ b/recipes/cantera/all/conanfile.py @@ -59,31 +59,34 @@ def layout(self): def build(self): - opt = "build -j4 " \ + if self.settings.os == "Windows": + opt = "toolchain=msvc " + cd_modifier = "/d" + path_sep = ';' + else: + opt = "" + cd_modifier = "" + path_sep = ',' + + opt = opt +\ "prefix={} ".format(self.package_folder) +\ "libdirname=lib " \ "python_package=none " \ "f90_interface=n " \ "googletest=none " \ "versioned_shared_library=yes " \ - "extra_inc_dirs={} ".format(';'.join(self.scons_extra_inc_dirs)) +\ - "extra_lib_dirs={} ".format(';'.join(self.scons_extra_lib_dirs)) +\ + "extra_inc_dirs={} ".format(path_sep.join(self.scons_extra_inc_dirs)) +\ + "extra_lib_dirs={} ".format(path_sep.join(self.scons_extra_lib_dirs)) +\ "boost_inc_dir={} ".format(self.scons_boost_inc_dir) +\ "sundials_include={} ".format(self.scons_sundials_include) +\ "sundials_libdir={} ".format(self.scons_sundials_libdir) - if self.settings.os == "Windows": - opt = opt + "toolchain=msvc " - cd_modifier = "/d" - else: - cd_modifier = "" - if self.settings.build_type == "Debug": opt = opt + "optimize=no " else: opt = opt + "debug=no " - self.run("cd {} {} && scons {}".format(cd_modifier, self.source_folder, opt)) + self.run("cd {} {} && scons build -j4 {}".format(cd_modifier, self.source_folder, opt)) def package(self): if self.settings.os == "Windows":