[gnome-builder/gnome-builder-41] cmake: avoid duplicate -DCMAKE_BUILD_TYPE args



commit 33ce4f9a18680ff7b2fa3585bac059ae446ec2a2
Author: Christian Hergert <chergert redhat com>
Date:   Thu Dec 2 14:51:32 2021 -0800

    cmake: avoid duplicate -DCMAKE_BUILD_TYPE args

 src/plugins/cmake/gbp-cmake-pipeline-addin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/cmake/gbp-cmake-pipeline-addin.c b/src/plugins/cmake/gbp-cmake-pipeline-addin.c
index 6335fdb38..d90fa887b 100644
--- a/src/plugins/cmake/gbp-cmake-pipeline-addin.c
+++ b/src/plugins/cmake/gbp-cmake-pipeline-addin.c
@@ -181,7 +181,8 @@ gbp_cmake_pipeline_addin_load (IdePipelineAddin *addin,
   ide_subprocess_launcher_push_argv (configure_launcher, ".");
   ide_subprocess_launcher_push_argv (configure_launcher, srcdir);
   ide_subprocess_launcher_push_argv (configure_launcher, "-DCMAKE_EXPORT_COMPILE_COMMANDS=1");
-  ide_subprocess_launcher_push_argv (configure_launcher, "-DCMAKE_BUILD_TYPE=RelWithDebInfo");
+  if (config_opts == NULL || strstr (config_opts, "-DCMAKE_BUILD_TYPE=") == NULL)
+    ide_subprocess_launcher_push_argv (configure_launcher, "-DCMAKE_BUILD_TYPE=RelWithDebInfo");
   ide_subprocess_launcher_push_argv (configure_launcher, prefix_option);
   if (crossbuild_file != NULL)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]