Skip to content

Commit

Permalink
must fallback to _IS_TOP_LEVEL
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 9, 2024
1 parent 3228e05 commit 938c7a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/compilers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if(${PROJECT_NAME}_COVERAGE)
endif()

# --- clang-tidy
if(tidy AND PROJECT_IS_TOP_LEVEL)
if(tidy AND ${PROJECT_NAME}_IS_TOP_LEVEL)
find_program(CLANG_TIDY_EXE NAMES "clang-tidy" REQUIRED)
set(CMAKE_C_CLANG_TIDY ${CLANG_TIDY_EXE})
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE})
Expand Down
4 changes: 2 additions & 2 deletions options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(GNUInstallDirs)
if(CMAKE_VERSION VERSION_LESS 3.21)
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
if(NOT not_top)
set(PROJECT_IS_TOP_LEVEL true)
set(${PROJECT_NAME}_IS_TOP_LEVEL true)
endif()
endif()

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

option(CMAKE_TLS_VERIFY "Verify TLS certificates" on)

option(h5fortran_BUILD_TESTING "build tests" ${PROJECT_IS_TOP_LEVEL})
option(${PROJECT_NAME}_BUILD_TESTING "build tests" ${${PROJECT_NAME}_IS_TOP_LEVEL})

set_property(DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED true)

Expand Down

0 comments on commit 938c7a8

Please sign in to comment.