[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.12 1.13 FindRecursiveA.cmake NONE 1.1 FindRecursiveB.cmake NONE 1.1 FindRecursiveC.cmake NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 3 10:40:09 EDT 2008


Update of /cvsroot/CMake/CMake/Tests/FindPackageTest
In directory public:/mounts/ram/cvs-serv15227/Tests/FindPackageTest

Modified Files:
	CMakeLists.txt 
Added Files:
	FindRecursiveA.cmake FindRecursiveB.cmake FindRecursiveC.cmake 
Log Message:
ENH: Help recursive find_package calls in modules

These changes teach find_package to behave nicely when invoked
recursively inside a find-module for the same package.  The module will
never be recursively loaded again.  Version arguments are automatically
forwarded.


--- NEW FILE: FindRecursiveB.cmake ---
FIND_PACKAGE(RecursiveB NAMES zot)

--- NEW FILE: FindRecursiveC.cmake ---
FIND_PACKAGE(RecursiveC NAMES zot)

--- NEW FILE: FindRecursiveA.cmake ---
FIND_PACKAGE(RecursiveA)

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/FindPackageTest/CMakeLists.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -C 2 -d -r1.12 -r1.13
*** CMakeLists.txt	10 Sep 2008 15:58:40 -0000	1.12
--- CMakeLists.txt	3 Oct 2008 14:40:06 -0000	1.13
***************
*** 39,42 ****
--- 39,43 ----
    VersionedA VersionedB
    wibbleA wibbleB
+   RecursiveA RecursiveB RecursiveC
    )
  FOREACH(p ${PACKAGES})
***************
*** 66,69 ****
--- 67,75 ----
  FIND_PACKAGE(wibbleB NAMES wibble HINTS B)
  
+ # Look for package with recursive find-modules.
+ FIND_PACKAGE(RecursiveA)
+ FIND_PACKAGE(RecursiveB 2)
+ FIND_PACKAGE(RecursiveC 3.1 EXACT)
+ 
  # Expected locations at which packages should be found.
  SET(foo_EXPECTED "lib/foo-1.2/foo-config.cmake")
***************
*** 83,86 ****
--- 89,95 ----
  SET(wibbleA_EXPECTED "A/wibble-config.cmake")
  SET(wibbleB_EXPECTED "B/wibble-config.cmake")
+ SET(RecursiveA_EXPECTED "lib/RecursiveA/recursivea-config.cmake")
+ SET(RecursiveB_EXPECTED "lib/zot-2.0/zot-config.cmake")
+ SET(RecursiveC_EXPECTED "lib/zot-3.1/zot-config.cmake")
  
  # Check the results.



More information about the Cmake-commits mailing list