Changeset: 233b4e5c3b0b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=233b4e5c3b0b
Modified Files:
        cmake/monetdb-defines.cmake
        cmake/monetdb-findpackages.cmake
        cmake/monetdb-functions.cmake
Branch: mbedded
Log Message:

small changes to cleanup code a little bit


diffs (162 lines):

diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -7,7 +7,6 @@
 #]]
 
 function(monetdb_configure_defines)
-  check_symbol_exists("opendir" "dirent.h" HAVE_DIRENT_H)
   find_path(HAVE_DISPATCH_DISPATCH_H "dispatch/dispatch.h")
   find_path(HAVE_DLFCN_H "dlfcn.h")
   find_path(HAVE_FCNTL_H "fcntl.h")
@@ -20,7 +19,6 @@ function(monetdb_configure_defines)
   find_path(HAVE_MACH_MACH_INIT_H "mach/mach_init.h")
   find_path(HAVE_MACH_TASK_H "mach/task.h")
   find_path(HAVE_MACH_O_DYLD_H "mach-o/dyld.h")
-  check_symbol_exists("gethostbyname" "netdb.h" HAVE_NETDB_H)
   find_path(HAVE_NETINET_IN_H "netinet/in.h")
   find_path(HAVE_POLL_H "poll.h")
   find_path(HAVE_PROCFS_H "procfs.h")
@@ -33,8 +31,6 @@ function(monetdb_configure_defines)
   find_path(HAVE_SYS_MMAN_H "sys/mman.h")
   find_path(HAVE_SYS_PARAM_H "sys/param.h")
   find_path(HAVE_SYS_RESOURCE_H "sys/resource.h")
-  check_symbol_exists("setsockopt" "sys/socket.h" HAVE_SYS_SOCKET_H)
-  check_symbol_exists("gettimeofday" "sys/time.h" HAVE_SYS_TIME_H)
   find_path(HAVE_SYS_TIMES_H "sys/times.h")
   find_path(HAVE_SYS_UIO_H "sys/uio.h")
   find_path(HAVE_SYS_UN_H "sys/un.h")
@@ -44,29 +40,32 @@ function(monetdb_configure_defines)
   find_path(HAVE_UNISTD_H "unistd.h")
   find_path(HAVE_UUID_UUID_H "uuid/uuid.h")
   find_path(HAVE_WINSOCK_H "winsock2.h")
-
   find_path(HAVE_SYS_TYPES_H "sys/types.h")
   find_path(HAVE_SEMAPHORE_H "semaphore.h")
   find_path(HAVE_GETOPT_H "getopt.h")
-  if(HAVE_GETOPT_H)
-    set(HAVE_GETOPT 1)
-  endif()
 
   check_include_file("stdatomic.h" HAVE_STDATOMIC_H)
 
+  check_symbol_exists("opendir" "dirent.h" HAVE_DIRENT_H)
+  check_symbol_exists("gethostbyname" "netdb.h" HAVE_NETDB_H)
+  check_symbol_exists("setsockopt" "sys/socket.h" HAVE_SYS_SOCKET_H)
+  check_symbol_exists("gettimeofday" "sys/time.h" HAVE_SYS_TIME_H)
   # Linux specific, in the future, it might be ported to other platforms
   check_symbol_exists("S_ISREG" "sys/stat.h" HAVE_SYS_STAT_H)
   check_symbol_exists("getaddrinfo" "netdb.h" HAVE_GETADDRINFO)
   check_symbol_exists("getaddrinfo" "ws2tcpip.h" HAVE_GETADDRINFO)
   #check_symbol_exists("WSADATA" "winsock2.h" HAVE_WINSOCK_H)
   check_symbol_exists("fdatasync" "unistd.h" HAVE_FDATASYNC)
-
-  check_symbol_exists("accept4" "sys/types.h;sys/socket.h" HAVE_ACCEPT4) # 
Some libc versions on Linux distributions don't have it
+  # Some libc versions on Linux distributions don't have it
+  check_symbol_exists("accept4"
+    "sys/types.h;sys/socket.h" HAVE_ACCEPT4)
   check_symbol_exists("asctime_r" "time.h" HAVE_ASCTIME_R)
   check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME)
   check_symbol_exists("ctime_r" "time.h" HAVE_CTIME_R)
-  check_symbol_exists("dispatch_semaphore_create" "dispatch/dispatch.h" 
HAVE_DISPATCH_SEMAPHORE_CREATE)
-  check_symbol_exists("fallocate" "fcntl.h" HAVE_FALLOCATE) # Linux specific, 
in the future, it might be ported to other platforms
+  check_symbol_exists("dispatch_semaphore_create"
+    "dispatch/dispatch.h" HAVE_DISPATCH_SEMAPHORE_CREATE)
+  # Linux specific, in the future, it might be ported to other platforms
+  check_symbol_exists("fallocate" "fcntl.h" HAVE_FALLOCATE)
   check_function_exists("fcntl" HAVE_FCNTL)
   check_symbol_exists("fork" "unistd.h" HAVE_FORK)
   check_symbol_exists("fsync" "unistd.h" HAVE_FSYNC)
@@ -86,31 +85,36 @@ function(monetdb_configure_defines)
   check_function_exists("nanosleep" HAVE_NANOSLEEP)
   check_function_exists("nl_langinfo" HAVE_NL_LANGINFO)
   check_function_exists("_NSGetExecutablePath" HAVE__NSGETEXECUTABLEPATH)
-  check_symbol_exists("pipe2" "fcntl.h;unistd.h" HAVE_PIPE2) # Some libc 
versions on Linux distributions don't have it
-  check_function_exists("poll" HAVE_POLL) 
+  # Some libc versions on Linux distributions don't have it
+  check_symbol_exists("pipe2" "fcntl.h;unistd.h" HAVE_PIPE2)
+  check_function_exists("poll" HAVE_POLL)
   check_symbol_exists("popen" "stdio.h" HAVE_POPEN)
-  check_symbol_exists("posix_fadvise" "fcntl.h" HAVE_POSIX_FADVISE) 
-  check_symbol_exists("posix_fallocate" "fcntl.h" HAVE_POSIX_FALLOCATE) # Some 
POSIX systems don't have it (e.g. Macos)
+  check_symbol_exists("posix_fadvise" "fcntl.h" HAVE_POSIX_FADVISE)
+  # Some POSIX systems don't have it (e.g. Macos)
+  check_symbol_exists("posix_fallocate" "fcntl.h" HAVE_POSIX_FALLOCATE)
   check_symbol_exists("posix_madvise" "sys/mman.h" HAVE_POSIX_MADVISE)
-  check_function_exists("putenv" HAVE_PUTENV) 
-  check_function_exists("setsid" HAVE_SETSID) 
-  check_function_exists("shutdown" HAVE_SHUTDOWN) 
-  check_function_exists("sigaction" HAVE_SIGACTION) 
-  check_function_exists("stpcpy" HAVE_STPCPY) 
-  check_function_exists("strcasestr" HAVE_STRCASESTR) 
+  check_function_exists("putenv" HAVE_PUTENV)
+  check_function_exists("setsid" HAVE_SETSID)
+  check_function_exists("shutdown" HAVE_SHUTDOWN)
+  check_function_exists("sigaction" HAVE_SIGACTION)
+  check_function_exists("stpcpy" HAVE_STPCPY)
+  check_function_exists("strcasestr" HAVE_STRCASESTR)
   check_symbol_exists("strncasecmp" "strings.h" HAVE_STRNCASECMP)
-  check_function_exists("strptime" HAVE_STRPTIME) 
-  check_function_exists("strsignal" HAVE_STRSIGNAL) 
+  check_function_exists("strptime" HAVE_STRPTIME)
+  check_function_exists("strsignal" HAVE_STRSIGNAL)
   check_symbol_exists("sysconf" "unistd.h" HAVE_SYSCONF)
-  check_function_exists("task_info" HAVE_TASK_INFO) 
-  check_function_exists("times" HAVE_TIMES) 
-  check_function_exists("uname" HAVE_UNAME) 
+  check_function_exists("task_info" HAVE_TASK_INFO)
+  check_function_exists("times" HAVE_TIMES)
+  check_function_exists("uname" HAVE_UNAME)
   # Some libc versions on Linux distributions don't have it
   check_symbol_exists("semtimedop" "sys/types.h;sys/ipc.h;sys/sem.h" 
HAVE_SEMTIMEDOP)
   if(HAVE_PTHREAD_H)
     check_function_exists("pthread_kill" HAVE_PTHREAD_KILL)
     check_function_exists("pthread_sigmask" HAVE_PTHREAD_SIGMASK)
   endif()
+  if(HAVE_GETOPT_H)
+    set(HAVE_GETOPT 1)
+  endif()
 endfunction()
 
 macro(monetdb_macro_variables)
diff --git a/cmake/monetdb-findpackages.cmake b/cmake/monetdb-findpackages.cmake
--- a/cmake/monetdb-findpackages.cmake
+++ b/cmake/monetdb-findpackages.cmake
@@ -158,7 +158,7 @@ if(INT128)
     set(HAVE_HGE TRUE)
     message(STATUS "Huge integers are available")
   else()
-   message(STATUS "128-bit integers not supported by this compiler")
+    message(STATUS "128-bit integers not supported by this compiler")
   endif()
   cmake_pop_check_state()
 endif()
diff --git a/cmake/monetdb-functions.cmake b/cmake/monetdb-functions.cmake
--- a/cmake/monetdb-functions.cmake
+++ b/cmake/monetdb-functions.cmake
@@ -104,12 +104,13 @@ endfunction()
 function(monetdb_cmake_summary)
   include(os_release_info)
 
-  message("Summary of cmake configuration of MonetDB")
-  message("-----------------------------------------")
+  message(STATUS "")
+  message(STATUS "Summary of cmake configuration of MonetDB")
+  message(STATUS "-----------------------------------------")
   if(${CMAKE_VERSION} VERSION_LESS "3.14.0")
-    message("NumPy include dirs: ${NUMPY_INCLUDE_DIRS}")
+    message(STATUS "NumPy include dirs: ${NUMPY_INCLUDE_DIRS}")
   else()
-    message("Numpy target: ")
+    message(STATUS "Numpy target: ")
   endif()
   message(STATUS "System name: ${CMAKE_SYSTEM_NAME}")
   message(STATUS "System version: ${CMAKE_SYSTEM_VERSION}")
@@ -132,5 +133,6 @@ function(monetdb_cmake_summary)
   message(STATUS "Pcre library: ${PCRE_FOUND}")
   message(STATUS "Netcdf library: ${NETCDF_FOUND}")
   message(STATUS "Readline library: ${READLINE_FOUND}")
-  message("-----------------------------------------")
+  message(STATUS "-----------------------------------------")
+  message(STATUS "")
 endfunction()
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to