check whether targetname exists

This commit is contained in:
Robin Müller 2021-09-29 10:08:56 +02:00
parent de0e687cbb
commit a9eaf35b43
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,9 @@
if(NOT TARGET_NAME)
message(WARNING
"TARGET_NAME needs to be defined because the Catch2 sources will be added to it"
)
endif()
target_sources(${TARGET_NAME} PRIVATE
CatchDefinitions.cpp
CatchFactory.cpp