From d5597ed262c5d503f6874c9920342608f028bbb4 Mon Sep 17 00:00:00 2001 From: Juan Hernando Vieites Date: Wed, 18 Oct 2017 17:00:42 +0200 Subject: [PATCH] Create projects-tests target for adding python tests if not existing --- CommonPythonCTest.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CommonPythonCTest.cmake b/CommonPythonCTest.cmake index 0c5b397..52a1781 100644 --- a/CommonPythonCTest.cmake +++ b/CommonPythonCTest.cmake @@ -60,6 +60,9 @@ if(NOT TARGET ${PROJECT_NAME}-pythontests) set_target_properties(${PROJECT_NAME}-pythontests PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER "Tests") + if(NOT TARGET ${PROJECT_NAME}-tests) + add_custom_target(${PROJECT_NAME}-tests) + endif() add_dependencies(${PROJECT_NAME}-tests ${PROJECT_NAME}-pythontests) add_dependencies(tests ${PROJECT_NAME}-tests) endif()