From a9eaf35b43fae7fab40b2dfb6a3c46759c53d332 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 29 Sep 2021 10:08:56 +0200 Subject: [PATCH] check whether targetname exists --- tests/src/fsfw_tests/unit/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/src/fsfw_tests/unit/CMakeLists.txt b/tests/src/fsfw_tests/unit/CMakeLists.txt index 01e4d19c..a0712ee1 100644 --- a/tests/src/fsfw_tests/unit/CMakeLists.txt +++ b/tests/src/fsfw_tests/unit/CMakeLists.txt @@ -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