From: Alec Leamas Date: Sun, 12 May 2024 16:18:25 +0200 Subject: tests/CMakeLists: avoid crash w disabled tests --- tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c1429bf..4e240f2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,10 @@ if (NOT UNIX) message(FATAL_ERROR, "CATKIN_TESTING is only available on UNIX/MacOS") endif() +if (NOT CATKIN_ENABLE_TESTING) + return() +endif() + find_package(catkin REQUIRED) if (APPLE)