aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/ECMMarkAsTest.cmake4
1 files changed, 1 insertions, 3 deletions
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()