e1483c3f65
Drop the Xlib version and handle X resource lookups using xcb-util-xrm Refs #356
80 lines
3.7 KiB
CMake
80 lines
3.7 KiB
CMake
#
|
|
# Output build summary
|
|
#
|
|
|
|
function(colored_option message_level text var color_on color_off)
|
|
string(ASCII 27 esc)
|
|
if(${var})
|
|
message(${message_level} "${esc}[${color_on}m${text}${esc}[0m")
|
|
else()
|
|
message(${message_level} "${esc}[${color_off}m${text}${esc}[0m")
|
|
endif()
|
|
endfunction()
|
|
|
|
message(STATUS "--------------------------")
|
|
if(CMAKE_BUILD_TYPE)
|
|
message_colored(STATUS " Build type: ${CMAKE_BUILD_TYPE}" "32;1")
|
|
else()
|
|
message_colored(STATUS " Build type: NONE" "33;1")
|
|
endif()
|
|
message(STATUS " Compiler C: ${CMAKE_C_COMPILER}")
|
|
message(STATUS " Compiler C++: ${CMAKE_CXX_COMPILER}")
|
|
message(STATUS " Compiler flags: ${CMAKE_CXX_FLAGS}")
|
|
|
|
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
|
if(CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
|
|
message(STATUS " debug flags: ${CMAKE_CXX_FLAGS_DEBUG}")
|
|
if(NOT DEFINED ${DEBUG_LOGGER})
|
|
set(DEBUG_LOGGER ON)
|
|
endif()
|
|
if(NOT DEFINED ${ENABLE_CCACHE})
|
|
set(ENABLE_CCACHE ON)
|
|
endif()
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "release")
|
|
message(STATUS " release: ${CMAKE_CXX_FLAGS_RELEASE}")
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "sanitize")
|
|
message(STATUS " sanitize: ${CMAKE_CXX_FLAGS_SANITIZE}")
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "minsizerel")
|
|
message(STATUS " minsizerel: ${CMAKE_CXX_FLAGS_MINSIZEREL}")
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "relwithdebinfo")
|
|
message(STATUS " relwithdebinfo: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
|
|
endif()
|
|
|
|
if(CMAKE_EXE_LINKER_FLAGS)
|
|
message(STATUS " Linker flags: ${CMAKE_EXE_LINKER_FLAGS}")
|
|
endif()
|
|
|
|
if(CXXLIB_CLANG)
|
|
message(STATUS " C++ library: libc++")
|
|
elseif(CXXLIB_GCC)
|
|
message(STATUS " C++ library: libstdc++")
|
|
else()
|
|
message(STATUS " C++ library: system default")
|
|
endif()
|
|
|
|
message(STATUS "--------------------------")
|
|
colored_option(STATUS " Build polybar-msg ${BUILD_IPC_MSG}" BUILD_IPC_MSG "32;1" "37;2")
|
|
colored_option(STATUS " Build testsuite ${BUILD_TESTS}" BUILD_TESTS "32;1" "37;2")
|
|
colored_option(STATUS " Debug logging ${DEBUG_LOGGER}" DEBUG_LOGGER "32;1" "37;2")
|
|
colored_option(STATUS " + Verbose tracing ${DEBUG_LOGGER_TRACE}" DEBUG_LOGGER_TRACE "32;1" "37;2")
|
|
colored_option(STATUS " Draw debug hints ${DEBUG_HINTS}" DEBUG_HINTS "32;1" "37;2")
|
|
colored_option(STATUS " Draw whitespace ${DEBUG_WHITESPACE}" DEBUG_WHITESPACE "32;1" "37;2")
|
|
colored_option(STATUS " Enable ccache ${ENABLE_CCACHE}" ENABLE_CCACHE "32;1" "37;2")
|
|
message(STATUS "--------------------------")
|
|
colored_option(STATUS " Enable alsa ${ENABLE_ALSA}" ENABLE_ALSA "32;1" "37;2")
|
|
colored_option(STATUS " Enable curl ${ENABLE_CURL}" ENABLE_CURL "32;1" "37;2")
|
|
colored_option(STATUS " Enable i3 ${ENABLE_I3}" ENABLE_I3 "32;1" "37;2")
|
|
colored_option(STATUS " Enable mpd ${ENABLE_MPD}" ENABLE_MPD "32;1" "37;2")
|
|
colored_option(STATUS " Enable network ${ENABLE_NETWORK}" ENABLE_NETWORK "32;1" "37;2")
|
|
message(STATUS "--------------------------")
|
|
colored_option(STATUS " XRANDR support ${WITH_XRANDR}" WITH_XRANDR "32;1" "37;2")
|
|
colored_option(STATUS " + XRandR monitors ${ENABLE_XRANDR_MONITORS}" ENABLE_XRANDR_MONITORS "32;1" "37;2")
|
|
colored_option(STATUS " XRENDER support ${WITH_XRENDER}" WITH_XRENDER "32;1" "37;2")
|
|
colored_option(STATUS " XDAMAGE support ${WITH_XDAMAGE}" WITH_XDAMAGE "32;1" "37;2")
|
|
colored_option(STATUS " XSYNC support ${WITH_XSYNC}" WITH_XSYNC "32;1" "37;2")
|
|
colored_option(STATUS " XCOMPOSITE support ${WITH_XCOMPOSITE}" WITH_XCOMPOSITE "32;1" "37;2")
|
|
colored_option(STATUS " XKB support ${WITH_XKB}" WITH_XKB "32;1" "37;2")
|
|
message(STATUS "--------------------------")
|
|
colored_option(STATUS " xcb-util-xrm ${WITH_XCB_UTIL_XRM}" WITH_XCB_UTIL_XRM "32;1" "37;2")
|
|
message(STATUS "--------------------------")
|