Compare commits
No commits in common. "3ee0fd6f92a43ff53a6fea8dfeaa2ed974d7eb65" and "8d778057911d6569833e65116e45a6e63c721850" have entirely different histories.
3ee0fd6f92
...
8d77805791
@ -174,33 +174,21 @@ option(ENABLE_POSTGRESQL "Enable PostgreSQL backend" TRUE)
|
||||
set(USE_POSTGRESQL FALSE)
|
||||
|
||||
if(ENABLE_POSTGRESQL)
|
||||
if(CMAKE_VERSION VERSION_LESS "3.10")
|
||||
find_package(PostgreSQL QUIET)
|
||||
# Before CMake 3.20 FindPostgreSQL.cmake always looked for server includes
|
||||
# but we don't need them, so continue anyway if only those are missing.
|
||||
if(PostgreSQL_INCLUDE_DIR AND PostgreSQL_LIBRARY)
|
||||
set(PostgreSQL_FOUND TRUE)
|
||||
set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR})
|
||||
set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY})
|
||||
else()
|
||||
find_program(POSTGRESQL_CONFIG_EXECUTABLE pg_config DOC "pg_config")
|
||||
find_library(POSTGRESQL_LIBRARY pq)
|
||||
if(POSTGRESQL_CONFIG_EXECUTABLE)
|
||||
execute_process(COMMAND ${POSTGRESQL_CONFIG_EXECUTABLE} --includedir-server
|
||||
OUTPUT_VARIABLE POSTGRESQL_SERVER_INCLUDE_DIRS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${POSTGRESQL_CONFIG_EXECUTABLE}
|
||||
OUTPUT_VARIABLE POSTGRESQL_CLIENT_INCLUDE_DIRS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# This variable is case sensitive for the cmake PostgreSQL module
|
||||
set(PostgreSQL_ADDITIONAL_SEARCH_PATHS ${POSTGRESQL_SERVER_INCLUDE_DIRS} ${POSTGRESQL_CLIENT_INCLUDE_DIRS})
|
||||
endif()
|
||||
find_package("PostgreSQL")
|
||||
endif()
|
||||
else()
|
||||
find_package(PostgreSQL)
|
||||
find_program(POSTGRESQL_CONFIG_EXECUTABLE pg_config DOC "pg_config")
|
||||
find_library(POSTGRESQL_LIBRARY pq)
|
||||
if(POSTGRESQL_CONFIG_EXECUTABLE)
|
||||
execute_process(COMMAND ${POSTGRESQL_CONFIG_EXECUTABLE} --includedir-server
|
||||
OUTPUT_VARIABLE POSTGRESQL_SERVER_INCLUDE_DIRS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${POSTGRESQL_CONFIG_EXECUTABLE}
|
||||
OUTPUT_VARIABLE POSTGRESQL_CLIENT_INCLUDE_DIRS
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# This variable is case sensitive for the cmake PostgreSQL module
|
||||
set(PostgreSQL_ADDITIONAL_SEARCH_PATHS ${POSTGRESQL_SERVER_INCLUDE_DIRS} ${POSTGRESQL_CLIENT_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
find_package("PostgreSQL")
|
||||
|
||||
if(POSTGRESQL_FOUND)
|
||||
set(USE_POSTGRESQL TRUE)
|
||||
message(STATUS "PostgreSQL backend enabled")
|
||||
@ -714,8 +702,6 @@ if (GETTEXT_FOUND AND APPLY_LOCALE_BLACKLIST)
|
||||
endif()
|
||||
endforeach()
|
||||
message(STATUS "Locale blacklist applied; Locales used: ${GETTEXT_USED_LOCALES}")
|
||||
elseif (GETTEXTLIB_FOUND)
|
||||
set(GETTEXT_USED_LOCALES ${GETTEXT_AVAILABLE_LOCALES})
|
||||
endif()
|
||||
|
||||
# Set some optimizations and tweaks
|
||||
|
@ -237,21 +237,21 @@ inline u64 getTimeMs()
|
||||
{
|
||||
struct timespec ts;
|
||||
os_get_clock(&ts);
|
||||
return ((u64) ts.tv_sec) * 1000LL + ((u64) ts.tv_nsec) / 1000000LL;
|
||||
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
|
||||
}
|
||||
|
||||
inline u64 getTimeUs()
|
||||
{
|
||||
struct timespec ts;
|
||||
os_get_clock(&ts);
|
||||
return ((u64) ts.tv_sec) * 1000000LL + ((u64) ts.tv_nsec) / 1000LL;
|
||||
return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
||||
}
|
||||
|
||||
inline u64 getTimeNs()
|
||||
{
|
||||
struct timespec ts;
|
||||
os_get_clock(&ts);
|
||||
return ((u64) ts.tv_sec) * 1000000000LL + ((u64) ts.tv_nsec);
|
||||
return ts.tv_sec * 1000000000 + ts.tv_nsec;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user