[Cmake-commits] CMake branch, next, updated. v2.8.5-1366-g318d4fa

Alexander Neundorf neundorf at kde.org
Mon Aug 1 16:35:28 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  318d4fa36b5d56b6965784a4ab3c65e7475d40ef (commit)
       via  825c45739d888cd5fe43875a9e0497c7b389ae70 (commit)
       via  e159bb5bf80eba01d2244e2ef1333b145c2375fe (commit)
       via  da1bdaf16a60d3822f15feb1b1a9d624ae357705 (commit)
       via  217d068b6d131247b1fbae1ec901c942b30f7f80 (commit)
      from  622a9fbe6532f5bb4aa101bebacdbad66218c9e0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=318d4fa36b5d56b6965784a4ab3c65e7475d40ef
commit 318d4fa36b5d56b6965784a4ab3c65e7475d40ef
Merge: 622a9fb 825c457
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Mon Aug 1 16:35:26 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Aug 1 16:35:26 2011 -0400

    Merge topic 'FindPostgresqlImprovements' into next
    
    825c457 FindPostgreSQL: fix PATH_SUFFIXES, better output for FPHSA
    e159bb5 Mark the results from find() as advanced
    da1bdaf Use FPHSA(), remove unnecessary stuff and don't recommend link_directories()
    217d068 More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=825c45739d888cd5fe43875a9e0497c7b389ae70
commit 825c45739d888cd5fe43875a9e0497c7b389ae70
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Jul 29 21:13:52 2011 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Mon Aug 1 22:32:21 2011 +0200

    FindPostgreSQL: fix PATH_SUFFIXES, better output for FPHSA
    
    Alex

diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 0445090..55f95c6 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -125,10 +125,9 @@ find_path(PostgreSQL_TYPE_INCLUDE_DIR
    # Look in other places.
    ${PostgreSQL_ROOT_DIRECTORIES}
   PATH_SUFFIXES
-    server
-    pgsql
-    postgresql
-    include
+    pgsql/server
+    postgresql/server
+    include/server
   # Help the user find it if we cannot.
   DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
 )
@@ -154,7 +153,7 @@ get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
 # Did we find anything?
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(PostgreSQL DEFAULT_MSG
-                                  PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY)
+                                  PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)
 
 set( PostgreSQL_FOUND  ${POSTGRESQL_FOUND})
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e159bb5bf80eba01d2244e2ef1333b145c2375fe
commit e159bb5bf80eba01d2244e2ef1333b145c2375fe
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Mon Aug 1 22:27:50 2011 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Mon Aug 1 22:32:18 2011 +0200

    Mark the results from find() as advanced
    
    Alex

diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 3f73001..0445090 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -169,3 +169,5 @@ if(PostgreSQL_FOUND)
   #message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}")
   #message("Final PostgreSQL libraries:   ${PostgreSQL_LIBRARIES}")
 endif(PostgreSQL_FOUND)
+
+mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY )

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=da1bdaf16a60d3822f15feb1b1a9d624ae357705
commit da1bdaf16a60d3822f15feb1b1a9d624ae357705
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Jul 28 23:19:52 2011 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Mon Aug 1 22:30:47 2011 +0200

    Use FPHSA(), remove unnecessary stuff and don't recommend link_directories()
    
    -don't recommend using link_directories()
    -don't do the extra if(EXISTS) checks, since the code is already inside a if(PostgreSQL_FOUND)
    
    Alex

diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 3595b4d..3f73001 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -7,7 +7,6 @@
 # ...
 # if( PostgreSQL_FOUND )
 #   include_directories(${PostgreSQL_INCLUDE_DIRS})
-#   link_directories(${PostgreSQL_LIBRARY_DIRS})
 # endif( PostgreSQL_FOUND )
 # ...
 # Remember to include ${PostgreSQL_LIBRARIES} in the target_link_libraries() statement.
@@ -153,49 +152,20 @@ find_library( PostgreSQL_LIBRARY
 get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH)
 
 # Did we find anything?
-set( PostgreSQL_FOUND 0 )
-if ( EXISTS "${PostgreSQL_INCLUDE_DIR}" AND EXISTS "${PostgreSQL_LIBRARY_DIR}" )
-  set( PostgreSQL_FOUND 1 )
-else ( EXISTS "${PostgreSQL_INCLUDE_DIR}" AND EXISTS "${PostgreSQL_LIBRARY_DIR}" )
-  if ( POSTGRES_REQUIRED )
-    message( FATAL_ERROR "PostgreSQL is required. ${PostgreSQL_ROOT_DIR_MESSAGE}" )
-  endif ( POSTGRES_REQUIRED )
-endif (EXISTS "${PostgreSQL_INCLUDE_DIR}" AND EXISTS "${PostgreSQL_LIBRARY_DIR}" )
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PostgreSQL DEFAULT_MSG
+                                  PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY)
+
+set( PostgreSQL_FOUND  ${POSTGRESQL_FOUND})
 
 # Now try to get the include and library path.
 if(PostgreSQL_FOUND)
 
-  if(EXISTS "${PostgreSQL_INCLUDE_DIR}")
-    set(PostgreSQL_INCLUDE_DIRS
-      ${PostgreSQL_INCLUDE_DIR}
-    )
-  endif(EXISTS "${PostgreSQL_INCLUDE_DIR}")
-
-  if(EXISTS "${PostgreSQL_TYPE_INCLUDE_DIR}")
-    list(APPEND PostgreSQL_INCLUDE_DIRS
-      ${PostgreSQL_TYPE_INCLUDE_DIR}
-    )
-  endif(EXISTS "${PostgreSQL_TYPE_INCLUDE_DIR}")
-
-
-  if(EXISTS "${PostgreSQL_LIBRARY_DIR}")
-    set(PostgreSQL_LIBRARY_DIRS
-      ${PostgreSQL_LIBRARY_DIR}
-    )
-    set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
-  endif(EXISTS "${PostgreSQL_LIBRARY_DIR}")
+  set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} )
+  set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
+  set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})
 
   #message("Final PostgreSQL include dir: ${PostgreSQL_INCLUDE_DIRS}")
   #message("Final PostgreSQL library dir: ${PostgreSQL_LIBRARY_DIRS}")
   #message("Final PostgreSQL libraries:   ${PostgreSQL_LIBRARIES}")
 endif(PostgreSQL_FOUND)
-
-if(NOT PostgreSQL_FOUND)
-  if(NOT PostgreSQL_FIND_QUIETLY)
-    message(STATUS "PostgreSQL was not found. ${PostgreSQL_DIR_MESSAGE}")
-  else(NOT PostgreSQL_FIND_QUIETLY)
-    if(PostgreSQL_FIND_REQUIRED)
-      message(FATAL_ERROR "PostgreSQL was not found. ${PostgreSQL_DIR_MESSAGE}")
-    endif(PostgreSQL_FIND_REQUIRED)
-  endif(NOT PostgreSQL_FIND_QUIETLY)
-endif(NOT PostgreSQL_FOUND)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=217d068b6d131247b1fbae1ec901c942b30f7f80
commit 217d068b6d131247b1fbae1ec901c942b30f7f80
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Thu Jul 28 23:14:52 2011 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Mon Aug 1 22:30:20 2011 +0200

    More PATH_SUFFIXES for finding Postgresql and also search catalog/pg_type.h
    
    Patch from Jaroslaw Staniek, reviewed by Andrew Maclean
    
    Alex

diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 96b6741..3595b4d 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -113,6 +113,21 @@ find_path(PostgreSQL_INCLUDE_DIR
    # Look in other places.
    ${PostgreSQL_ROOT_DIRECTORIES}
   PATH_SUFFIXES
+    pgsql
+    postgresql
+    include
+  # Help the user find it if we cannot.
+  DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
+)
+
+find_path(PostgreSQL_TYPE_INCLUDE_DIR
+  NAMES catalog/pg_type.h
+  PATHS
+   # Look in other places.
+   ${PostgreSQL_ROOT_DIRECTORIES}
+  PATH_SUFFIXES
+    server
+    pgsql
     postgresql
     include
   # Help the user find it if we cannot.
@@ -156,6 +171,13 @@ if(PostgreSQL_FOUND)
     )
   endif(EXISTS "${PostgreSQL_INCLUDE_DIR}")
 
+  if(EXISTS "${PostgreSQL_TYPE_INCLUDE_DIR}")
+    list(APPEND PostgreSQL_INCLUDE_DIRS
+      ${PostgreSQL_TYPE_INCLUDE_DIR}
+    )
+  endif(EXISTS "${PostgreSQL_TYPE_INCLUDE_DIR}")
+
+
   if(EXISTS "${PostgreSQL_LIBRARY_DIR}")
     set(PostgreSQL_LIBRARY_DIRS
       ${PostgreSQL_LIBRARY_DIR}

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindPostgreSQL.cmake |   53 ++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list