Skip to content

Commit 5096e0d

Browse files
committed
pixi: Don't use task argument
Task argument are removing the possibility to append argument.
1 parent 6d413c4 commit 5096e0d

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

pixi.toml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,20 @@ CCACHE_SLOPPINESS = "include_file_ctime,include_file_mtime,pch_defines,time_macr
6969
[tasks]
7070
# We must avoid to set CMAKE_CXX_FLAGS because of WIN32
7171
# https://discourse.cmake.org/t/strictly-appending-to-cmake-lang-flags/6478
72-
configure = { args = [
73-
{ arg = "build_dir", default = "build" },
74-
{ arg = "build_type", default = "$EIGENPY_BUILD_TYPE" },
75-
{ arg = "python_stubs", default = "$EIGENPY_PYTHON_STUBS" },
76-
{ arg = "cholmod_support", default = "$EIGENPY_CHOLMOD_SUPPORT" },
77-
{ arg = "accelerate_support", default = "$EIGENPY_ACCELERATE_SUPPORT" },
78-
], cmd = [
72+
configure = { cmd = [
7973
"CXXFLAGS=$EIGENPY_CXX_FLAGS",
8074
"cmake",
8175
"-G",
8276
"Ninja",
8377
"-B",
84-
"{{ build_dir }}",
78+
"build",
8579
"-S",
8680
".",
8781
"-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX",
88-
"-DCMAKE_BUILD_TYPE={{ build_type }}",
89-
"-DGENERATE_PYTHON_STUBS={{ python_stubs }}",
90-
"-DBUILD_WITH_CHOLMOD_SUPPORT={{ cholmod_support }}",
91-
"-DBUILD_WITH_ACCELERATE_SUPPORT={{ accelerate_support }}",
82+
"-DCMAKE_BUILD_TYPE=$EIGENPY_BUILD_TYPE",
83+
"-DGENERATE_PYTHON_STUBS=$EIGENPY_PYTHON_STUBS",
84+
"-DBUILD_WITH_CHOLMOD_SUPPORT=$EIGENPY_CHOLMOD_SUPPORT",
85+
"-DBUILD_WITH_ACCELERATE_SUPPORT=$EIGENPY_ACCELERATE_SUPPORT",
9286
] }
9387
build = { cmd = "cmake --build build --target all", depends-on = ["configure"] }
9488
clean = { cmd = "rm -rf build" }
@@ -105,14 +99,23 @@ tasks = { lint = { cmd = "pre-commit run --all" } }
10599
tomlkit = ">=0.13.2"
106100

107101
[feature.new-version.tasks]
102+
configure-new-version = { cmd = [
103+
"CXXFLAGS=$EIGENPY_CXX_FLAGS",
104+
"cmake",
105+
"-G",
106+
"Ninja",
107+
"-B",
108+
"build_new_version",
109+
"-S",
110+
".",
111+
"-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX",
112+
"-DCMAKE_BUILD_TYPE=$EIGENPY_BUILD_TYPE",
113+
"-DGENERATE_PYTHON_STUBS=ON",
114+
"-DBUILD_WITH_CHOLMOD_SUPPORT=ON",
115+
"-DBUILD_WITH_ACCELERATE_SUPPORT=OFF",
116+
] }
108117
release-new-version = { cmd = "VERSION=$EIGENPY_VERSION cmake --build build_new_version --target release", depends-on = [
109-
{ task = "configure", args = [
110-
{ build_type = "Release" },
111-
{ build_dir = "build_new_version" },
112-
{ python_stubs = "ON" },
113-
{ accelerate_support = "OFF" },
114-
{ cholmod_support = "ON" },
115-
] },
118+
"configure-new-version",
116119
] }
117120

118121
# Cholmod support

0 commit comments

Comments
 (0)