Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions exports/taskfiles/utils/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,6 @@ tasks:
# project's CMake settings file should be stored.
# @param {string[]} [CMAKE_TARGETS] A list of specific targets to build instead of the default
# target.
#
# Directory parameters
# @param {string} [BUILD_DIR={{.WORK_DIR}}/{{.NAME}}-build] Directory in which to generate the
# build system and perform the build.
# @param {string} [INSTALL_PREFIX={{.WORK_DIR}}/{{.NAME}}-install] Path prefix of where the
# project should be installed.
# @param {string} [SOURCE_DIR={{.WORK_DIR}}/{{.NAME}}-src] Directory in which to extract the tar
# file.
install-remote-tar:
internal: true
label: "{{.TASK}}:{{.NAME}}-{{.TAR_URL}}-{{.INSTALL_PREFIX}}"
Expand All @@ -175,12 +167,9 @@ tasks:
ref: "default (list) .CMAKE_TARGETS"

# Directory parameters
BUILD_DIR: >-
{{default (printf "%s/%s-build" .WORK_DIR .NAME) .BUILD_DIR}}
INSTALL_PREFIX: >-
{{default (printf "%s/%s-install" .WORK_DIR .NAME) .INSTALL_PREFIX}}
SOURCE_DIR: >-
{{default (printf "%s/%s-src" .WORK_DIR .NAME) .SOURCE_DIR}}
BUILD_DIR: "{{.WORK_DIR}}/{{.NAME}}-build"
INSTALL_PREFIX: "{{.WORK_DIR}}/{{.NAME}}-install"
SOURCE_DIR: "{{.WORK_DIR}}/{{.NAME}}-src"
Comment on lines +170 to +172
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Clarify fixed directory paths and update documentation.
We’ve removed the ability to override BUILD_DIR, INSTALL_PREFIX, and SOURCE_DIR in favour of always placing them under WORK_DIR. Please update the task’s doc comments (and any examples/README) to remove references to these as overridable parameters, and consider adding an inline note here to explain that these paths are now fixed.

🤖 Prompt for AI Agents
In exports/taskfiles/utils/cmake.yaml around lines 170 to 172, the variables
BUILD_DIR, INSTALL_PREFIX, and SOURCE_DIR are now fixed to be under WORK_DIR and
cannot be overridden. Update the task's documentation comments and any related
examples or README files to remove mentions of these as overridable parameters.
Additionally, add an inline comment near these lines explaining that these
directory paths are fixed and always relative to WORK_DIR.


requires:
vars: ["NAME", "TAR_SHA256", "TAR_URL", "WORK_DIR"]
Expand Down