Skip to content
Snippets Groups Projects

Adding option to automatically installation

Merged Christoph Alt requested to merge ob28imeq/pystencils-sfg:cmake_setup into master
All threads resolved!

This extends FindPystencilsSfG.cmake with a Cache Variable CODEGEN_PRIVATE_VENV. This is set by default and if activate it creates a python venv and installs either dependencies from a requirements.txt or if this is not present it downloads the latest pystenicls-sfg/pystencils versions. If a custom Interpreter is passed to cmake this deactivated.

In external CMake Projects this files could by included via

## Pystencils-sfg setups
set(FIND_PYSTENCILSSFG_CMAKE_PATH "${CMAKE_BINARY_DIR}/_pystencilssfg-cmake/")
file(DOWNLOAD
    "https://i10git.cs.fau.de/ob28imeq/pystencils-sfg/-/raw/cmake_setup/src/pystencilssfg/cmake/FindPystencilsSfg.cmake?ref_type=heads"
    "${FIND_PYSTENCILSSFG_CMAKE_PATH}/FindPystencilsSfg.cmake"
)

SET ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${FIND_PYSTENCILSSFG_CMAKE_PATH})

find_package( PystencilsSfg REQUIRED )

Merge request reports

Pipeline #74371 passed

Pipeline passed for c1058bdb on ob28imeq:cmake_setup

Test coverage 86.00% (0.00%) from 2 jobs
Checking approval status

Merged by Frederik HennigFrederik Hennig 3 weeks ago (Feb 21, 2025 11:16am UTC)

Loading

Pipeline #74375 passed

Pipeline passed for 25ad35e8 on master

Test coverage 86.00% (0.00%) from 2 jobs

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply