[poppler] cmake/modules
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Nov 8 07:29:15 UTC 2017
cmake/modules/PopplerMacros.cmake | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 6ae4293fce77290f4fbdc643c999809d5924bf2c
Author: Roland Hieber <r.hieber at pengutronix.de>
Date: Wed Nov 8 08:22:01 2017 +0100
CMake: add the custom buildtests target only once
Make BUILDTESTS_ADDED a global property, so the `buildtests` target gets added only once. As far as I understood, this seems to fulfil the requirements of CMP0002.
Bug #103003
diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index aa5ca6de..ccb27904 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -13,10 +13,10 @@ macro(POPPLER_ADD_TEST exe build_flag)
# if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
if(NOT build_test AND NOT MSVC_IDE)
- get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
+ get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED)
if(NOT _buildtestsAdded)
add_custom_target(buildtests)
- set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
+ set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE)
endif(NOT _buildtestsAdded)
add_dependencies(buildtests ${exe})
endif(NOT build_test AND NOT MSVC_IDE)
@@ -33,10 +33,10 @@ macro(POPPLER_ADD_UNITTEST exe build_flag)
# if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
if(NOT build_test)
- get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
+ get_property(_buildtestsAdded GLOBAL PROPERTY BUILDTESTS_ADDED)
if(NOT _buildtestsAdded)
add_custom_target(buildtests)
- set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
+ set_property(GLOBAL PROPERTY BUILDTESTS_ADDED TRUE)
endif(NOT _buildtestsAdded)
add_dependencies(buildtests ${exe})
endif(NOT build_test)
More information about the poppler
mailing list