cmake_minimum_required(VERSION 3.15) set(command "/opt/local/bin/cmake;-DCMAKE_INSTALL_PREFIX:PATH=/Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix;-DCMAKE_PREFIX_PATH:STRING=;-DOPENSSL_INCLUDE_DIR=/opt/local/libexec/openssl11/include;-DOPENSSL_SSL_LIBRARY=/opt/local/libexec/openssl11/lib/libssl.dylib;-DOPENSSL_CRYPTO_LIBRARY=/opt/local/libexec/openssl11/lib/libcrypto.dylib;-DCMAKE_BUILD_TYPE=Release;-DCMAKE_C_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc;-DCMAKE_C_FLAGS= -m64 -pipe -W -Wall -fsigned-char -fno-common -Qunused-arguments -pthread;-DCMAKE_CXX_COMPILER=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++;-DCMAKE_CXX_FLAGS= -std=c++17 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ ;-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk;-DCMAKE_OSX_DEPLOYMENT_TARGET=;-DENABLE_PYTHON=OFF;-DENABLE_CEPH=OFF;-DCMAKE_INSTALL_RPATH:STRING=/Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix/lib;-GUnix Makefiles;/Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix/src/XROOTD") set(log_merged "") set(log_output_on_failure "") set(stdout_log "/Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-out.log") set(stderr_log "/Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-err.log") execute_process( COMMAND ${command} RESULT_VARIABLE result OUTPUT_FILE "${stdout_log}" ERROR_FILE "${stderr_log}" ) macro(read_up_to_max_size log_file output_var) file(SIZE ${log_file} determined_size) set(max_size 10240) if (determined_size GREATER max_size) math(EXPR seek_position "${determined_size} - ${max_size}") file(READ ${log_file} ${output_var} OFFSET ${seek_position}) set(${output_var} "...skipping to end...\n${${output_var}}") else() file(READ ${log_file} ${output_var}) endif() endmacro() if(result) set(msg "Command failed: ${result}\n") foreach(arg IN LISTS command) set(msg "${msg} '${arg}'") endforeach() if (${log_merged}) set(msg "${msg}\nSee also\n ${stderr_log}") else() set(msg "${msg}\nSee also\n /Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*.log") endif() if (${log_output_on_failure}) message(SEND_ERROR "${msg}") if (${log_merged}) read_up_to_max_size("${stderr_log}" error_log_contents) message(STATUS "Log output is:\n${error_log_contents}") else() read_up_to_max_size("${stdout_log}" out_log_contents) read_up_to_max_size("${stderr_log}" err_log_contents) message(STATUS "stdout output is:\n${out_log_contents}") message(STATUS "stderr output is:\n${err_log_contents}") endif() message(FATAL_ERROR "Stopping after outputting logs.") else() message(FATAL_ERROR "${msg}") endif() else() if(NOT "Unix Makefiles" MATCHES "Ninja") set(msg "XROOTD configure command succeeded. See also /Users/jade/thirdParty/root-6.26.00/build-dir/builtins/xrootd/XROOTD-prefix/src/XROOTD-stamp/XROOTD-configure-*.log") message(STATUS "${msg}") endif() endif()