Compare commits
3 Commits
8d77805791
...
3ee0fd6f92
Author | SHA1 | Date | |
---|---|---|---|
3ee0fd6f92 | |||
19afb03d0b | |||
545ed62909 |
@ -174,6 +174,15 @@ 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)
|
||||
@ -186,8 +195,11 @@ if(ENABLE_POSTGRESQL)
|
||||
# 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)
|
||||
endif()
|
||||
|
||||
if(POSTGRESQL_FOUND)
|
||||
set(USE_POSTGRESQL TRUE)
|
||||
@ -702,6 +714,8 @@ 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 ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
|
||||
return ((u64) ts.tv_sec) * 1000LL + ((u64) ts.tv_nsec) / 1000000LL;
|
||||
}
|
||||
|
||||
inline u64 getTimeUs()
|
||||
{
|
||||
struct timespec ts;
|
||||
os_get_clock(&ts);
|
||||
return ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
||||
return ((u64) ts.tv_sec) * 1000000LL + ((u64) ts.tv_nsec) / 1000LL;
|
||||
}
|
||||
|
||||
inline u64 getTimeNs()
|
||||
{
|
||||
struct timespec ts;
|
||||
os_get_clock(&ts);
|
||||
return ts.tv_sec * 1000000000 + ts.tv_nsec;
|
||||
return ((u64) ts.tv_sec) * 1000000000LL + ((u64) ts.tv_nsec);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user