From 9f210d5fe323fcd16e71f70cee81d85e2ba8eeb0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me>
Date: Thu, 4 Jul 2024 14:58:36 +0200
Subject: [PATCH] feat : now uses Ninja as default compiler

---
 pyproject.toml | 1 +
 setup.py       | 8 ++------
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 2ce86403c..4b91d05a8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -21,6 +21,7 @@ test = [
 
 [build-system]
 requires = [
+    "ninja>=1.10.1",
     "setuptools>=64",
     "setuptools_scm[toml]==7.1.0",
     "cmake>=3.27.9",
diff --git a/setup.py b/setup.py
index 43c2ebd8a..71a29afbf 100644
--- a/setup.py
+++ b/setup.py
@@ -51,15 +51,11 @@ class CMakeBuild(build_ext):
             if "AIDGE_INSTALL" not in os.environ
             else os.environ["AIDGE_INSTALL"]
         )
-        cmake_type_opts = (
-            ["-G", os.environ.get("AIDGE_BUILD_GEN")]
-            if "AIDGE_BUILD_GEN" in os.environ
-            else []
-        )
+        
         self.spawn(
             [
                 "cmake",
-                *cmake_type_opts,
+                "-GNinja", # using ninja as build system to build faster and with the same compiler as on windows
                 str(cwd),
                 "-DTEST=OFF",
                 f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}",
-- 
GitLab