Merge branch 'better-report' into next

Improve CMake summary report
This commit is contained in:
Carles Fernandez 2020-02-04 08:14:48 +01:00
commit 22f87389d0
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
4 changed files with 66 additions and 11 deletions

View File

@ -191,7 +191,11 @@ endif()
# Detect Linux Distribution
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
include(DetectLinuxDistro)
message(STATUS "Configuring GNSS-SDR v${VERSION} to be built on ${LINUX_DISTRIBUTION} GNU/Linux Release ${LINUX_VER} ${ARCH_}")
if(CMAKE_CROSSCOMPILING)
message(STATUS "Configuring GNSS-SDR v${VERSION} to be cross-compiled on ${LINUX_DISTRIBUTION} ${LINUX_VER} (${CMAKE_HOST_SYSTEM_PROCESSOR}) for ${CMAKE_SYSTEM_PROCESSOR} ${ARCHITECTURE_STRING}")
else()
message(STATUS "Configuring GNSS-SDR v${VERSION} to be built on GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCHITECTURE_STRING}")
endif()
endif()
# Detect macOS / Mac OS X Version
@ -2801,9 +2805,41 @@ message(STATUS "***************************************")
message(STATUS "* SUMMARY REPORT *")
message(STATUS "***************************************")
message(STATUS "")
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cross-compiling on ${LINUX_DISTRIBUTION} ${LINUX_VER} (${CMAKE_HOST_SYSTEM_PROCESSOR}) for ${CMAKE_SYSTEM_PROCESSOR} ${ARCHITECTURE_STRING}")
else()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
message(STATUS "Building on GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCHITECTURE_STRING}")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message(STATUS "Building on ${MACOS_DISTRIBUTION}")
endif()
endif()
message(STATUS "CMake version: ${CMAKE_VERSION}")
message(STATUS "The CXX compiler identification is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "The C compiler identification is ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
message(STATUS "")
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/features.log)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/features.log "**********************************\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "* BUILDING CONFIGURATION SUMMARY *\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "**********************************\n\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "GNSS-SDR version: ${VERSION}\n")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
if(CMAKE_CROSSCOMPILING)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "Cross-compiling on ${LINUX_DISTRIBUTION} ${LINUX_VER} (${CMAKE_HOST_SYSTEM_PROCESSOR}) for ${CMAKE_SYSTEM_PROCESSOR} ${ARCHITECTURE_STRING}\n")
else()
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "Building on GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCHITECTURE_STRING}\n")
endif()
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "Building on ${MACOS_DISTRIBUTION}\n")
endif()
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "CMake version: ${CMAKE_VERSION}\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "The CXX compiler identification is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/features.log "The C compiler identification is ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}\n\n")
if(CMAKE_VERSION VERSION_LESS 3.4)
feature_summary(WHAT ALL)
feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT ALL)
feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log APPEND WHAT ALL)
else()
feature_summary(WHAT
REQUIRED_PACKAGES_FOUND
@ -2813,7 +2849,7 @@ else()
ENABLED_FEATURES
DISABLED_FEATURES
)
feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log WHAT
feature_summary(FILENAME ${CMAKE_CURRENT_BINARY_DIR}/features.log APPEND WHAT
REQUIRED_PACKAGES_FOUND
REQUIRED_PACKAGES_NOT_FOUND
OPTIONAL_PACKAGES_FOUND

View File

@ -16,9 +16,9 @@
# along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH_ "(64 bits)")
set(ARCHITECTURE_STRING "(64 bits)")
else()
set(ARCH_ "(32 bits)")
set(ARCHITECTURE_STRING "(32 bits)")
endif()
if(EXISTS "/etc/lsb-release")
@ -61,7 +61,7 @@ if(NOT LINUX_DISTRIBUTION)
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_DISTRIBUTION
OUTPUT_VARIABLE LINUX_DISTRIBUTION_
RESULT_VARIABLE LINUX_ID_RESULT
)
execute_process(COMMAND cat /etc/os-release
@ -69,12 +69,20 @@ if(NOT LINUX_DISTRIBUTION)
COMMAND awk -F= "{ print $2 }"
COMMAND tr "\n" " "
COMMAND sed "s/ //"
OUTPUT_VARIABLE LINUX_VER
OUTPUT_VARIABLE LINUX_VER_
RESULT_VARIABLE LINUX_VER_RESULT
)
if(LINUX_DISTRIBUTION_)
string(REPLACE "\"" "" LINUX_DISTRIBUTION__ ${LINUX_DISTRIBUTION_})
string(STRIP ${LINUX_DISTRIBUTION__} LINUX_DISTRIBUTION)
endif()
if(LINUX_VER_)
string(REPLACE "\"" "" LINUX_VER ${LINUX_VER_})
endif()
if(${LINUX_DISTRIBUTION} MATCHES "Debian")
set(LINUX_DISTRIBUTION "Debian")
file(READ /etc/debian_version LINUX_VER)
file(READ /etc/debian_version LINUX_VER_)
string(REPLACE "\n" "" LINUX_VER ${LINUX_VER_})
endif()
endif()
endif()
@ -82,14 +90,23 @@ endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/redhat-release")
set(LINUX_DISTRIBUTION "Red Hat")
file(READ /etc/redhat-release LINUX_VER)
file(READ /etc/redhat-release LINUX_VER_)
string(REPLACE "\n" "" LINUX_VER ${LINUX_VER_})
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/debian_version")
set(LINUX_DISTRIBUTION "Debian")
file(READ /etc/debian_version LINUX_VER)
file(READ /etc/debian_version LINUX_VER_)
string(REPLACE "\n" "" LINUX_VER ${LINUX_VER_})
endif()
endif()
if(NOT LINUX_DISTRIBUTION)
if(EXISTS "/etc/arch-release")
set(LINUX_DISTRIBUTION "Arch Linux")
set(LINUX_VER "")
endif()
endif()

View File

@ -51,6 +51,7 @@
- Fixed building in some ARM-based devices. Now Clang and ARMClang can be used for native building.
- Added toolchain files for building gnss-sdr and the volk_gnsssdr library in several ARM processor architectures, including those in Raspberry Pi 3 and 4.
- The software can now be built using Xcode (passing -GXcode to CMake) without previous manual installation of volk_gnsssdr.
- The software can now be built using Xcode (passing -GXcode to CMake) without gflags, glog, matio, PugiXML, Protocol Buffers or googletest previously installed.
- Now the volk_gnsssdr library can be built on Microsoft Windows.
- Improved CMake script for cross-compilation and for the detection of AVX, AVX2 and NEON (v7 and v8) instructions.
@ -81,6 +82,7 @@
- Added reporting of velocity in the terminal.
- Added reporting of user clock drift estimation, in ppm, in the Pvt_Monitor and in internal logging (debug mode).
- Updated documentation generated by Doxygen, now the pdfmanual target works when using ninja.
- CMake now generates an improved summary of required/optional dependency packages found and enabled/disabled features, including the building system and GNSS-SDR, CMake and compiler versions. This info is also stored in a file called features.log in the building directory.

View File

@ -639,7 +639,7 @@ endfunction()
if(ENABLE_SYSTEM_TESTING)
set(HOST_SYSTEM "Unknown")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
set(HOST_SYSTEM "GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCH_}")
set(HOST_SYSTEM "GNU/Linux ${LINUX_DISTRIBUTION} ${LINUX_VER} ${ARCHITECTURE_STRING}")
string(REPLACE "\n" "" HOST_SYSTEM "${HOST_SYSTEM}")
string(REPLACE "\"" "" HOST_SYSTEM "${HOST_SYSTEM}")
endif()