From 6a8fd03a31f0e6ff180d219c4477ac4ce3ce0181 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Thu, 16 Feb 2012 13:38:03 +0100 Subject: Simply test for the target, no need for the global property. This was probably added before if() supported testing for targets. Ale --- modules/ECMMarkAsTest.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'modules/ECMMarkAsTest.cmake') diff --git a/modules/ECMMarkAsTest.cmake b/modules/ECMMarkAsTest.cmake index 4ab88160..f1e53e4b 100644 --- a/modules/ECMMarkAsTest.cmake +++ b/modules/ECMMarkAsTest.cmake @@ -12,10 +12,8 @@ # all tests by invoking the 'buildtests' target. if (NOT BUILD_TESTING) - get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED) - if(NOT _buildtestsAdded) + if(NOT TARGET buildtests) add_custom_target(buildtests) - set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE) endif() endif() -- cgit v1.2.1