[poppler] 2 commits - cmake/modules

Pino Toscano pino at kemper.freedesktop.org
Sun Jan 24 17:21:20 PST 2010

 cmake/modules/PopplerDefaults.cmake |    7 +++++++
 cmake/modules/PopplerMacros.cmake   |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 1b5333f2685b8ab85bb1f5b899332c5a0ac99a3d
Author: Pino Toscano <pino at kde.org>
Date:   Mon Jan 25 02:19:00 2010 +0100

    [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

diff --git a/cmake/modules/PopplerDefaults.cmake b/cmake/modules/PopplerDefaults.cmake
index 6ffac47..b0374cf 100644
--- a/cmake/modules/PopplerDefaults.cmake
+++ b/cmake/modules/PopplerDefaults.cmake
 # colored output
+# 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)
commit 92e1f46866c063c370ef1d6324f6a6c01aed6680
Author: Pino Toscano <pino at kde.org>
Date:   Mon Jan 25 02:15:27 2010 +0100

    [CMake] do not add the fake buildtests target for the MSVC IDE

diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index a421f60..f8a0b64 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -12,14 +12,14 @@ macro(POPPLER_ADD_TEST exe build_flag)
   add_executable(${exe} ${_add_executable_param} ${ARGN})
   # if the tests are EXCLUDE_FROM_ALL, add a target "buildtests" to build all tests
-  if(NOT build_test)
+  if(NOT build_test AND NOT MSVC_IDE)
     get_directory_property(_buildtestsAdded BUILDTESTS_ADDED)
     if(NOT _buildtestsAdded)
       set_directory_properties(PROPERTIES BUILDTESTS_ADDED TRUE)
     endif(NOT _buildtestsAdded)
     add_dependencies(buildtests ${exe})
-  endif(NOT build_test)
+  endif(NOT build_test AND NOT MSVC_IDE)
 macro(POPPLER_ADD_UNITTEST exe build_flag)

More information about the poppler mailing list