From f279f58a72d0eb28b86d47be04b81006290c1d7d Mon Sep 17 00:00:00 2001 From: Andrei Poenaru Date: Tue, 30 Mar 2021 17:08:03 +0300 Subject: [PATCH] Improve CMake messages --- CMakeLists.txt | 14 ++++++-------- register_models.cmake | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d46007c..17669a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,15 +81,16 @@ endmacro() # hint common extra flag options for all models if they are not set hint_flag(CXX_EXTRA_FLAGS " - Appends to common compile flags, this will be appended at link phase as well. + Appends to common compile flags. These will be appended at link phase as well. To use separate flags at link phase, set `CXX_EXTRA_LINK_FLAGS`") hint_flag(CXX_EXTRA_LINK_FLAGS " - Appends to link flags (i.e appended only at link phase) which appears *before* the objects. - Do not use this for linking libraries as the link line is order dependent") + Appends to link flags which appear *before* the objects. + Do not use this for linking libraries, as the link line is order-dependent") hint_flag(CXX_EXTRA_LIBRARIES " - Append to link flags which appears *after* the objects, use this for linking extra libraries (e.g `-lmylib`, or simply `mylib`)") + Append to link flags which appear *after* the objects. + Use this for linking extra libraries (e.g `-lmylib`, or simply `mylib`)") hint_flag(CXX_EXTRA_LINKER_FLAGS " - Append to linker flags (i.e GCC's -Wl or equivalent)") + Append to linker flags (i.e GCC's `-Wl` or equivalent)") # copy CXX_EXTRA_FLAGS <- CXX_EXTRA_LINK_FLAGS if ((DEFINED CXX_EXTRA_FLAGS) AND (NOT DEFINED CXX_EXTRA_LINK_FLAGS)) @@ -187,6 +188,3 @@ target_link_options(${EXE_NAME} PUBLIC ${LINK_FLAGS} ${CXX_EXTRA_LINK_FLAGS}) if (COMMAND setup_target) setup_target(${EXE_NAME}) endif () - - - diff --git a/register_models.cmake b/register_models.cmake index a4f7a94..82e7243 100644 --- a/register_models.cmake +++ b/register_models.cmake @@ -73,7 +73,7 @@ function(registered_flags_action ACTION OUT) if (${ACTION} STREQUAL "print") set(LINE "Supported flags:\n\n") elseif (${ACTION} STREQUAL "check") - set(LINE "Picked up model specific flags for this build:\n\n") + set(LINE "Model-specific flags for this build:\n\n") endif () @@ -143,4 +143,4 @@ macro(load_model MODEL) else () message(FATAL_ERROR "Unsupported model: ${MODEL}") endif () -endmacro() \ No newline at end of file +endmacro()