Skip to content
Snippets Groups Projects
Commit 9692ff11 authored by Christophe Guillon's avatar Christophe Guillon
Browse files

[Setup] Allow empty AIDGE_BUILD_GEN type

If AIDGE_BUILD_GEN= is in environment the default build backend
is used.
parent ac291c3f
No related branches found
No related tags found
2 merge requests!212Version 0.3.0,!154[Setup] Add support for development install
This commit is part of merge request !154. Comments created here will be created in the context of that merge request.
......@@ -41,27 +41,23 @@ class CMakeBuild(build_ext):
os.chdir(str(build_temp))
compile_type = (
"Release"
if "AIDGE_PYTHON_BUILD_TYPE" not in os.environ
else os.environ["AIDGE_PYTHON_BUILD_TYPE"]
)
compile_type = os.environ.get("AIDGE_PYTHON_BUILD_TYPE", "Release")
install_path = (
os.path.join(sys.prefix, "lib", "libAidge")
if "AIDGE_INSTALL" not in os.environ
else os.environ["AIDGE_INSTALL"]
)
build_gen = (
["-G", os.environ["AIDGE_BUILD_GEN"]]
if "AIDGE_BUILD_GEN" in os.environ
build_gen = os.environ.get("AIDGE_BUILD_GEN", "")
build_gen_opts = (
["-G", build_gen]
if build_gen
else []
)
self.spawn(
[
"cmake",
*build_gen,
*build_gen_opts,
str(cwd),
"-DTEST=OFF",
f"-DCMAKE_INSTALL_PREFIX:PATH={install_path}",
......
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