aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-07-16 12:44:22 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2021-07-16 12:25:46 +0000
commitf2912e02cec27348900e49220e45eb65f75236c3 (patch)
tree8939528812ac5be58e7e74b5724b494d89bc8afe /src
parent537e955545c54820e9a6a54225bfb280f7cd7763 (diff)
build: fix formatting of CMake config output
Type: make Change-Id: I6e40817609d022cb70887f70aa3608dc759fcd76 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt24
-rw-r--r--src/cmake/misc.cmake4
2 files changed, 15 insertions, 13 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 84631203265..49ea0373eb4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -92,7 +92,7 @@ set(CMAKE_C_FLAGS_DEBUG "")
if (${CMAKE_BUILD_TYPE_LC} MATCHES "release")
add_compile_options(-O3 -fstack-protector -fno-common)
add_compile_definitions(_FORTIFY_SOURCE=2)
- string(CONCAT CMAKE_EXE_LINKER_FLAGS_RELEASE "-pie")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-pie")
elseif (${CMAKE_BUILD_TYPE_LC} MATCHES "debug")
add_compile_options(-O0 -fstack-protector -fno-common)
add_compile_definitions(CLIB_DEBUG)
@@ -255,14 +255,14 @@ mark_as_advanced(CLEAR
# print configuration
##############################################################################
message(STATUS "Configuration:")
-pr("VPP version" "${VPP_VERSION}")
-pr("VPP library version" "${VPP_LIB_VERSION}")
-pr("GIT toplevel dir" "${VPP_GIT_TOPLEVEL_DIR}")
-pr("Build type" "${CMAKE_BUILD_TYPE}")
-pr("C flags" "${CMAKE_C_FLAGS}${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
-pr("Linker flags (apps)" "${CMAKE_EXE_LINKER_FLAGS}${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
-pr("Linker flags (libs)" "${CMAKE_SHARED_LINKER_FLAGS}${CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
-pr("Host processor" "${CMAKE_HOST_SYSTEM_PROCESSOR}")
-pr("Target processor" "${CMAKE_SYSTEM_PROCESSOR}")
-pr("Prefix path" "${CMAKE_PREFIX_PATH}")
-pr("Install prefix" "${CMAKE_INSTALL_PREFIX}")
+pr("VPP version" ${VPP_VERSION})
+pr("VPP library version" ${VPP_LIB_VERSION})
+pr("GIT toplevel dir" ${VPP_GIT_TOPLEVEL_DIR})
+pr("Build type" ${CMAKE_BUILD_TYPE})
+pr("C flags" ${CMAKE_C_FLAGS}${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}})
+pr("Linker flags (apps)" ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}})
+pr("Linker flags (libs)" ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}})
+pr("Host processor" ${CMAKE_HOST_SYSTEM_PROCESSOR})
+pr("Target processor" ${CMAKE_SYSTEM_PROCESSOR})
+pr("Prefix path" ${CMAKE_PREFIX_PATH})
+pr("Install prefix" ${CMAKE_INSTALL_PREFIX})
diff --git a/src/cmake/misc.cmake b/src/cmake/misc.cmake
index 9542557ce9d..14c7d495ead 100644
--- a/src/cmake/misc.cmake
+++ b/src/cmake/misc.cmake
@@ -39,7 +39,9 @@ endfunction()
##############################################################################
# aligned config output
##############################################################################
-function(pr desc val)
+function(pr desc)
+ # CMake 3.12+: list(JOIN ARGN " " val)
+ string(REPLACE ";" " " val "${ARGN}")
if("$ENV{TERM}" STREQUAL "xterm-256color")
string(ASCII 27 esc)
set(reset "${esc}[m")