summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2010-01-25 02:19:00 +0100
committerPino Toscano <pino@kde.org>2010-01-25 02:19:00 +0100
commit1b5333f2685b8ab85bb1f5b899332c5a0ac99a3d (patch)
tree570352ccc35ea727c81ce1fbefc6de5a85dfea07 /cmake
parent92e1f46866c063c370ef1d6324f6a6c01aed6680 (diff)
[CMake] allow multiple targets with the same name
this is needed for building the unit tests later without explicitly having enabling them at configure time (thus compile them on-demand) for this, set the cmake policy 0003 as OLD (allow), and consecuently 0011 for setting the former from an include()d script
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/PopplerDefaults.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/modules/PopplerDefaults.cmake b/cmake/modules/PopplerDefaults.cmake
index 6ffac472..b0374cf9 100644
--- a/cmake/modules/PopplerDefaults.cmake
+++ b/cmake/modules/PopplerDefaults.cmake
@@ -8,3 +8,10 @@ set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
# colored output
set(CMAKE_COLOR_MAKEFILE ON)
+# CMake policy #0002: we can have multiple targets with the same name (for the unit tests)
+cmake_policy(SET CMP0002 OLD)
+# CMake policy #0011 (>= 2.6.3): make policy changes (as done here) taking effect for all the tree
+if(POLICY CMP0011)
+ cmake_policy(SET CMP0011 OLD)
+endif(POLICY CMP0011)
+