Skip to content

Commit 938c7a8

Browse files
committed
must fallback to _IS_TOP_LEVEL
1 parent 3228e05 commit 938c7a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmake/compilers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if(${PROJECT_NAME}_COVERAGE)
6060
endif()
6161

6262
# --- clang-tidy
63-
if(tidy AND PROJECT_IS_TOP_LEVEL)
63+
if(tidy AND ${PROJECT_NAME}_IS_TOP_LEVEL)
6464
find_program(CLANG_TIDY_EXE NAMES "clang-tidy" REQUIRED)
6565
set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE})
6666
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE})

options.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include(GNUInstallDirs)
66
if(CMAKE_VERSION VERSION_LESS 3.21)
77
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
88
if(NOT not_top)
9-
set(PROJECT_IS_TOP_LEVEL true)
9+
set(${PROJECT_NAME}_IS_TOP_LEVEL true)
1010
endif()
1111
endif()
1212

@@ -20,7 +20,7 @@ option(concepts "conceptual testing, for devs only" off)
2020

2121
option(CMAKE_TLS_VERIFY "Verify TLS certificates" on)
2222

23-
option(h5fortran_BUILD_TESTING "build tests" ${PROJECT_IS_TOP_LEVEL})
23+
option(${PROJECT_NAME}_BUILD_TESTING "build tests" ${${PROJECT_NAME}_IS_TOP_LEVEL})
2424

2525
set_property(DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED true)
2626

0 commit comments

Comments
 (0)