From 25778a6ef6aac57c3505b3d3cf1a684178a4e574 Mon Sep 17 00:00:00 2001 From: krande Date: Sat, 14 Dec 2024 14:21:17 +0100 Subject: [PATCH] make sure only msvc flags are applied for msvc --- .github/workflows/ci-build.yml | 2 +- bibc/wscript | 4 ++++ bibcxx/wscript | 4 ++++ bibfor/wscript | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 17ff93fe39..c2f2d67acc 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -35,7 +35,7 @@ jobs: cache: true - name: Build Code_Aster - shell: cmd + shell: bash run: | pixi run cbuild --no-test diff --git a/bibc/wscript b/bibc/wscript index 440abcbc08..a993cb3196 100644 --- a/bibc/wscript +++ b/bibc/wscript @@ -200,6 +200,8 @@ def check_c_compiler_options(self, options): @Configure.conf def check_optimization_cflags(self): + if self.env.ASTER_PLATFORM_MSVC64: + return self.setenv("debug") self.start_msg("Setting C debug flags") self.remove_optflags("CFLAGS") @@ -222,6 +224,8 @@ def check_optimization_cflags(self): @Configure.conf def check_optimization_cflags_msvc(self): + if not self.env.ASTER_PLATFORM_MSVC64: + return self.setenv("debug") self.start_msg("Setting C debug flags for MSVC") self.remove_optflags("CFLAGS") diff --git a/bibcxx/wscript b/bibcxx/wscript index 55642c120f..f105a04c23 100644 --- a/bibcxx/wscript +++ b/bibcxx/wscript @@ -135,6 +135,8 @@ def check_cxx_compiler_options(self, options): @Configure.conf def check_optimization_cxxflags(self): + if self.env.ASTER_PLATFORM_MSVC64: + return self.setenv("debug") self.start_msg("Setting C++ debug flags") self.define("ASTER_DEBUG_CXX", 1) @@ -158,6 +160,8 @@ def check_optimization_cxxflags(self): @Configure.conf def check_optimization_cxxflags_msvc(self): + if not self.env.ASTER_PLATFORM_MSVC64: + return self.setenv("debug") self.start_msg("Setting C++ debug flags for MSVC") self.define("ASTER_DEBUG_CXX", 1) diff --git a/bibfor/wscript b/bibfor/wscript index 8a1010e408..94a1e4e00d 100644 --- a/bibfor/wscript +++ b/bibfor/wscript @@ -453,6 +453,8 @@ def check_c_fortran_real8(self): @Configure.conf def check_optimization_fcflags(self): """Check for optimization FCFLAGS.""" + if self.env.ASTER_PLATFORM_MSVC64: + return self.setenv("debug") self.start_msg("Setting fortran debug flags") self.define("ASTER_DEBUG_FC", 1) @@ -535,6 +537,8 @@ def check_optimization_fcflags(self): @Configure.conf def check_optimization_fcflags_msvc(self): + if not self.env.ASTER_PLATFORM_MSVC64: + return self.setenv("debug") self.start_msg("Setting Fortran debug flags for IFort") self.remove_optflags("FCFLAGS")