2016-11-03 12:06:33 +00:00
|
|
|
#
|
|
|
|
# Output build summary
|
|
|
|
#
|
|
|
|
|
2016-11-20 22:04:31 +00:00
|
|
|
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()
|
|
|
|
|
2017-01-19 04:38:42 +00:00
|
|
|
message(STATUS " Build:")
|
2016-12-23 15:58:05 +00:00
|
|
|
if(CMAKE_BUILD_TYPE)
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " Type: ${CMAKE_BUILD_TYPE}" "37;2")
|
2016-12-23 15:58:05 +00:00
|
|
|
else()
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " Type: NONE" "33;1")
|
2016-12-23 15:58:05 +00:00
|
|
|
endif()
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2016-12-21 22:22:02 +00:00
|
|
|
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
|
|
|
if(CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
|
2016-11-03 12:06:33 +00:00
|
|
|
if(NOT DEFINED ${DEBUG_LOGGER})
|
|
|
|
set(DEBUG_LOGGER ON)
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED ${ENABLE_CCACHE})
|
|
|
|
set(ENABLE_CCACHE ON)
|
|
|
|
endif()
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " CC: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}" "37;2")
|
|
|
|
message_colored(STATUS " CXX: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}" "37;2")
|
|
|
|
message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS}${CMAKE_EXE_LINKER_FLAGS_DEBUG}" "37;2")
|
2016-12-21 22:22:02 +00:00
|
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "release")
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " CC: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}" "37;2")
|
|
|
|
message_colored(STATUS " CXX: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" "37;2")
|
|
|
|
message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS}${CMAKE_EXE_LINKER_FLAGS_RELEASE}" "37;2")
|
2016-12-21 22:22:02 +00:00
|
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "sanitize")
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " CC: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_SANITIZE}" "37;2")
|
|
|
|
message_colored(STATUS " CXX: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_SANITIZE}" "37;2")
|
|
|
|
message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS}${CMAKE_EXE_LINKER_FLAGS_SANITIZE}" "37;2")
|
2016-12-21 22:22:02 +00:00
|
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "minsizerel")
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " CC: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_MINSIZEREL}" "37;2")
|
|
|
|
message_colored(STATUS " CXX: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" "37;2")
|
|
|
|
message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS}${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}" "37;2")
|
2016-12-21 22:22:02 +00:00
|
|
|
elseif(CMAKE_BUILD_TYPE_LOWER STREQUAL "relwithdebinfo")
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " CC: ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELWITHDEBINFO}" "37;2")
|
|
|
|
message_colored(STATUS " CXX: ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" "37;2")
|
|
|
|
message_colored(STATUS " LD: ${CMAKE_LINKER} ${CMAKE_EXE_LINKER_FLAGS}${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}" "37;2")
|
2016-11-03 12:06:33 +00:00
|
|
|
endif()
|
|
|
|
|
2016-12-23 15:58:05 +00:00
|
|
|
if(CMAKE_EXE_LINKER_FLAGS)
|
2017-01-19 04:38:42 +00:00
|
|
|
message_colored(STATUS " LD: ${CMAKE_EXE_LINKER_FLAGS}" "37;2")
|
2016-12-23 15:58:05 +00:00
|
|
|
endif()
|
2016-11-20 22:04:31 +00:00
|
|
|
|
2017-01-19 04:38:42 +00:00
|
|
|
message(STATUS " Targets:")
|
|
|
|
colored_option(STATUS " polybar-msg" BUILD_IPC_MSG "32;1" "37;2")
|
|
|
|
colored_option(STATUS " testsuite" BUILD_TESTS "32;1" "37;2")
|
|
|
|
|
|
|
|
message(STATUS " Module supprt:")
|
|
|
|
colored_option(STATUS " alsa" ENABLE_ALSA "32;1" "37;2")
|
|
|
|
colored_option(STATUS " curl" ENABLE_CURL "32;1" "37;2")
|
|
|
|
colored_option(STATUS " i3" ENABLE_I3 "32;1" "37;2")
|
|
|
|
colored_option(STATUS " mpd" ENABLE_MPD "32;1" "37;2")
|
|
|
|
colored_option(STATUS " network" ENABLE_NETWORK "32;1" "37;2")
|
|
|
|
message(STATUS " X extensions:")
|
2017-01-24 07:49:27 +00:00
|
|
|
colored_option(STATUS " xcb-randr" WITH_XRANDR "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-randr (monitor support)" ENABLE_XRANDR_MONITORS "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-render" WITH_XRENDER "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-damage" WITH_XDAMAGE "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-sync" WITH_XSYNC "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-composite" WITH_XCOMPOSITE "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-xkb" WITH_XKB "32;1" "37;2")
|
|
|
|
colored_option(STATUS " xcb-xrm" WITH_XRM "32;1" "37;2")
|
2016-11-03 12:06:33 +00:00
|
|
|
|
2017-01-19 04:38:42 +00:00
|
|
|
if(CMAKE_BUILD_TYPE_LOWER STREQUAL "debug")
|
|
|
|
message(STATUS " Debug options:")
|
|
|
|
colored_option(STATUS " Trace logging" DEBUG_LOGGER "32;1" "37;2")
|
|
|
|
colored_option(STATUS " Trace logging (verbose)" DEBUG_LOGGER_VERBOSE "32;1" "37;2")
|
|
|
|
colored_option(STATUS " Draw clickable areas" DEBUG_HINTS "32;1" "37;2")
|
|
|
|
colored_option(STATUS " Print fc-match details" DEBUG_FONTCONFIG "32;1" "37;2")
|
|
|
|
colored_option(STATUS " Enable window shading" DEBUG_SHADED "32;1" "37;2")
|
|
|
|
message(STATUS "--------------------------")
|
|
|
|
endif()
|