Changeset: 4c1a99ae760b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c1a99ae760b Modified Files: CMakeLists.txt README.md cmake/monetdb-options.cmake ctest/cmake/CMakeLists.txt Branch: mbedded Log Message:
fix readme diffs (127 lines): diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,9 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUA cmake_policy(SET CMP0076 OLD) endif() -set(CMAKE_FIND_FRAMEWORK LAST) # We give precedence to UNIX include directories over OS X Frameworks directories +# We give precedence to UNIX include directories over +# OS X Frameworks directories +set(CMAKE_FIND_FRAMEWORK LAST) set(CMAKE_FIND_APPBUNDLE LAST) include(CheckCSourceCompiles REQUIRED) @@ -143,8 +145,8 @@ check_symbol_exists("sysconf" "unistd.h" check_function_exists("task_info" HAVE_TASK_INFO) check_function_exists("times" HAVE_TIMES) check_function_exists("uname" HAVE_UNAME) - -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 +# 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) # Likely unused, because it contained typo's if(HAVE_PTHREAD_H) @@ -266,11 +268,13 @@ set(DATADIR "${CMAKE_INSTALL_FULL_DATADI set(DATA_DIR "${CMAKE_INSTALL_FULL_DATADIR}") set(LOCALSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}") if(WIN32) - string(REPLACE "/" "\\\\" QXLOCALSTATEDIR "${LOCALSTATEDIR}") # Fix cmake conversions + # Fix cmake conversions + string(REPLACE "/" "\\\\" QXLOCALSTATEDIR "${LOCALSTATEDIR}") endif() set(MONETDB_PREFIX "${CMAKE_INSTALL_PREFIX}") if(WIN32) - string(REPLACE "/" "\\\\" MONETDB_PREFIX "${CMAKE_INSTALL_PREFIX}") # Fix cmake conversions + # Fix cmake conversions + string(REPLACE "/" "\\\\" MONETDB_PREFIX "${CMAKE_INSTALL_PREFIX}") endif() set(DATAROOTDIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}") diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -2,34 +2,32 @@ ## Summary -For cmake, you should always build the code in a separate directory, say ${SOURCE}. -The results of the build are stored in a location designated by ${PREFIX}, a full path -to the location you want the binaries to be stored. -Make sure you have these environment variables set and you have write permissions to the ${PREFIX} location +For cmake, you should always build the code in a separate directory, say "build". This directory should be OUTSIDE of the source code tree. The results of the build are stored in this directory. The location on the filesystem is not important, as long as you have permissions to write in that location. -Assuming the monetdb source code is checked out in directory ${SOURCE}. -And if you have all the required packages(See below) to build MonetDB, these are the set of commands -to build and *install* it from source. Install is one of the predefined commands [install, test, mtest] +Assuming the monetdb source code is checked out in directory "/path/to/monetdb/source". And if you have all the required packages (See below) to build MonetDB, these are the set of commands to build and *install* it from source. Install is one of the predefined targets [install, test, mtest]. When you test monetdb, you will likely not want to install it in the default location, the standard GNU directory structure. So you want to set the install prefix variable when generating the build system, using -DCMAKE_INSTALL_PREFIX ``` mkdir build cd build -cmake -DCMAKE_INSTALL_PREFIX=$PREFIX ${SOURCE} +cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/monetdb /path/to/monetdb/source cmake --build . cmake --build . --target install ``` ## Prerequisites -PATH settings ??? +PATH settings: None ROle of clients?? How to install ## Testing -For testing, you likely don't want to install in the default location, so you need to add a parameter to the cmake command. +For testing, you likely don't want to install in the default location, so you need to add the installation prefix parameter to the cmake command. + +But you do not need any configuration to run mtest (on Linux). Just run the command: -The MonetDB Mtest.py program is installed in $PREFIX/lib/python3.7/site-packages/. -You have to set or extend the environment variable $PYTHON3PATH to include this location for Mtest. +``` +cmake --build . --target mtest +``` -##Configuration options +## Configuration options Evidently there are several options to control as illustrated in $SOURCE/cmake/monetdb-options.cmake The important once to choose from are -DCMAKE\_BUILD\_TYPE, which takes the value Release or Debug. @@ -45,7 +43,7 @@ Other relevant properties are also -DAS CONFIGURE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DASSERT=ON -DSTRICT=ON" mkdir build cd build -cmake $CONFIGURE_OPTIONS -DCMAKE_INSTALL_PREFIX=$PREFIX ${SOURCE} +cmake $CONFIGURE_OPTIONS -DCMAKE_INSTALL_PREFIX=/path/to/install/monetdb /path/to/monetdb/source cmake --build . cmake --build . --target install ``` diff --git a/cmake/monetdb-options.cmake b/cmake/monetdb-options.cmake --- a/cmake/monetdb-options.cmake +++ b/cmake/monetdb-options.cmake @@ -87,8 +87,9 @@ cmake_dependent_option(ASSERT "DEVELOPMENT" OFF) -set(ENABLE_STATIC_ANALYSIS "NO" CACHE STRING "Configure for static code analysis (use only if you know what you are doing)") # Check with STATIC_CODE_ANALYSIS +# Check with STATIC_CODE_ANALYSIS # compiler options, profiling (google perf tools), valgrind +set(ENABLE_STATIC_ANALYSIS "NO" CACHE STRING "Configure for static code analysis (use only if you know what you are doing)") option(WITH_BZ2 "Include bz2 support" diff --git a/ctest/cmake/CMakeLists.txt b/ctest/cmake/CMakeLists.txt --- a/ctest/cmake/CMakeLists.txt +++ b/ctest/cmake/CMakeLists.txt @@ -47,6 +47,10 @@ elseif(${LINUX_DISTRO} STREQUAL "fedora" set(DETECT "0") set(UNDETECT "1") endif() + if(${LINUX_DISTRO_VERSION} STREQUAL "32") + set(DETECT "0") + set(UNDETECT "1") + endif() else() message(ERROR "Linux distro: ${LINUX_DISTRO} not known") message(ERROR "Linux distro version: ${LINUX_DISTRO_VERSION} not known") _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list