aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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")