Skip to content

Commit 93e9628

Browse files
committed
Take TFEL_DIR into account in FindTFEL. Update check.yml
1 parent 0a466a1 commit 93e9628

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

.github/workflows/check.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ jobs:
3131
run: |
3232
# spack load python py-numpy py-pybind11
3333
spack load tfel
34-
cmake -DCMAKE_BUILD_TYPE=Release . \
35-
-Denable-c-bindings=ON \
36-
-Denable-fortran-bindings=ON \
37-
-Denable-python-bindings=OFF \
38-
-Denable-portable-build=ON \
39-
-Denable-julia-bindings=OFF
34+
cmake -DCMAKE_BUILD_TYPE=Release . \
35+
-Denable-c-bindings=ON \
36+
-Denable-fortran-bindings=ON \
37+
-Denable-python-bindings=OFF \
38+
-Denable-portable-build=ON \
39+
-Denable-julia-bindings=OFF \
40+
-DTFEL_DIR=`spack location -i tfel`/share/tfel/cmake
4041
- name: make
4142
shell: spack-sh {0}
4243
run: |

cmake/modules/FindTFEL.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
# - TFEL_CXX_STANDARD
1212
# - TFEL_VERSION
1313

14-
if(DEFINED ENV{TFELHOME})
15-
set(TFELHOME $ENV{TFELHOME})
14+
if(DEFINED TFEL_DIR)
15+
set(TFELHOME "${TFEL_DIR}")
16+
else()
17+
if(DEFINED ENV{TFELHOME})
18+
set(TFELHOME "$ENV{TFELHOME}")
19+
endif()
1620
endif()
1721
message(STATUS "tfelhome: ${TFELHOME}")
1822

0 commit comments

Comments
 (0)