From f6f350a5c74b76eaa77e8d07ba281a004477aaa7 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 13 May 2020 14:25:51 +0200 Subject: [PATCH] :loud_sound: add operating system output --- cmake/download_test_data.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/download_test_data.cmake b/cmake/download_test_data.cmake index c6dc135b..757998d2 100644 --- a/cmake/download_test_data.cmake +++ b/cmake/download_test_data.cmake @@ -12,3 +12,15 @@ add_custom_target(download_test_data # create a header with the path to the downloaded test data file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/json_test_data\"\n") + +# determine the operating system (for debug and support purposes) +find_program(UNAME_COMMAND uname) +find_program(VER_COMMAND ver) +if (UNAME_COMMAND) + execute_process(COMMAND ${UNAME_COMMAND} -a OUTPUT_VARIABLE UNAME_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() +if (VER_COMMAND) + execute_process(COMMAND ${VER_COMMAND} OUTPUT_VARIABLE VER_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE) +endif() + +message(STATUS "Operating system: ${UNAME_COMMAND_RESULT} ${VER_COMMAND_RESULT} ${CMAKE_SYSTEM}")