Skip to content

Commit 942cabd

Browse files
committed
correct is_top_level
1 parent 938c7a8 commit 942cabd

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ env:
55
CTEST_NO_TESTS_ACTION: error
66
CTEST_PARALLEL_LEVEL: 4
77
CMAKE_BUILD_PARALLEL_LEVEL: 4
8+
CMAKE_INSTALL_PREFIX: ~/libs
9+
CMAKE_PREFIX_PATH: ~/libs
810

911
on:
1012
push:
@@ -70,7 +72,6 @@ jobs:
7072
- name: Configure
7173
run: >-
7274
cmake --preset multi
73-
--install-prefix ${{ runner.temp }}
7475
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
7576
7677
- name: Build / test Debug
@@ -83,7 +84,7 @@ jobs:
8384
run: cmake --install build
8485

8586
- name: example workflow
86-
run: cmake -S example -B example/build -DCMAKE_PREFIX_PATH=${{ runner.temp }}
87+
run: cmake -S example -B example/build
8788

8889
- run: cmake --build example/build
8990

.github/workflows/ci_build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: build
33
env:
44
HOMEBREW_NO_INSTALL_CLEANUP: 1
55
CTEST_NO_TESTS_ACTION: error
6-
FC: gfortran-13
76
CTEST_PARALLEL_LEVEL: 0
87
CMAKE_BUILD_PARALLEL_LEVEL: 4
98
CMAKE_INSTALL_PREFIX: ~/libs
@@ -30,6 +29,9 @@ jobs:
3029
- os: macos-latest
3130
shared: false
3231

32+
env:
33+
FC: gfortran-13
34+
3335
runs-on: ${{ matrix.os}}
3436

3537
steps:
@@ -39,7 +41,6 @@ jobs:
3941
run: >-
4042
cmake
4143
-S scripts -B scripts/build
42-
--install-prefix ${{ runner.temp }}
4344
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
4445
4546
- name: Build/install HDF5

options.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ include(GNUInstallDirs)
55
# this is NECESSARY for CMake 3.21 -- parent projects will error on CMake configure!
66
if(CMAKE_VERSION VERSION_LESS 3.21)
77
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
8-
if(NOT not_top)
8+
if(not_top)
9+
set(${PROJECT_NAME}_IS_TOP_LEVEL false)
10+
else()
911
set(${PROJECT_NAME}_IS_TOP_LEVEL true)
1012
endif()
1113
endif()

0 commit comments

Comments
 (0)