Skip to content

Commit e96e93a

Browse files
authored
Merge pull request #469 from JulienDoerner/master
add python_install_package as ccmake option, adapt example test
2 parents 3498d82 + 76fef90 commit e96e93a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.github/workflows/test_examples.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
mkdir build
3535
cd build
36-
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DENABLE_PYTHON=True -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native
36+
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DENABLE_PYTHON=True -DPython_EXECUTABLE=${{ matrix.config.py }} -DENABLE_TESTING=Off -DENABLE_SWIG_BUILTIN=${{ matrix.config.swig_builtin }} -DSIMD_EXTENSIONS=native -DPython_INSTALL_PACKAGE_DIR=/home/runner/.local/
3737
- name: Build CRPropa
3838
run: |
3939
cd build

CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,7 @@ if(ENABLE_PYTHON AND Python_FOUND)
466466

467467

468468
# use Python_INSTALL_PACKAGE_DIR if provided; otherwise, install in Python_SITELIB
469-
if(NOT DEFINED Python_INSTALL_PACKAGE_DIR)
470-
set(Python_INSTALL_PACKAGE_DIR "${Python_SITELIB}")
471-
endif(NOT DEFINED Python_INSTALL_PACKAGE_DIR)
469+
set(Python_INSTALL_PACKAGE_DIR "${Python_SITELIB}" CACHE PATH "folder in which the python package is installed")
472470
message(STATUS " package install directory: ${Python_INSTALL_PACKAGE_DIR}")
473471

474472

0 commit comments

Comments
 (0)