Changeset: 20db4f295559 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20db4f295559 Modified Files: CMakeLists.txt cmake/FindUUID.cmake monetdb_config.h.in Branch: cmake-fun Log Message:
Comments and small fixes. diffs (79 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,7 +273,6 @@ elseif(UNIX) else() message(FATAL_ERROR "Unknown target operating system") endif() - set(DIR_SEP "'${OS_DIRSEP}'") set(DIR_SEP_STR ${OS_DIRSEP}) set(PATH_SEP "'${OS_PATHSEP}'") @@ -476,7 +475,7 @@ endif() include(FindExtraLibraries) # Header files -check_include_file("libintl.h" HAVE_LIBINTL_H) # Some Linux distributions don't have it +check_include_file("libintl.h" HAVE_LIBINTL_H) # We use it on Windows, and there are ports of this library there check_include_file("pthread.h" HAVE_PTHREAD_H) # Distinguish between posix thread and win32 thread libraries # C types existence @@ -519,7 +518,7 @@ check_symbol_exists("fallocate" "fcntl.h check_symbol_exists("madvise" "sys/mman.h" HAVE_MADVISE) # The Linux kernel can be compiled without madvise check_symbol_exists("mremap" "sys/mman.h" HAVE_MREMAP) # Linux specific, in the future, it might be ported to other platforms check_symbol_exists("pipe2" "fcntl.h;unistd.h" HAVE_PIPE2) # Some libc versions on Linux distributions don't have it -check_symbol_exists("posix_fallocate" "fcntl.h" HAVE_POSIX_FALLOCATE) # Some POSIX systems don't have it +check_symbol_exists("posix_fallocate" "fcntl.h" HAVE_POSIX_FALLOCATE) # Some POSIX systems don't have it (e.g. Macos) check_symbol_exists("posix_madvise" "sys/mman.h" HAVE_POSIX_MADVISE) # The Linux kernel can be compiled without madvise, and posix_madvise is implemented using madvise check_symbol_exists("semtimedop" "sys/types.h;sys/ipc.h;sys/sem.h" HAVE_SEMTIMEDOP) # Some libc versions on Linux distributions don't have it diff --git a/cmake/FindUUID.cmake b/cmake/FindUUID.cmake --- a/cmake/FindUUID.cmake +++ b/cmake/FindUUID.cmake @@ -15,16 +15,18 @@ else() set(UUID_LIBRARIES "") endif() -cmake_push_check_state() -set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${UUID_INCLUDE_DIR}") -set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};${UUID_LIBRARIES}") -check_symbol_exists("uuid_generate" "uuid/uuid.h" HAVE_UUID_GENERATE) # some uuid instalations don't supply this symbol -cmake_pop_check_state() -if(NOT HAVE_UUID_GENERATE) - set(UUID_FOUND OFF) +if(UUID_LIBRARIES) + cmake_push_check_state() + set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${UUID_INCLUDE_DIR}") + set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};${UUID_LIBRARIES}") + check_symbol_exists("uuid_generate" "uuid/uuid.h" HAVE_UUID_GENERATE) # some uuid instalations don't supply this symbol + cmake_pop_check_state() + if(NOT HAVE_UUID_GENERATE) + set(UUID_FOUND OFF) + endif() endif() -# Handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE if all listed variables are TRUE. +# On Linux, both library and include directory path must be set include(FindPackageHandleStandardArgs) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") find_package_handle_standard_args(UUID DEFAULT_MSG UUID_LIBRARIES UUID_INCLUDE_DIR) diff --git a/monetdb_config.h.in b/monetdb_config.h.in --- a/monetdb_config.h.in +++ b/monetdb_config.h.in @@ -76,7 +76,6 @@ #endif #include <windows.h> - #endif /* _MSC_VER */ /* location where binaries are installed */ @@ -311,7 +310,7 @@ #cmakedefine SO_EXT "@SO_EXT@" /* Shared Object prefix */ -#define SO_PREFIX "@SO_PREFIX@" +#cmakedefine SO_PREFIX "@SO_PREFIX@" /* Compiling for static code analysis */ #cmakedefine STATIC_CODE_ANALYSIS _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list