From 282185e5c8ad451f94a14e3f962684a244b56062 Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Tue, 17 Oct 2023 15:58:44 +0200
Subject: [PATCH] Fixed build issue

---
 CMakeLists.txt | 5 -----
 setup.py       | 7 ++++---
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51ee1f6d..51a6ebe1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,11 +12,6 @@ set(module_name _${project}) # target name
 
 project(${project})
 
-##############################################
-# Import utils CMakeLists
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
-include(PybindModuleCreation)
-
 ##############################################
 # Define options
 option(PYBIND "python binding" ON)
diff --git a/setup.py b/setup.py
index b88329e5..60807df5 100644
--- a/setup.py
+++ b/setup.py
@@ -66,12 +66,13 @@ class CMakeBuild(build_ext):
         # used to launch setup.py to setup PythonInterp
         param_py = "-DPYTHON_EXECUTABLE=" + sys.executable
 
+        compile_type = 'Debug'
         install_path = os.path.join(sys.prefix, "lib", "libAidge")  if "AIDGE_INSTALL" not in os.environ else os.environ["AIDGE_INSTALL"]
 
-        self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}'])
+        self.spawn(['cmake', str(cwd), param_py, '-DTEST=OFF', f'-DCMAKE_INSTALL_PREFIX:PATH={install_path}', f'-DCMAKE_BUILD_TYPE={compile_type}'])
         if not self.dry_run:
-            self.spawn(['cmake', '--build', '.', '--config', 'Debug', '-j', max_jobs])
-            self.spawn(['cmake', '--install', '.', '--config', 'Debug'])
+            self.spawn(['cmake', '--build', '.', '--config', compile_type, '-j', max_jobs])
+            self.spawn(['cmake', '--install', '.', '--config', compile_type])
         os.chdir(str(cwd))
 
         aidge_package = build_lib / (get_project_name())
-- 
GitLab