diff --git a/pyproject.toml b/pyproject.toml
index 2ce86403ca5764c3709e7efa636d886cf5752607..4b91d05a8429426fc37472a1dba01208bae39a07 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 43c2ebd8a7b79203133b5b0d1759ab39d142e7f9..71a29afbf15790a59293e49d294de8357c50b8b2 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}",