diff --git a/CMakeLists.txt b/CMakeLists.txt index 990c09b611..31e2346dfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -246,6 +246,8 @@ endif () message( "\n====================| Bro Build Summary |=====================" "\n" + "\nBuild type: ${CMAKE_BUILD_TYPE}" + "\nBuild dir: ${CMAKE_BINARY_DIR}" "\nInstall prefix: ${CMAKE_INSTALL_PREFIX}" "\nBro Script Path: ${BRO_SCRIPT_INSTALL_PATH}" "\nDebug mode: ${ENABLE_DEBUG}" diff --git a/configure b/configure index b58dd84c6a..757dfc595b 100755 --- a/configure +++ b/configure @@ -18,6 +18,12 @@ Usage: $0 [OPTION]... [VAR=VALUE]... Build Options: --builddir=DIR place build files in directory [build] + --build-type=TYPE set CMake build type [RelWithDebInfo]: + - Debug: optimizations off, debug symbols + flags + - MinSizeRel: size optimizations, debugging off + - Release: optimizations on, debugging off + - RelWithDebInfo: optimizations on, + debug symbols on, debug flags off --generator=GENERATOR CMake generator to use (see cmake --help) Installation Directories: @@ -34,7 +40,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... --conf-files-dir=PATH config files installation directory [PREFIX/etc] Optional Features: - --enable-debug compile in debugging mode + --enable-debug compile in debugging mode (like --build-type=Debug) --enable-mobile-ipv6 analyze mobile IPv6 features defined by RFC 6275 --enable-perftools force use of Google perftools on non-Linux systems (automatically on when perftools is present on Linux) @@ -153,6 +159,13 @@ while [ $# -ne 0 ]; do --builddir=*) builddir=$optarg ;; + --build-type=*) + append_cache_entry CMAKE_BUILD_TYPE STRING $optarg + + if [ $(echo "$optarg" | tr [:upper:] [:lower:]) = "debug" ]; then + append_cache_entry ENABLE_DEBUG BOOL true + fi + ;; --generator=*) CMakeGenerator="$optarg" ;;