Skip to content

Commit

Permalink
Add include guard for kassert target. (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklas-uhl authored Nov 30, 2023
1 parent e683aef commit f0873f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ project(
LANGUAGES CXX
)

# include guard to prevent duplicate targets when including this project as a subdirectory
if (TARGET kassert)
return()
endif ()

if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# folder support for IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Expand Down

0 comments on commit f0873f8

Please sign in to comment.