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

Set default values for optional libraries when not found, plus the first 
version of notes.


diffs (253 lines):

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -763,6 +763,10 @@ if(NOT ${WITH_BZ2} STREQUAL "NO")
                message(STATUS "bz2 library not found")
        endif()
 endif()
+if(NOT BZip2_FOUND)
+       set(BZIP2_INCLUDE_DIR "")
+       set(BZIP2_LIBRARIES "")
+endif()
 
 set(WITH_SNAPPY "AUTO" CACHE STRING "Include snappy support (default=AUTO)") # 
Check with HAVE_LIBSNAPPY
 if(NOT ${WITH_SNAPPY} STREQUAL "NO")
@@ -777,6 +781,10 @@ if(NOT ${WITH_SNAPPY} STREQUAL "NO")
                message(STATUS "snappy library not found")
        endif()
 endif()
+if(NOT SNAPPY_FOUND)
+       set(SNAPPY_INCLUDE_DIR "")
+       set(SNAPPY_LIBRARIES "")
+endif()
 
 set(WITH_LZ4 "AUTO" CACHE STRING "Include lz4 library support (default=AUTO)") 
# Check with HAVE_LIBLZ4
 if(NOT ${WITH_LZ4} STREQUAL "NO")
@@ -800,14 +808,25 @@ if(NOT ${WITH_LZ4} STREQUAL "NO")
                message(STATUS "lz4 library not found")
        endif()
 endif()
+if(NOT LZ4_FOUND)
+       set(LZ4_INCLUDE_DIR "")
+       set(LZ4_LIBRARIES "")
+endif()
 
+set(DL_LIBRARIES "")
 if(UNIX)
        find_library(MATH_LIBRARIES NAMES m DOC "m library to link")
        set(DL_LIBRARIES ${CMAKE_DL_LIBS})
 endif()
+if(NOT MATH_LIBRARIES)
+       set(MATH_LIBRARIES "" CACHE STRING "m library to link")
+endif()
 if(WIN32)
        find_library(PSAPILIB_LIBRARIES NAMES psapi DOC "psapi library to link")
 endif()
+if(NOT PSAPILIB_LIBRARIES)
+       set(PSAPILIB_LIBRARIES "" CACHE STRING "psapi library to link")
+endif()
 
 # Malloc libs
 set(MALLOC_LIBRARIES "")
@@ -933,6 +952,7 @@ if(NOT ${WITH_READLINE} STREQUAL "NO")
 endif()
 
 # Iconv
+set(ICONV_LIBRARIES "")
 if(Iconv_FOUND)
        set(HAVE_ICONV ON)
        set(HAVE_ICONV_H ON)
@@ -968,6 +988,7 @@ if(Iconv_FOUND)
 endif()
 
 # UUID
+set(UUID_LIBRARIES "")
 set(WITH_UUID "YES" CACHE STRING "Include UUID support (default=YES)") # Check 
with HAVE_UUID
 if(NOT ${WITH_UUID} STREQUAL "NO")
        cmake_push_check_state()
@@ -1106,6 +1127,8 @@ if(NOT ${WITH_REGEX} STREQUAL "POSIX")
 endif()
 
 if(NOT HAVE_LIBPCRE)
+       set(PCRE_INCLUDE_DIR "")
+       set(PCRE_LIBRARIES "")
        message(STATUS "Checking for GNU regex library")
        check_symbol_exists("regcomp" "regex.h" HAVE_POSIX_REGEX)
 endif()
@@ -1133,6 +1156,10 @@ if(NOT ${WITH_LIBXML2} STREQUAL "NO")
                message(STATUS "libxml2 library not found")
        endif()
 endif()
+if(NOT LIBXML2_FOUND)
+       set(LIBXML2_INCLUDE_DIR "")
+       set(LIBXML2_LIBRARIES "")
+endif()
 
 set(WITH_CURL "AUTO" CACHE STRING "Include cURL support (default=AUTO)") # 
Check with HAVE_CURL
 if(NOT ${WITH_CURL} STREQUAL "NO")
@@ -1147,6 +1174,10 @@ if(NOT ${WITH_CURL} STREQUAL "NO")
                message(STATUS "libcurl library not found")
        endif()
 endif()
+if(NOT CURL_FOUND)
+       set(CURL_INCLUDE_DIR "")
+       set(CURL_LIBRARIES "")
+endif()
 
 set(WITH_ZLIB "AUTO" CACHE STRING "Include zlib support (default=AUTO)") # 
Check with HAVE_LIBZ
 if(NOT ${WITH_ZLIB} STREQUAL "NO")
@@ -1161,6 +1192,10 @@ if(NOT ${WITH_ZLIB} STREQUAL "NO")
                message(STATUS "zlib library not found")
        endif()
 endif()
+if(NOT ZLIB_FOUND)
+       set(ZLIB_INCLUDE_DIR "")
+       set(ZLIB_LIBRARIES "")
+endif()
 
 set(WITH_LIBLZMA "AUTO" CACHE STRING "Include liblzma support (default=AUTO)") 
# Check with HAVE_LIBLZMA
 if(NOT ${WITH_LIBLZMA} STREQUAL "NO")
@@ -1175,6 +1210,10 @@ if(NOT ${WITH_LIBLZMA} STREQUAL "NO")
                message(STATUS "liblzma library not found")
        endif()
 endif()
+if(NOT LIBLZMA_FOUND)
+       set(LIBLZMA_INCLUDE_DIR "")
+       set(LIBLZMA_LIBRARIES "")
+endif()
 
 set(WITH_VALGRIND "NO" CACHE STRING "Include valgrind support (default=NO)") # 
Check with HAVE_VALGRIND
 if(NOT ${WITH_VALGRIND} STREQUAL "NO")
@@ -1189,6 +1228,10 @@ if(NOT ${WITH_VALGRIND} STREQUAL "NO")
                message(STATUS "valgrind library not found")
        endif()
 endif()
+if(NOT VALGRIND_FOUND)
+       set(VALGRIND_INCLUDE_DIR "")
+       set(VALGRIND_LIBRARIES "")
+endif()
 
 set(R_HOME "")
 set(R_INCS "")
@@ -1438,6 +1481,10 @@ if(NOT ${WITH_PROJ} STREQUAL "NO")
                message(STATUS "proj library not found")
        endif()
 endif()
+if(NOT PROJ_FOUND)
+       set(PROJ_INCLUDE_DIR "")
+       set(PROJ_LIBRARIES "")
+endif()
 
 set(SAMTOOLS_INCLUDE_DIR "")
 set(SAMTOOLS_LIBRARY_DIR "")
@@ -1589,6 +1636,10 @@ if(NOT ${WITH_GDAL} STREQUAL "NO")
                message(FATAL_ERROR "gdal library required for ESRI Shapefile 
vault")
        endif()
 endif()
+if(NOT GDAL_FOUND)
+       set(GDAL_INCLUDE_DIR "")
+       set(GDAL_LIBRARIES "")
+endif()
 
 set(ENABLE_FITS "AUTO" CACHE STRING "Enable support for FITS (default=AUTO)")
 if(NOT ${ENABLE_FITS} STREQUAL "NO") # Check with CFITSIO_FOUND
@@ -1601,6 +1652,10 @@ if(NOT ${ENABLE_FITS} STREQUAL "NO") # C
                message(FATAL_ERROR "cfitsio library required for FITS support")
        endif()
 endif()
+if(NOT CFITSIO_FOUND)
+       set(CFITSIO_INCLUDE_DIR "")
+       set(CFITSIO_LIBRARIES "")
+endif()
 
 set(ENABLE_NETCDF "AUTO" CACHE STRING "Enable support for netcdf 
(default=AUTO)")
 if(NOT ${ENABLE_NETCDF} STREQUAL "NO") # Check with NETCDF_FOUND
@@ -1622,6 +1677,10 @@ if(NOT ${ENABLE_NETCDF} STREQUAL "NO") #
                message(FATAL_ERROR "netcdf library required for NetCDF 
support")
        endif()
 endif()
+if(NOT NETCDF_FOUND)
+       set(NETCDF_INCLUDE_DIR "")
+       set(NETCDF_LIBRARIES "")
+endif()
 
 set(LIBLAS_INCS "")
 set(LIBLAS_LIBS "")
diff --git a/CMakeReadme.txt b/CMakeReadme.txt
new file mode 100644
--- /dev/null
+++ b/CMakeReadme.txt
@@ -0,0 +1,73 @@
+While running the cmake command set internal variables to change the build 
properties in the form -D<var>=<value>
+
+- Variables intrinsic to Cmake
+CMAKE_BUILD_TYPE - Set the build type: Debug or Release (default Debug)
+CMAKE_C_FLAGS - C compilation flags used for all builds
+CMAKE_C_FLAGS_DEBUG - C compilation flags used for Debug build
+CMAKE_C_FLAGS_RELEASE - C compilation flags used for Release build
+CMAKE_INSTALL_PREFIX - Installation directory
+LINK_OPTIONS - Linker options for all builds
+
+- Compilation options
+ENABLE_ASSERT
+ENABLE_DEVELOPER
+ENABLE_SANITIZER
+ENABLE_STATIC_ANALYSIS
+ENABLE_STRICT
+
+- Available Monetdb features
+ENABLE_EMBEDDED
+ENABLE_FITS
+ENABLE_GDK
+ENABLE_GEOM
+ENABLE_INT128
+ENABLE_LIDAR
+ENABLE_MAPI
+ENABLE_MONETDB5
+ENABLE_NETCDF
+ENABLE_ODBC
+ENABLE_PY2INTEGRATION
+ENABLE_PY3INTEGRATION
+ENABLE_RINTEGRATION
+ENABLE_SHP
+ENABLE_SQL
+ENABLE_TESTING
+
+- GNU installation directories (only on UNIX platforms)
+LOGDIR
+RUNDIR
+
+PASSWORD_BACKEND
+
+- Python configuration
+PYTHON2
+PYTHON2_CONFIG
+PYTHON2_LIBDIR
+PYTHON3
+PYTHON3_CONFIG
+PYTHON3_LIBDIR
+
+- Extra libraries
+WITH_BZ2
+WITH_CURL
+WITH_GDAL
+WITH_GEOS
+WITH_LIBLAS
+WITH_LIBLZMA
+WITH_LIBXML2
+WITH_LZ4
+WITH_OPENSSL (not available on MacOS X)
+WITH_PROJ
+WITH_PTHREAD (not available on Windows)
+WITH_READLINE
+WITH_REGEX
+WITH_SAMTOOLS
+WITH_SNAPPY
+WITH_UNIXODBC (only if ENABLE_ODBC enabled)
+WITH_UUID
+WITH_VALGRIND
+WITH_ZLIB
+
+Linux notes:
+ - Make install doesn't run ldconfig, use LD_LIBRARY_PATH 
https://cmake.org/pipermail/cmake/2016-June/063721.html
+ - libtools files are not generated yet.
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to