Skip to content
Snippets Groups Projects
Commit d4450875 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

feat : added default compile type to release

parent 1752e207
No related branches found
No related tags found
2 merge requests!93Release v0.3.0,!64Feat/release pip
...@@ -44,7 +44,17 @@ class CMakeBuild(build_ext): ...@@ -44,7 +44,17 @@ class CMakeBuild(build_ext):
os.chdir(str(build_temp)) os.chdir(str(build_temp))
compile_type = "Debug" # Impose to use the executable of the python
# used to launch setup.py to setup PythonInterp
python_executable = sys.executable
print(f"python executable :\t{python_executable}")
compile_type = (
"Release"
if "AIDGE_BUILD_TYPE" not in os.environ
else os.environ["AIDGE_BUILD_TYPE"]
)
install_path = ( install_path = (
os.path.join(sys.prefix, "lib", "libAidge") os.path.join(sys.prefix, "lib", "libAidge")
if "AIDGE_INSTALL" not in os.environ if "AIDGE_INSTALL" not in os.environ
...@@ -54,13 +64,13 @@ class CMakeBuild(build_ext): ...@@ -54,13 +64,13 @@ class CMakeBuild(build_ext):
[ [
"cmake", "cmake",
str(cwd), str(cwd),
f"-DPYTHON_EXECUTABLE={sys.executable}", f"-DPYTHON_EXECUTABLE={python_executable}",
"-DTEST=OFF", "-DTEST=OFF",
f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}", f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}",
f"-DCMAKE_BUILD_TYPE={compile_type}", f"-DCMAKE_BUILD_TYPE={compile_type}",
"-DPYBIND=ON", "-DPYBIND=ON",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON", "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
"-DCOVERAGE=OFF" "-DCOVERAGE=OFF",
] ]
) )
if not self.dry_run: if not self.dry_run:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment