Skip to content

Commit

Permalink
cmake: correct < 3.21 logic
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 10, 2024
1 parent 987cc69 commit cbdf7fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion options.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
if(CMAKE_VERSION VERSION_LESS 3.21)
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
if(NOT not_top)
if(not_top)
set(${PROJECT_NAME}_IS_TOP_LEVEL false)
else()
set(${PROJECT_NAME}_IS_TOP_LEVEL true)
endif()
endif()
Expand Down

0 comments on commit cbdf7fc

Please sign in to comment.