Added more of the status messages under the control of the DEBUG_OUTPUT variable and updated the README.
This commit is contained in:
parent
0e23979609
commit
a0a7a29877
18
README
18
README
@ -164,7 +164,7 @@ explicitly state the locations you can pass additional options to CMake by using
|
||||
values, you can run CMake in interactive mode by using the -i flag or use a CMake GUI (for example, ccmake for command line).
|
||||
|
||||
It is highly recommended to make a separate build directory to build into. This keeps the source and build trees clean and
|
||||
makes it easy to get rid of everything you built.
|
||||
makes it easy to get rid of everything you built by simply deleting the build directory.
|
||||
|
||||
To build MaxScale using CMake:
|
||||
|
||||
@ -172,7 +172,7 @@ To build MaxScale using CMake:
|
||||
|
||||
mkdir build
|
||||
|
||||
cd build
|
||||
cd build
|
||||
|
||||
cmake ..
|
||||
|
||||
@ -183,11 +183,6 @@ To build MaxScale using CMake:
|
||||
This generates the required makefiles in the current directory, compiles and links all the programs and installs
|
||||
all the required files in their right places.
|
||||
|
||||
To build MaxScale using the ccmake GUI:
|
||||
|
||||
ccmake <path to MaxScale source>
|
||||
|
||||
|
||||
If you have your headers and libraries in non-standard locations, you can define those locations at configuration time as such:
|
||||
|
||||
cmake -D<variable>=<value>
|
||||
@ -198,19 +193,20 @@ variable to your desired installation directory and set INSTALL_SYSTEM_FILES=N t
|
||||
If you run into any trouble while configuring CMake, you can always remove the 'CMakeCache.txt' file to clear CMake's
|
||||
internal cache. This resets all values to their defaults and can be used to fix a 'stuck' configuration of CMake. This
|
||||
is also a good reason why you should always build into a separate directory, because you can safely wipe the build directory clean without the
|
||||
danger of deleting important files.
|
||||
danger of deleting important files when something goes wrong.
|
||||
|
||||
All the parameters affecting CMake can be found in 'macros.cmake'. This file also has the parameters CMake uses for testing.
|
||||
The default values that CMake uses can be found in the 'macros.cmake' file. If you wish to change these, edit the 'macros.cmake' file
|
||||
or define the variables manually at configuration time.
|
||||
|
||||
All the variables that control the CMake build process:
|
||||
|
||||
INSTALL_DIR=<path> Installation directory
|
||||
BUILD_TYPE=[None|Debug|Release] Type of the build, defaults to Release (optimized)
|
||||
INSTALL_SYSTEM_FILES=[Y|N] Install startup scripts and ld configuration files
|
||||
EMBEDDED_LIB=<path> Path to the embedded library, filename included
|
||||
EMBEDDED_LIB=<path> Path to the embedded library (libmysqld.a or libmysqld.so)
|
||||
MYSQL_DIR=<path> Path to MySQL headers
|
||||
ERRMSG=<path> Path to errmsg.sys file
|
||||
STATIC_EMBEDDED=[Y|N] Link the static or the dynamic verson of the library
|
||||
STATIC_EMBEDDED=[Y|N] Whether to link the static or the dynamic verson of the library
|
||||
GCOV=[Y|N] Generate gcov output
|
||||
OLEVEL=<0-3> Level of optimization
|
||||
BUILD_TESTS=[Y|N] Build tests
|
||||
|
27
macros.cmake
27
macros.cmake
@ -82,12 +82,15 @@ macro(check_dirs)
|
||||
|
||||
# Find the MySQL headers if they were not defined
|
||||
if(DEFINED MYSQL_DIR)
|
||||
message(STATUS "Searching for MySQL headers at: ${MYSQL_DIR}")
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Searching for MySQL headers at: ${MYSQL_DIR}")
|
||||
endif()
|
||||
find_path(MYSQL_DIR_LOC mysql.h PATHS ${MYSQL_DIR} PATH_SUFFIXES mysql mariadb NO_DEFAULT_PATH)
|
||||
endif()
|
||||
find_path(MYSQL_DIR_LOC mysql.h PATH_SUFFIXES mysql mariadb)
|
||||
message(STATUS "Search returned: ${MYSQL_DIR_LOC}")
|
||||
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Search returned: ${MYSQL_DIR_LOC}")
|
||||
endif()
|
||||
if(${MYSQL_DIR_LOC} STREQUAL "MYSQL_DIR_LOC-NOTFOUND")
|
||||
set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.")
|
||||
message(FATAL_ERROR "Fatal Error: MySQL headers were not found.")
|
||||
@ -117,24 +120,32 @@ macro(check_dirs)
|
||||
set(OLD_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
if (DEFINED EMBEDDED_LIB)
|
||||
message(STATUS "Searching for libmysqld.a at: ${EMBEDDED_LIB}")
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Searching for libmysqld.a at: ${EMBEDDED_LIB}")
|
||||
endif()
|
||||
find_library(EMBEDDED_LIB_STATIC libmysqld.a PATHS ${EMBEDDED_LIB} PATH_SUFFIXES mysql mariadb NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library(EMBEDDED_LIB_STATIC libmysqld.a PATH_SUFFIXES mysql mariadb)
|
||||
endif()
|
||||
message(STATUS "Search returned: ${EMBEDDED_LIB_STATIC}")
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Search returned: ${EMBEDDED_LIB_STATIC}")
|
||||
endif()
|
||||
set(EMBEDDED_LIB ${EMBEDDED_LIB_STATIC} CACHE FILEPATH "Path to libmysqld" FORCE)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${OLD_SUFFIXES})
|
||||
set(OLD_SUFFIXES "" INTERNAL)
|
||||
|
||||
else()
|
||||
if (DEFINED EMBEDDED_LIB)
|
||||
message(STATUS "Searching for libmysqld.so at: ${EMBEDDED_LIB}")
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Searching for libmysqld.so at: ${EMBEDDED_LIB}")
|
||||
endif()
|
||||
find_library(EMBEDDED_LIB_DYNAMIC mysqld PATHS ${EMBEDDED_LIB} PATH_SUFFIXES mysql mariadb NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library(EMBEDDED_LIB_DYNAMIC mysqld PATH_SUFFIXES mysql mariadb)
|
||||
endif()
|
||||
message(STATUS "Search returned: ${EMBEDDED_LIB_DYNAMIC}")
|
||||
if(DEBUG_OUTPUT)
|
||||
message(STATUS "Search returned: ${EMBEDDED_LIB_DYNAMIC}")
|
||||
endif()
|
||||
set(EMBEDDED_LIB ${EMBEDDED_LIB_DYNAMIC} CACHE FILEPATH "Path to libmysqld" FORCE)
|
||||
|
||||
endif()
|
||||
@ -182,7 +193,7 @@ macro(check_dirs)
|
||||
message(STATUS "Using RabbitMQ libraries found at: ${RABBITMQ_LIB}")
|
||||
endif()
|
||||
|
||||
if(DEFINED RABBITMQ_HEADERS)
|
||||
if(DEFINED RABBITMQ_HEADERS)
|
||||
find_file(RMQ_HEADERS amqp.h PATHS ${RABBITMQ_HEADERS} NO_DEFAULT_PATH)
|
||||
endif()
|
||||
find_file(RMQ_HEADERS amqp.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user