cmake/modules/PopplerDefaults.cmake | 7 +++++++ cmake/modules/PopplerMacros.cmake | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 1b5333f2685b8ab85bb1f5b899332c5a0ac99a3d Author: Pino Toscano <[email protected]> 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 @@ -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) + commit 92e1f46866c063c370ef1d6324f6a6c01aed6680 Author: Pino Toscano <[email protected]> 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) add_custom_target(buildtests) 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) endmacro(POPPLER_ADD_TEST) macro(POPPLER_ADD_UNITTEST exe build_flag) _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
