Commit cba355bc authored by Matthias Vallentin's avatar Matthias Vallentin

New configure option: --build-type.

Other perks:

    - Renamed --builddir to --build-dir for consistency.
    - The CMake build summary contains more detailed information.
parent b6d7d76e
......@@ -221,22 +221,30 @@ add_dependencies(distributed libcppa)
add_dependencies(matching libcppa)
string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
set(CONTEXT_SWITCHING true)
if (DISABLE_CONTEXT_SWITCHING)
set(CONTEXT_SWITCHING false)
endif()
message(
"\n====================| Build Summary |===================="
"\n"
"\nLibcppa version: ${LIBRARY_VERSION}"
"\nLibcppa version: ${LIBRARY_VERSION}"
"\n"
"\nBuild type: ${CMAKE_BUILD_TYPE}"
"\nDebug mode: ${ENABLE_DEBUG}"
"\nContext switching: ${CONTEXT_SWITCHING}"
"\n"
"\nSource directory: ${CMAKE_SOURCE_DIR}"
"\nBuild directory: ${CMAKE_BINARY_DIR}"
"\nExecutable path: ${EXECUTABLE_OUTPUT_PATH}"
"\nLibrary path: ${LIBRARY_OUTPUT_PATH}"
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
"\nDebug mode: ${ENABLE_DEBUG}"
"\nCXX: ${CMAKE_CXX_COMPILER}"
"\nCXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${build_type}}"
"\n"
"\nCXX: ${CMAKE_CXX_COMPILER}"
"\nCXXFLAGS: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${build_type}}"
"\nSource directory: ${CMAKE_SOURCE_DIR}"
"\nBuild directory: ${CMAKE_BINARY_DIR}"
"\nExecutable path: ${EXECUTABLE_OUTPUT_PATH}"
"\nLibrary path: ${LIBRARY_OUTPUT_PATH}"
"\nInstall prefix: ${CMAKE_INSTALL_PREFIX}"
"\n"
"\nBoost: ${Boost_INCLUDE_DIR}"
"\nBoost: ${Boost_INCLUDE_DIR}"
"\n"
"\n===========================================================\n"
)
......@@ -17,12 +17,17 @@ usage="\
Usage: $0 [OPTION]... [VAR=VALUE]...
Build Options:
--builddir=DIR place build files in directory [build]
--generator=GENERATOR CMake generator to use (see cmake --help)
--with-clang=FILE path to clang++ executable
--with-gcc=FILE path to g++ executable
--build-type=DIR CMake build type: [RelWithDebInfo]
- Debug: debugging flags enabled
- MinSizeRel: minimal output size
- Release: optimizations on, debugging off
- RelWithDebInfo: release flags plus debugging
--build-dir=DIR place build files in directory [build]
--bin-dir=DIR executable directory [build/bin]
--lib-dir=DIR library directory [build/lib]
--with-clang=FILE path to clang++ executable
--with-gcc=FILE path to g++ executable
--dual-build build both with gcc and clang
Installation Directories:
......@@ -30,6 +35,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
Optional Features:
--enable-debug compile in debugging mode
(always sets --build-type=Debug)
--enable-perftools use Google perftools
Platform-Dependent Adjustments:
......@@ -115,6 +121,7 @@ configure ()
# Set defaults.
builddir="$sourcedir/build"
CMakeCacheEntries=""
append_cache_entry CMAKE_BUILD_TYPE STRING RelWithDebInfo
append_cache_entry CMAKE_INSTALL_PREFIX PATH /usr/local
append_cache_entry ENABLE_DEBUG BOOL false
append_cache_entry DISABLE_CONTEXT_SWITCHING BOOL false
......@@ -131,9 +138,6 @@ while [ $# -ne 0 ]; do
echo "${usage}" 1>&2
exit 1
;;
--builddir=*)
builddir=$optarg
;;
--generator=*)
CMakeGenerator="$optarg"
;;
......@@ -155,6 +159,12 @@ while [ $# -ne 0 ]; do
--with-gcc=*)
gcc=$optarg
;;
--build-type=*)
append_cache_entry CMAKE_BUILD_TYPE STRING $optarg
;;
--build-dir=*)
builddir=$optarg
;;
--bin-dir=*)
bindir=$optarg
;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment