Changeset: 4107f29d87bc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4107f29d87bc
Added Files:
        cmake/FindLiblas.cmake
Modified Files:
        CMakeLists.txt
        cmake/FindGeos.cmake
Branch: cmake-fun
Log Message:

Cleanup, use module to find liblas libraries and include directories, removed 
redundant compilation messages, fixed compiler flags tests.


diffs (truncated from 488 to 300 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -237,10 +237,10 @@ opj_test_large_files(_LARGE_FILES)
 opj_test_large_files(_LARGEFILE_SOURCE)
 opj_test_large_files(_FILE_OFFSET_BITS)
 
-message(STATUS "Test if struct tm has tm_zone field")
+#Test if struct tm has tm_zone field
 check_struct_has_member("struct tm" tm_zone "time.h" HAVE_STRUCT_TM_TM_ZONE 
LANGUAGE C)
 
-message(STATUS "Test for __builtin_add_overflow")
+#Test for __builtin_add_overflow
 check_c_source_compiles("
        #include <stdio.h>
        #include <stdlib.h>
@@ -261,7 +261,7 @@ if(MSVC)
 endif()
 
 # 
https://github.com/Unidata/netcdf-c/commit/b432a527c4a38af45498691a44c5a88961b9c751
-message(STATUS "Test if char type is unsigned or not")
+# Test if char type is unsigned or not
 check_c_source_compiles("
        #include <stdlib.h>
 
@@ -275,7 +275,7 @@ if(__CHAR_UNSIGNED__)
        add_compile_definitions(__CHAR_UNSIGNED__)
 endif()
 
-message(STATUS "Test if __hidden macro is supported")
+# Test if __hidden macro is supported
 check_c_source_compiles("
        #include <stdlib.h>
 
@@ -294,7 +294,7 @@ endif()
 if(MSVC)
        set(_Noreturn "__declspec(noreturn)")
 else()
-       message(STATUS "Test if _Noreturn keyword is supported")
+       #Test if _Noreturn keyword is supported
        check_c_source_compiles("
                #include <stdlib.h>
 
@@ -313,7 +313,7 @@ else()
        endif()
 endif()
 
-message(STATUS "Test if compiler can use NAN as an initializer")
+#Test if compiler can use NAN as an initializer
 check_c_source_compiles("
        #include <math.h>
 
@@ -565,7 +565,6 @@ if(NOT BISON_FOUND)
                message(FATAL_ERROR "MonetDB/SQL requires bison")
        else()
                set(ENABLE_SQL "NO")
-               message(STATUS "Bison not found")
        endif()
 endif()
 
@@ -586,7 +585,7 @@ if(Iconv_FOUND)
        if(MSVC)
                set(ICONV_CONST " ")
        else()
-               message(STATUS "Check if second iconv argument requires const")
+               #Test if second iconv argument requires const
                check_c_source_compiles("
                        #include <iconv.h>
 
@@ -613,12 +612,9 @@ if(NOT ${WITH_BZ2} STREQUAL "NO")
        include(FindBZip2)
 
        if(BZip2_FOUND)
-               message(STATUS "bz2 library found")
                set(HAVE_LIBBZ2 ON)
        elseif(${WITH_BZ2} STREQUAL "YES")
                message(FATAL_ERROR "bz2 library not found")
-       else()
-               message(STATUS "bz2 library not found")
        endif()
 endif()
 if(NOT BZip2_FOUND)
@@ -631,12 +627,9 @@ if(NOT ${WITH_SNAPPY} STREQUAL "NO")
        include(FindSnappy)
 
        if(SNAPPY_FOUND)
-               message(STATUS "snappy library found")
                set(HAVE_LIBSNAPPY ON)
        elseif(${WITH_SNAPPY} STREQUAL "YES")
                message(FATAL_ERROR "snappy library not found")
-       else()
-               message(STATUS "snappy library not found")
        endif()
 endif()
 if(NOT SNAPPY_FOUND)
@@ -657,13 +650,10 @@ if(NOT ${WITH_LZ4} STREQUAL "NO")
                                message(STATUS "lz4 library found but version 
is too old: ${LZ4_VERSION} < ${LZ4_MINIMUM_VERSION}")
                        endif()
                else()
-                       message(STATUS "lz4 library found")
                        set(HAVE_LIBLZ4 ON)
                endif()
        elseif(${WITH_LZ4} STREQUAL "YES")
                message(FATAL_ERROR "lz4 library not found")
-       else()
-               message(STATUS "lz4 library not found")
        endif()
 endif()
 if(NOT HAVE_LIBLZ4)
@@ -793,7 +783,7 @@ if(NOT ${WITH_READLINE} STREQUAL "NO")
        if(HAVE_LIBREADLINE)
                check_symbol_exists("rl_completion_matches" 
"stdio.h;readline/readline.h" HAVE_LIBREADLINE)
                if(HAVE_LIBREADLINE)
-                       message(STATUS "Checking whether rl_completion_func_t 
exists")
+                       #Checking whether rl_completion_func_t exists
                        check_symbol_exists("rl_completion_func_t" 
"stdio.h;readline/readline.h" HAVE_LIBREADLINE)
                        if(NOT HAVE_LIBREADLINE)
                                if(${WITH_READLINE} STREQUAL "YES")
@@ -817,7 +807,6 @@ if(NOT ${WITH_UUID} STREQUAL "NO")
        include(FindUUID)
 
        if(UUID_FOUND)
-               message(STATUS "uuid library found")
                set(HAVE_UUID ON)
        elseif(${WITH_SNAPPY} STREQUAL "YES")
                message(FATAL_ERROR "uuid library not found")
@@ -836,7 +825,6 @@ if(APPLE)
        include(FindCommonCrypto)
 
        if(COMMONCRYPTO_FOUND)
-               message(STATUS "CommonCrypto library found")
                set(HAVE_COMMONCRYPTO ON)
                set(CRYPTO_INCLUDE_DIR "${COMMONCRYPTO_INCLUDE_DIR}")
                set(CRYPTO_LIBRARIES "${COMMONCRYPTO_LIBRARIES}")
@@ -848,7 +836,6 @@ else()
                find_package(OpenSSL)
 
                if(OPENSSL_FOUND)
-                       message(STATUS "openssl library found")
                        set(HAVE_OPENSSL ON)
                        set(CRYPTO_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR}")
                        set(CRYPTO_LIBRARIES "${OPENSSL_CRYPTO_LIBRARY}")
@@ -911,11 +898,10 @@ if(NOT ${WITH_REGEX} STREQUAL "POSIX")
        include(FindPCRE)
 
        if(PCRE_FOUND)
-               message(STATUS "PCRE library found")
                if(MSVC)
                        set(HAVE_LIBPCRE ON)
                else()
-                       message(STATUS "Checking for UTF-8 support on PCRE 
library")
+                       #Test for UTF-8 support on PCRE library
                        cmake_push_check_state()
                        set(CMAKE_REQUIRED_LIBRARIES 
"${CMAKE_REQUIRED_LIBRARIES};pcre")
                        check_c_source_runs("
@@ -977,12 +963,9 @@ if(NOT ${WITH_LIBXML2} STREQUAL "NO")
        include(FindLibXml2)
 
        if(LIBXML2_FOUND)
-               message(STATUS "libxml2 library found")
                set(HAVE_LIBXML ON)
        elseif(${WITH_LIBXML2} STREQUAL "YES")
                message(FATAL_ERROR "libxml2 library not found")
-       else()
-               message(STATUS "libxml2 library not found")
        endif()
 endif()
 if(NOT LIBXML2_FOUND)
@@ -995,12 +978,9 @@ if(NOT ${WITH_CURL} STREQUAL "NO")
        include(FindCURL)
 
        if(CURL_FOUND)
-               message(STATUS "libcurl library found")
                set(HAVE_CURL ON)
        elseif(${WITH_CURL} STREQUAL "YES")
                message(FATAL_ERROR "libcurl library not found")
-       else()
-               message(STATUS "libcurl library not found")
        endif()
 endif()
 if(NOT CURL_FOUND)
@@ -1013,12 +993,9 @@ if(NOT ${WITH_ZLIB} STREQUAL "NO")
        include(FindZLIB)
 
        if(ZLIB_FOUND)
-               message(STATUS "zlib library found")
                set(HAVE_LIBZ ON)
        elseif(${WITH_ZLIB} STREQUAL "YES")
                message(FATAL_ERROR "zlib library not found")
-       else()
-               message(STATUS "zlib library not found")
        endif()
 endif()
 if(NOT ZLIB_FOUND)
@@ -1031,12 +1008,9 @@ if(NOT ${WITH_LIBLZMA} STREQUAL "NO")
        include(FindLibLZMA)
 
        if(LIBLZMA_FOUND)
-               message(STATUS "liblzma library found")
                set(HAVE_LIBLZMA ON)
        elseif(${WITH_LIBLZMA} STREQUAL "YES")
                message(FATAL_ERROR "liblzma library not found")
-       else()
-               message(STATUS "liblzma library not found")
        endif()
 endif()
 if(NOT LIBLZMA_FOUND)
@@ -1049,12 +1023,9 @@ if(NOT ${WITH_VALGRIND} STREQUAL "NO")
        include(FindValgrind)
 
        if(VALGRIND_FOUND)
-               message(STATUS "valgrind library found")
                set(HAVE_VALGRIND ON)
        elseif(${WITH_VALGRIND} STREQUAL "YES")
                message(FATAL_ERROR "valgrind library not found")
-       else()
-               message(STATUS "valgrind library not found")
        endif()
 endif()
 if(NOT VALGRIND_FOUND)
@@ -1096,6 +1067,7 @@ if(NOT ${ENABLE_RINTEGRATION} STREQUAL "
                        set(R_LIBRARIES "${R_LD_OUTPUT}")
                        set(HAVE_LIBR ON)
                        set(RHOME ${R_HOME_OUTPUT})
+                       message(STATUS "R executable, library and include files 
found")
                elseif(${ENABLE_RINTEGRATION} STREQUAL "YES")
                        message(FATAL_ERROR "R executable required for R 
integration support")
                else()
@@ -1329,12 +1301,9 @@ if(NOT ${WITH_PROJ} STREQUAL "NO")
        include(FindProj)
 
        if(PROJ_FOUND)
-               message(STATUS "proj library found")
                set(HAVE_PROJ ON)
        elseif(${WITH_PROJ} STREQUAL "YES")
                message(FATAL_ERROR "proj library not found")
-       else()
-               message(STATUS "proj library not found")
        endif()
 endif()
 if(NOT PROJ_FOUND)
@@ -1432,13 +1401,10 @@ if(NOT ${WITH_GEOS} STREQUAL "NO")
                                message(STATUS "geos library found but version 
is too old: ${GEOS_VERSION} < ${GEOS_MINIMUM_VERSION}")
                        endif()
                else()
-                       message(STATUS "geos library found")
                        set(HAVE_GEOS_LIB ON)
                endif()
        elseif(${WITH_GEOS} STREQUAL "YES")
                message(FATAL_ERROR "geos library not found")
-       else()
-               message(STATUS "geos library not found")
        endif()
 endif()
 if(NOT HAVE_GEOS_LIB)
@@ -1467,9 +1433,7 @@ endif()
 if(NOT ${WITH_GDAL} STREQUAL "NO")
        include(FindGDAL)
 
-       if(GDAL_FOUND)
-               message(STATUS "gdal library found")
-       elseif(${ENABLE_SHP} STREQUAL "YES")
+       if(NOT GDAL_FOUND AND ${ENABLE_SHP} STREQUAL "YES")
                message(FATAL_ERROR "gdal library required for ESRI Shapefile 
vault")
        endif()
 endif()
@@ -1483,7 +1447,6 @@ if(NOT ${ENABLE_FITS} STREQUAL "NO") # C
        include(FindCfitsio)
 
        if(CFITSIO_FOUND)
-               message(STATUS "cfitsio library found")
                set(HAVE_FITS ON)
        elseif(${ENABLE_FITS} STREQUAL "YES")
                message(FATAL_ERROR "cfitsio library required for FITS support")
@@ -1507,7 +1470,6 @@ if(NOT ${ENABLE_NETCDF} STREQUAL "NO") #
                                message(STATUS "netcdf library found but 
version is too old: ${NETCDF_VERSION} < ${NETCDF_MINIMUM_VERSION}")
                        endif()
                else()
-                       message(STATUS "netcdf library found")
                        set(HAVE_NETCDF ON)
                endif()
        elseif(${ENABLE_NETCDF} STREQUAL "YES")
@@ -1519,60 +1481,35 @@ if(NOT HAVE_NETCDF)
        set(NETCDF_LIBRARIES "")
 endif()
 
-set(LIBLAS_INCLUDE_DIR "")
-set(LIBLAS_LIBRARIES "")
-set(WITH_LIBLAS "AUTO" CACHE PATH "liblas library is installed in DIR") # 
Check with HAVE_LIBLAS_LIB
-if(NOT ${WITH_LIBLAS} STREQUAL "NO")
-       set(LIBLAS_VERSION_REQUIRED_MIN "1.8.0")
-
-       if(${WITH_LIBLAS} MATCHES "^YES|AUTO$")
-               set(LIBLAS_EXECUTABLE "liblas-config")
-       else()
-               set(LIBLAS_EXECUTABLE "${WITH_LIBLAS}/bin/liblas-config")
-       endif()
-
-       exec_program("${LIBLAS_EXECUTABLE}" ARGS "--version" OUTPUT_VARIABLE 
LIBLAS_VERSION RETURN_VALUE LIBLAS_RC)
-       if(LIBLAS_RC EQUAL 0)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to