Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 596289 Details for
Bug 828467
CMake test suite fails when postgresql-devel is installed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
A fix for FindPostgreSQL.cmake
cmake-postgresql.patch (text/plain), 5.53 KB, created by
Petr Machata
on 2012-07-04 21:16:18 UTC
(
hide
)
Description:
A fix for FindPostgreSQL.cmake
Filename:
MIME Type:
Creator:
Petr Machata
Created:
2012-07-04 21:16:18 UTC
Size:
5.53 KB
patch
obsolete
>diff -up cmake-2.8.8/Modules/FindPostgreSQL.cmake\~ cmake-2.8.8/Modules/FindPostgreSQL.cmake >--- cmake-2.8.8/Modules/FindPostgreSQL.cmake~ 2012-04-18 20:10:54.000000000 +0200 >+++ cmake-2.8.8/Modules/FindPostgreSQL.cmake 2012-07-04 23:05:30.532090522 +0200 >@@ -97,76 +97,101 @@ set( PostgreSQL_ROOT_DIRECTORIES > # > # Look for an installation. > # >-find_path(PostgreSQL_INCLUDE_DIR >- NAMES libpq-fe.h >+find_path(PostgreSQL_CONFIG_DIR >+ NAMES pg_config > PATHS > # Look in other places. > ${PostgreSQL_ROOT_DIRECTORIES} > PATH_SUFFIXES >- pgsql >- postgresql >- include >+ "" >+ bin > # Help the user find it if we cannot. >- DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" >+ DOC "The ${PostgreSQL_ROOT_DIR_MESSAGE}" > ) > >-find_path(PostgreSQL_TYPE_INCLUDE_DIR >- NAMES catalog/pg_type.h >- PATHS >- # Look in other places. >- ${PostgreSQL_ROOT_DIRECTORIES} >- PATH_SUFFIXES >- pgsql/server >- postgresql/server >- include/server >- # Help the user find it if we cannot. >- DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" >-) >+macro (fail_if) >+ if (${ARGV}) >+ message (SEND_ERROR "Couldn't determine PostgreSQL configuration.") >+ unset (PostgreSQL_CONFIG_DIR) >+ break () >+ endif () >+endmacro () >+ >+macro (run_pg_config arg var) >+ execute_process(COMMAND ${PostgreSQL_CONFIG_DIR}/pg_config ${arg} >+ RESULT_VARIABLE pgsql_config_result >+ OUTPUT_VARIABLE ${var} >+ OUTPUT_STRIP_TRAILING_WHITESPACE) >+ >+ fail_if (NOT ${pgsql_config_result} EQUAL 0 OR NOT ${var}) >+endmacro () >+ >+foreach (once only) >+ fail_if (NOT PostgreSQL_CONFIG_DIR) >+ >+ run_pg_config (--version PostgreSQL_VERSION_STRING) >+ string (REGEX REPLACE "^PostgreSQL (.*)$" "\\1" >+ PostgreSQL_VERSION_STRING "${PostgreSQL_VERSION_STRING}") >+ fail_if (NOT PostgreSQL_VERSION_STRING) >+ >+ run_pg_config (--includedir PostgreSQL_INCLUDE_DIR) >+ fail_if (NOT EXISTS "${PostgreSQL_INCLUDE_DIR}/libpq-fe.h") >+ >+ find_path(PostgreSQL_TYPE_INCLUDE_DIR >+ NAMES catalog/pg_type.h >+ PATHS ${PostgreSQL_INCLUDE_DIR} >+ PATH_SUFFIXES >+ pgsql/server >+ postgresql/server >+ include/server >+ # Help the user find it if we cannot. >+ DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" >+ ) >+ fail_if (NOT PostgreSQL_TYPE_INCLUDE_DIR) >+ >+ set (PostgreSQL_INCLUDE_DIRS >+ ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR}) >+ >+ run_pg_config (--libdir PostgreSQL_LIBRARY_DIRS) >+ >+ # The PostgreSQL library. >+ set (PostgreSQL_LIBRARY_TO_FIND pq) >+ # Setting some more prefixes for the library >+ set (PostgreSQL_LIB_PREFIX "") >+ if (WIN32) >+ set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib") >+ set (PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND}) >+ endif() >+ >+ find_library (PostgreSQL_LIBRARY_FOUND >+ NAMES ${PostgreSQL_LIBRARY_TO_FIND} >+ PATHS ${PostgreSQL_LIBRARY_DIRS} >+ PATH_SUFFIXES lib >+ ) >+ fail_if (NOT PostgreSQL_LIBRARY_FOUND) >+ set (PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND}) > >-# The PostgreSQL library. >-set (PostgreSQL_LIBRARY_TO_FIND pq) >-# Setting some more prefixes for the library >-set (PostgreSQL_LIB_PREFIX "") >-if ( WIN32 ) >- set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib") >- set ( PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND}) >-endif() >- >-find_library( PostgreSQL_LIBRARY >- NAMES ${PostgreSQL_LIBRARY_TO_FIND} >- PATHS >- ${PostgreSQL_ROOT_DIRECTORIES} >- PATH_SUFFIXES >- lib >-) >-get_filename_component(PostgreSQL_LIBRARY_DIR ${PostgreSQL_LIBRARY} PATH) >- >-if (PostgreSQL_INCLUDE_DIR AND EXISTS "${PostgreSQL_INCLUDE_DIR}/pg_config.h") >- file(STRINGS "${PostgreSQL_INCLUDE_DIR}/pg_config.h" pgsql_version_str >- REGEX "^#define[\t ]+PG_VERSION[\t ]+\".*\"") >- >- string(REGEX REPLACE "^#define[\t ]+PG_VERSION[\t ]+\"([^\"]*)\".*" "\\1" >- PostgreSQL_VERSION_STRING "${pgsql_version_str}") >- unset(pgsql_version_str) >-endif() >+endforeach () > > # Did we find anything? >-include(FindPackageHandleStandardArgs) >-find_package_handle_standard_args(PostgreSQL >- REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR >- VERSION_VAR PostgreSQL_VERSION_STRING) >-set( PostgreSQL_FOUND ${POSTGRESQL_FOUND}) >+include (FindPackageHandleStandardArgs) >+find_package_handle_standard_args (PostgreSQL >+ REQUIRED_VARS >+ PostgreSQL_LIBRARY_DIRS >+ PostgreSQL_CONFIG_DIR >+ PostgreSQL_INCLUDE_DIRS >+ PostgreSQL_LIBRARIES >+ VERSION_VAR >+ PostgreSQL_VERSION_STRING >+) >+set (PostgreSQL_FOUND ${POSTGRESQL_FOUND}) > > # Now try to get the include and library path. >-if(PostgreSQL_FOUND) >- >- 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}") >+if (PostgreSQL_FOUND) >+ message (STATUS "PostgreSQL include dirs: ${PostgreSQL_INCLUDE_DIRS}") >+ message (STATUS "PostgreSQL library dirs: ${PostgreSQL_LIBRARY_DIRS}") >+ message (STATUS "PostgreSQL libraries: ${PostgreSQL_LIBRARIES}") > endif(PostgreSQL_FOUND) > >-mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY ) >+mark_as_advanced (PostgreSQL_CONFIG_DIR PostgreSQL_LIB_DIR >+ PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR) > >Diff finished. Wed Jul 4 23:07:43 2012
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 828467
:
589245
| 596289