From 0f688386eabafb1e70a172004df8be4d9dc1d037 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 13 Jan 2023 15:16:33 -0500 Subject: Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.log `try_compile` and `try_run` now automatically log checks using them to `CMakeConfigureLog.yaml`. Add `LOG_DESCRIPTION` arguments to some `try_compile` calls to replace the description previously written to the old logs. Issue: #23200 --- Modules/CMakeDetermineCompilerABI.cmake | 4 ---- Modules/CMakeTestCCompiler.cmake | 6 ------ Modules/CMakeTestCSharpCompiler.cmake | 6 ------ Modules/CMakeTestCUDACompiler.cmake | 6 ------ Modules/CMakeTestCXXCompiler.cmake | 6 ------ Modules/CMakeTestFortranCompiler.cmake | 12 ------------ Modules/CMakeTestHIPCompiler.cmake | 6 ------ Modules/CMakeTestOBJCCompiler.cmake | 6 ------ Modules/CMakeTestOBJCXXCompiler.cmake | 6 ------ Modules/CMakeTestSwiftCompiler.cmake | 6 ------ Modules/CheckFortranFunctionExists.cmake | 7 ------- Modules/CheckFunctionExists.cmake | 8 +------- Modules/CheckIPOSupported.cmake | 3 --- Modules/CheckIncludeFile.cmake | 10 +--------- Modules/CheckIncludeFileCXX.cmake | 10 +--------- Modules/CheckIncludeFiles.cmake | 10 +--------- Modules/CheckLibraryExists.cmake | 10 +--------- Modules/CheckPrototypeDefinition.cmake | 8 +------- Modules/CheckSymbolExists.cmake | 12 +----------- Modules/CheckTypeSize.cmake | 5 ----- Modules/CheckVariableExists.cmake | 8 +------- Modules/FindMFC.cmake | 6 ------ Modules/FindMPI.cmake | 18 +++++++++--------- Modules/FindOpenMP.cmake | 19 ++++++------------- Modules/FindThreads.cmake | 10 +--------- Modules/FortranCInterface.cmake | 4 ---- Modules/FortranCInterface/Detect.cmake | 6 ++---- Modules/Internal/CheckSourceCompiles.cmake | 8 -------- Modules/Internal/CheckSourceRuns.cmake | 18 +----------------- Modules/Internal/FeatureTesting.cmake | 8 -------- Modules/TestBigEndian.cmake | 7 ------- Modules/TestCXXAcceptsFlag.cmake | 8 +------- Modules/TestForANSIForScope.cmake | 8 +------- Modules/TestForSSTREAM.cmake | 8 +------- Modules/TestForSTDNamespace.cmake | 8 +------- 35 files changed, 31 insertions(+), 260 deletions(-) diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake index 053effa..1e28f65 100644 --- a/Modules/CMakeDetermineCompilerABI.cmake +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -82,8 +82,6 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) # Load the resulting information strings. if(CMAKE_${lang}_ABI_COMPILED) message(CHECK_PASS "done") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 32 REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]") set(ABI_SIZEOF_DPTR "NOTFOUND") set(ABI_BYTE_ORDER "NOTFOUND") @@ -195,8 +193,6 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) else() message(CHECK_FAIL "failed") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n${_copy_error}\n\n") endif() endif() endfunction() diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake index a706767..58726db 100644 --- a/Modules/CMakeTestCCompiler.cmake +++ b/Modules/CMakeTestCCompiler.cmake @@ -63,9 +63,6 @@ if(NOT CMAKE_C_COMPILER_WORKS) __TestCompiler_restoreTryCompileTargetType() if(NOT CMAKE_C_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the C compiler works failed with " - "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_C_COMPILER_OUTPUT}") message(FATAL_ERROR "The C compiler\n \"${CMAKE_C_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -73,9 +70,6 @@ if(NOT CMAKE_C_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the C compiler works passed with " - "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n") endif() # Try to identify the compiler features diff --git a/Modules/CMakeTestCSharpCompiler.cmake b/Modules/CMakeTestCSharpCompiler.cmake index 1c9e249..9f4b99f 100644 --- a/Modules/CMakeTestCSharpCompiler.cmake +++ b/Modules/CMakeTestCSharpCompiler.cmake @@ -44,9 +44,6 @@ endif() if(NOT CMAKE_CSharp_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the C# compiler works failed with " - "the following output:\n${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_CSharp_COMPILER_OUTPUT}") message(FATAL_ERROR "The C# compiler\n \"${CMAKE_CSharp_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -55,9 +52,6 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS) else() if(CSharp_TEST_WAS_RUN) PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the C# compiler works passed with " - "the following output:\n${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n") endif() # Re-configure to save learned information. diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake index f2fa6ea..6c53329 100644 --- a/Modules/CMakeTestCUDACompiler.cmake +++ b/Modules/CMakeTestCUDACompiler.cmake @@ -96,9 +96,6 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS) unset(CMAKE_CUDA_COMPILER_WORKS CACHE) if(NOT CMAKE_CUDA_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the CUDA compiler works failed with " - "the following output:\n${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_CUDA_COMPILER_OUTPUT}") message(FATAL_ERROR "The CUDA compiler\n \"${CMAKE_CUDA_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -106,9 +103,6 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the CUDA compiler works passed with " - "the following output:\n${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n") endif() # Try to identify the compiler features diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake index fa4016a..e640ff9 100644 --- a/Modules/CMakeTestCXXCompiler.cmake +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -56,9 +56,6 @@ if(NOT CMAKE_CXX_COMPILER_WORKS) __TestCompiler_restoreTryCompileTargetType() if(NOT CMAKE_CXX_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the C++ compiler works failed with " - "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_CXX_COMPILER_OUTPUT}") message(FATAL_ERROR "The C++ compiler\n \"${CMAKE_CXX_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -66,9 +63,6 @@ if(NOT CMAKE_CXX_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the C++ compiler works passed with " - "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n") endif() # Try to identify the compiler features diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index e6d1f6d..1baa18d 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -55,9 +55,6 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS) unset(CMAKE_Fortran_COMPILER_WORKS CACHE) if(NOT CMAKE_Fortran_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Fortran compiler works failed with " - "the following output:\n${OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${OUTPUT}") message(FATAL_ERROR "The Fortran compiler\n \"${CMAKE_Fortran_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -65,9 +62,6 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Fortran compiler works passed with " - "the following output:\n${OUTPUT}\n\n") endif() # Test for Fortran 90 support by using an f90-specific construct. @@ -84,15 +78,9 @@ if(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90) unset(__TestCompiler_testFortranCompilerF90Source) if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) message(CHECK_PASS "yes") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Fortran compiler supports Fortran 90 passed with " - "the following output:\n${OUTPUT}\n\n") set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) else() message(CHECK_FAIL "no") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Fortran compiler supports Fortran 90 failed with " - "the following output:\n${OUTPUT}\n\n") set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0) endif() unset(CMAKE_Fortran_COMPILER_SUPPORTS_F90 CACHE) diff --git a/Modules/CMakeTestHIPCompiler.cmake b/Modules/CMakeTestHIPCompiler.cmake index 1da0ae4..686f055 100644 --- a/Modules/CMakeTestHIPCompiler.cmake +++ b/Modules/CMakeTestHIPCompiler.cmake @@ -59,9 +59,6 @@ if(NOT CMAKE_HIP_COMPILER_WORKS) __TestCompiler_restoreTryCompileTargetType() if(NOT CMAKE_HIP_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the HIP compiler works failed with " - "the following output:\n${__CMAKE_HIP_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_HIP_COMPILER_OUTPUT}") message(FATAL_ERROR "The HIP compiler\n \"${CMAKE_HIP_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -69,9 +66,6 @@ if(NOT CMAKE_HIP_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the HIP compiler works passed with " - "the following output:\n${__CMAKE_HIP_COMPILER_OUTPUT}\n\n") endif() set(CMAKE_HIP_FLAGS "${__CMAKE_HIP_FLAGS}") diff --git a/Modules/CMakeTestOBJCCompiler.cmake b/Modules/CMakeTestOBJCCompiler.cmake index bbc90a7..a36180b 100644 --- a/Modules/CMakeTestOBJCCompiler.cmake +++ b/Modules/CMakeTestOBJCCompiler.cmake @@ -60,9 +60,6 @@ if(NOT CMAKE_OBJC_COMPILER_WORKS) __TestCompiler_restoreTryCompileTargetType() if(NOT CMAKE_OBJC_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Objective-C compiler works failed with " - "the following output:\n${__CMAKE_OBJC_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_OBJC_COMPILER_OUTPUT}") message(FATAL_ERROR "The Objective-C compiler\n \"${CMAKE_OBJC_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -70,9 +67,6 @@ if(NOT CMAKE_OBJC_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Objective-C compiler works passed with " - "the following output:\n${__CMAKE_OBJC_COMPILER_OUTPUT}\n\n") endif() # Try to identify the compiler features diff --git a/Modules/CMakeTestOBJCXXCompiler.cmake b/Modules/CMakeTestOBJCXXCompiler.cmake index aceb939..f7935c7 100644 --- a/Modules/CMakeTestOBJCXXCompiler.cmake +++ b/Modules/CMakeTestOBJCXXCompiler.cmake @@ -59,9 +59,6 @@ if(NOT CMAKE_OBJCXX_COMPILER_WORKS) __TestCompiler_restoreTryCompileTargetType() if(NOT CMAKE_OBJCXX_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Objective-C++ compiler works failed with " - "the following output:\n${__CMAKE_OBJCXX_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_OBJCXX_COMPILER_OUTPUT}") message(FATAL_ERROR "The Objective-C++ compiler\n \"${CMAKE_OBJCXX_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -69,9 +66,6 @@ if(NOT CMAKE_OBJCXX_COMPILER_WORKS) "CMake will not be able to correctly generate this project.") endif() PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Objective-C++ compiler works passed with " - "the following output:\n${__CMAKE_OBJCXX_COMPILER_OUTPUT}\n\n") endif() # Try to identify the compiler features diff --git a/Modules/CMakeTestSwiftCompiler.cmake b/Modules/CMakeTestSwiftCompiler.cmake index 88a864c..c7df912 100644 --- a/Modules/CMakeTestSwiftCompiler.cmake +++ b/Modules/CMakeTestSwiftCompiler.cmake @@ -36,9 +36,6 @@ endif() if(NOT CMAKE_Swift_COMPILER_WORKS) PrintTestCompilerResult(CHECK_FAIL "broken") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Swift compiler works failed with " - "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n") string(REPLACE "\n" "\n " _output "${__CMAKE_Swift_COMPILER_OUTPUT}") message(FATAL_ERROR "The Swift compiler\n \"${CMAKE_Swift_COMPILER}\"\n" "is not able to compile a simple test program.\nIt fails " @@ -47,9 +44,6 @@ if(NOT CMAKE_Swift_COMPILER_WORKS) else() if(Swift_TEST_WAS_RUN) PrintTestCompilerResult(CHECK_PASS "works") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Swift compiler works passed with " - "the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n") endif() # Unlike C and CXX we do not yet detect any information about the Swift ABI. diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake index 7e3a7ee..4e5a246 100644 --- a/Modules/CheckFortranFunctionExists.cmake +++ b/Modules/CheckFortranFunctionExists.cmake @@ -70,21 +70,14 @@ macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) SOURCE_FROM_VAR testFortranCompiler.f __CheckFunction_testFortranCompilerSource ${CHECK_FUNCTION_EXISTS_ADD_LINK_OPTIONS} ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES} - OUTPUT_VARIABLE OUTPUT ) unset(__CheckFunction_testFortranCompilerSource) if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") message(CHECK_PASS "found") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n") else() message(CHECK_FAIL "not found") set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake index 60f0184..e2939ed 100644 --- a/Modules/CheckFunctionExists.cmake +++ b/Modules/CheckFunctionExists.cmake @@ -95,7 +95,7 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) ${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} "${CHECK_FUNCTION_EXISTS_ADD_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) + ) unset(_cfe_source) if(${VARIABLE}) @@ -103,17 +103,11 @@ macro(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "found") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the function ${FUNCTION} exists passed with the following output:\n" - "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the function ${FUNCTION} exists failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/CheckIPOSupported.cmake b/Modules/CheckIPOSupported.cmake index 9108e34..de682b7 100644 --- a/Modules/CheckIPOSupported.cmake +++ b/Modules/CheckIPOSupported.cmake @@ -150,9 +150,6 @@ macro(_ipo_run_language_check language) unset(_IPO_LANGUAGE_CHECK_RESULT CACHE) if(NOT _IPO_LANGUAGE_CHECK_RESULT) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "${language} compiler IPO check failed with the following output:\n" - "${output}\n") _ipo_not_supported("check failed to compile") if(X_OUTPUT) set("${X_OUTPUT}" "${output}" PARENT_SCOPE) diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake index 4cba91b..5771307 100644 --- a/Modules/CheckIncludeFile.cmake +++ b/Modules/CheckIncludeFile.cmake @@ -100,7 +100,7 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} "${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}" - OUTPUT_VARIABLE OUTPUT) + ) unset(_CIF_LINK_OPTIONS) unset(_CIF_LINK_LIBRARIES) @@ -113,19 +113,11 @@ macro(CHECK_INCLUDE_FILE INCLUDE VARIABLE) message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the include file ${INCLUDE} " - "exists passed with the following output:\n" - "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the include file ${INCLUDE} " - "exists failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake index f6af036..d27b485 100644 --- a/Modules/CheckIncludeFileCXX.cmake +++ b/Modules/CheckIncludeFileCXX.cmake @@ -99,7 +99,7 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} "${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}" - OUTPUT_VARIABLE OUTPUT) + ) unset(_CIF_LINK_OPTIONS) unset(_CIF_LINK_LIBRARIES) @@ -112,19 +112,11 @@ macro(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the include file ${INCLUDE} " - "exists passed with the following output:\n" - "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the include file ${INCLUDE} " - "exists failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake index 8fc6921..2f50c61 100644 --- a/Modules/CheckIncludeFiles.cmake +++ b/Modules/CheckIncludeFiles.cmake @@ -142,7 +142,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS} "${CHECK_INCLUDE_FILES_INCLUDE_DIRS}" - OUTPUT_VARIABLE OUTPUT) + ) unset(_CIF_LINK_OPTIONS) unset(_CIF_LINK_LIBRARIES) if(${VARIABLE}) @@ -150,19 +150,11 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE) message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if files ${INCLUDE} " - "exist passed with the following output:\n" - "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if files ${INCLUDE} " - "exist failed with the following output:\n" - "${OUTPUT}\nSource:\n${_src_content}\n") endif() endif() endmacro() diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake index 56424ac..5f1a914 100644 --- a/Modules/CheckLibraryExists.cmake +++ b/Modules/CheckLibraryExists.cmake @@ -76,7 +76,7 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION} -DLINK_DIRECTORIES:STRING=${LOCATION} - OUTPUT_VARIABLE OUTPUT) + ) unset(_cle_source) if(${VARIABLE}) @@ -84,19 +84,11 @@ macro(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the function ${FUNCTION} exists in the ${LIBRARY} " - "passed with the following output:\n" - "${OUTPUT}\n\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the function ${FUNCTION} exists in the ${LIBRARY} " - "failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/CheckPrototypeDefinition.cmake b/Modules/CheckPrototypeDefinition.cmake index 12f4e86..3d53b93 100644 --- a/Modules/CheckPrototypeDefinition.cmake +++ b/Modules/CheckPrototypeDefinition.cmake @@ -104,24 +104,18 @@ function(check_prototype_definition _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIAB ${CHECK_PROTOTYPE_DEFINITION_LIBS} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS} "${CMAKE_SYMBOL_EXISTS_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) + ) if (${_VARIABLE}) set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}") if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "True") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n" - "${OUTPUT}\n\n") else () if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "False") endif() set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n" - "${OUTPUT}\n\n${_SOURCE}\n\n") endif () endif() diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake index 722d50f..c4a1574 100644 --- a/Modules/CheckSymbolExists.cmake +++ b/Modules/CheckSymbolExists.cmake @@ -150,27 +150,17 @@ int main(int argc, char** argv) CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} "${CMAKE_SYMBOL_EXISTS_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) + ) if(${VARIABLE}) if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "found") endif() set(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the ${SYMBOL} " - "exist passed with the following output:\n" - "${OUTPUT}\nFile ${SOURCEFILE}:\n" - "${_CSE_SOURCE}\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the ${SYMBOL} " - "exist failed with the following output:\n" - "${OUTPUT}\nFile ${SOURCEFILE}:\n" - "${_CSE_SOURCE}\n") endif() unset(_CSE_SOURCE) endif() diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index e09b7c8..579d189 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -152,7 +152,6 @@ function(__check_type_size_impl type var map builtin language) CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}" "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}" - OUTPUT_VARIABLE output COPY_FILE ${bin} ) @@ -203,16 +202,12 @@ function(__check_type_size_impl type var map builtin language) if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "done") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining size of ${type} passed with the following output:\n${output}\n\n") set(${var} "${${var}}" CACHE INTERNAL "CHECK_TYPE_SIZE: sizeof(${type})") else() # The check failed to compile. if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "failed") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining size of ${type} failed with the following output:\n${output}\n${src}:\n${src_content}\n\n") set(${var} "" CACHE INTERNAL "CHECK_TYPE_SIZE: ${type} unknown") file(REMOVE ${map}) endif() diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake index 5dc3441..3a7a431 100644 --- a/Modules/CheckVariableExists.cmake +++ b/Modules/CheckVariableExists.cmake @@ -67,23 +67,17 @@ macro(CHECK_VARIABLE_EXISTS VAR VARIABLE) ${CHECK_VARIABLE_EXISTS_ADD_LINK_OPTIONS} ${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES} CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS} - OUTPUT_VARIABLE OUTPUT) + ) if(${VARIABLE}) set(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "found") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the variable ${VAR} exists passed with the following output:\n" - "${OUTPUT}\n\n") else() set(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}") if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "not found") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the variable ${VAR} exists failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake index 2d5de89..38259c3 100644 --- a/Modules/FindMFC.cmake +++ b/Modules/FindMFC.cmake @@ -49,15 +49,9 @@ if(MFC_ATTEMPT_TRY_COMPILE) if(MFC_HAVE_MFC) message(CHECK_PASS "found") set(MFC_HAVE_MFC 1 CACHE INTERNAL "Have MFC?") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if MFC exists passed with the following output:\n" - "${OUTPUT}\n\n") else() message(CHECK_FAIL "not found") set(MFC_HAVE_MFC 0 CACHE INTERNAL "Have MFC?") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if MFC exists failed with the following output:\n" - "${OUTPUT}\n\n") endif() endif() diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index e15be91..1fbb4f9 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -1259,9 +1259,16 @@ function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRE file(READ "${SRC_DIR}/${MPI_TEST_FILE_NAME}.c" MPI_TEST_SOURCE_CONTENT) set(MPI_TEST_SOURCE_FILE "${MPI_TEST_FILE_NAME}.c") endif() + if(SUPPRESS_ERRORS) + set(maybe_no_log NO_LOG) + else() + set(maybe_no_log "") + endif() if(RUN_BINARY) try_run(MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} SOURCE_FROM_VAR "${MPI_TEST_SOURCE_FILE}" MPI_TEST_SOURCE_CONTENT + ${maybe_no_log} + LOG_DESCRIPTION "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE}" COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} LINK_LIBRARIES MPI::MPI_${LANG} RUN_OUTPUT_VARIABLE MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} @@ -1270,20 +1277,13 @@ function(_MPI_try_staged_settings LANG MPI_TEST_FILE_NAME MODE RUN_BINARY SUPPRE else() try_compile(MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} SOURCE_FROM_VAR "${MPI_TEST_SOURCE_FILE}" MPI_TEST_SOURCE_CONTENT + ${maybe_no_log} + LOG_DESCRIPTION "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE}" COMPILE_DEFINITIONS ${MPI_TEST_COMPILE_DEFINITIONS} LINK_LIBRARIES MPI::MPI_${LANG} COPY_FILE "${BIN_FILE}" OUTPUT_VARIABLE _MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT) endif() - if(NOT SUPPRESS_ERRORS) - if(NOT MPI_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE} failed to compile with the following output:\n${_MPI_TRY_${MPI_TEST_FILE_NAME}_${MODE}_OUTPUT}\n\n") - elseif(DEFINED MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE} AND MPI_RUN_RESULT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "The MPI test ${MPI_TEST_FILE_NAME} for ${LANG} in mode ${MODE} failed to run with the following output:\n${MPI_RUN_OUTPUT_${LANG}_${MPI_TEST_FILE_NAME}_${MODE}}\n\n") - endif() - endif() endfunction() macro(_MPI_check_lang_works LANG SUPPRESS_ERRORS) diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index 9e24925..f1d70a5 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -214,6 +214,7 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) string(REGEX REPLACE "[-/=+]" "" OPENMP_PLAIN_FLAG "${OPENMP_FLAG}") try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} SOURCE_FROM_VAR "${_OPENMP_TEST_SRC_NAME}" _OPENMP_TEST_SRC_CONTENT + LOG_DESCRIPTION "Detecting ${LANG} OpenMP compiler info" CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}" LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT @@ -228,9 +229,6 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) unset(OpenMP_${LANG}_IMPLICIT_FWK_DIRS) unset(OpenMP_${LANG}_LOG_VAR) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Detecting ${LANG} OpenMP compiler ABI info compiled with the following output:\n${OpenMP_TRY_COMPILE_OUTPUT}\n\n") - cmake_parse_implicit_link_info("${OpenMP_TRY_COMPILE_OUTPUT}" OpenMP_${LANG}_IMPLICIT_LIBRARIES OpenMP_${LANG}_IMPLICIT_LINK_DIRS @@ -312,9 +310,9 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) # default header search path already. try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} SOURCE_FROM_VAR "${_OPENMP_TEST_SRC_NAME}" _OPENMP_TEST_SRC_CONTENT + LOG_DESCRIPTION "Trying ${LANG} OpenMP compiler with '${OpenMP_libomp_LIBRARY}'" CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}" LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} ${OpenMP_libomp_LIBRARY} - OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT ) if(NOT OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG}) find_path(OpenMP_${LANG}_INCLUDE_DIR omp.h) @@ -323,10 +321,10 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) if(OpenMP_${LANG}_INCLUDE_DIR) try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} SOURCE_FROM_VAR "${_OPENMP_TEST_SRC_NAME}" _OPENMP_TEST_SRC_CONTENT + LOG_DESCRIPTION "Trying ${LANG} OpenMP compiler with '${OpenMP_libomp_LIBRARY}' and '${OpenMP_${LANG}_INCLUDE_DIR}'" CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}" "-DINCLUDE_DIRECTORIES:STRING=${OpenMP_${LANG}_INCLUDE_DIR}" LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} ${OpenMP_libomp_LIBRARY} - OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT ) endif() endif() @@ -346,9 +344,9 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) if(OpenMP_libomp_LIBRARY) try_compile( OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG} SOURCE_FROM_VAR "${_OPENMP_TEST_SRC_NAME}" _OPENMP_TEST_SRC_CONTENT + LOG_DESCRIPTION "Trying ${LANG} OpenMP compiler with '${OpenMP_libomp_LIBRARY}'" CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OPENMP_FLAGS_TEST}" LINK_LIBRARIES ${CMAKE_${LANG}_VERBOSE_FLAG} ${OpenMP_libomp_LIBRARY} - OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT ) if(OpenMP_COMPILE_RESULT_${FLAG_MODE}_${OPENMP_PLAIN_FLAG}) set("${OPENMP_FLAG_VAR}" "${OPENMP_FLAG}" PARENT_SCOPE) @@ -356,9 +354,6 @@ function(_OPENMP_GET_FLAGS LANG FLAG_MODE OPENMP_FLAG_VAR OPENMP_LIB_NAMES_VAR) break() endif() endif() - else() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Detecting ${LANG} OpenMP failed with the following output:\n${OpenMP_TRY_COMPILE_OUTPUT}\n\n") endif() set("${OPENMP_LIB_NAMES_VAR}" "NOTFOUND" PARENT_SCOPE) set("${OPENMP_FLAG_VAR}" "NOTFOUND" PARENT_SCOPE) @@ -419,9 +414,10 @@ function(_OPENMP_GET_SPEC_DATE LANG SPEC_DATE) string(REGEX REPLACE "[-/=+]" "" OPENMP_PLAIN_FLAG "${OPENMP_FLAG}") try_compile(OpenMP_SPECTEST_${LANG}_${OPENMP_PLAIN_FLAG} SOURCE_FROM_VAR "${_OPENMP_TEST_SRC_NAME}" _OPENMP_TEST_SRC_CONTENT + LOG_DESCRIPTION "Detecting ${LANG} OpenMP version" CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OpenMP_${LANG}_FLAGS}" ${_includeDirFlags} COPY_FILE "${BIN_FILE}" - OUTPUT_VARIABLE OpenMP_TRY_COMPILE_OUTPUT) + ) if(${OpenMP_SPECTEST_${LANG}_${OPENMP_PLAIN_FLAG}}) file(STRINGS ${BIN_FILE} specstr LIMIT_COUNT 1 REGEX "INFO:OpenMP-date") @@ -429,9 +425,6 @@ function(_OPENMP_GET_SPEC_DATE LANG SPEC_DATE) if("${specstr}" MATCHES "${regex_spec_date}") set(${SPEC_DATE} "${CMAKE_MATCH_1}" PARENT_SCOPE) endif() - else() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Detecting ${LANG} OpenMP version failed with the following output:\n${OpenMP_TRY_COMPILE_OUTPUT}\n\n") endif() endfunction() diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 7326ef9..701c143 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -136,10 +136,8 @@ macro(_threads_check_flag_pthread) try_compile(THREADS_HAVE_PTHREAD_ARG SOURCE_FROM_FILE "${_threads_src}" "${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.c" CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread - OUTPUT_VARIABLE _cmake_check_pthreads_output) + ) - string(APPEND _cmake_find_threads_output "${_cmake_check_pthreads_output}") - unset(_cmake_check_pthreads_output) unset(_threads_src) if(THREADS_HAVE_PTHREAD_ARG) @@ -239,10 +237,4 @@ if(THREADS_FOUND AND NOT TARGET Threads::Threads) if(CMAKE_THREAD_LIBS_INIT) set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") endif() -elseif(NOT THREADS_FOUND AND _cmake_find_threads_output) - file(APPEND - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if compiler accepts -pthread failed with the following output:\n${_cmake_find_threads_output}\n\n") endif() - -unset(_cmake_find_threads_output) diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake index af025af..ed8830e 100644 --- a/Modules/FortranCInterface.cmake +++ b/Modules/FortranCInterface.cmake @@ -381,13 +381,9 @@ function(FortranCInterface_VERIFY) # Report results. if(FortranCInterface_VERIFY_${lang}_COMPILED) message(CHECK_PASS "Success") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "${_desc} passed with the following output:\n${_output}\n\n") set(FortranCInterface_VERIFIED_${lang} 1 CACHE INTERNAL "Fortran/${lang} compatibility") else() message(CHECK_FAIL "Failed") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "${_desc} failed with the following output:\n${_output}\n\n") set(FortranCInterface_VERIFIED_${lang} 0 CACHE INTERNAL "Fortran/${lang} compatibility") endif() unset(FortranCInterface_VERIFY_${lang}_COMPILED CACHE) diff --git a/Modules/FortranCInterface/Detect.cmake b/Modules/FortranCInterface/Detect.cmake index 6401aed..010661e 100644 --- a/Modules/FortranCInterface/Detect.cmake +++ b/Modules/FortranCInterface/Detect.cmake @@ -51,6 +51,7 @@ try_compile(FortranCInterface_COMPILED TARGET FortranCInterface SOURCE_DIR ${FortranCInterface_SOURCE_DIR} BINARY_DIR ${FortranCInterface_BINARY_DIR} + LOG_DESCRIPTION "Fortran/C interface test project" CMAKE_FLAGS "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}" "-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}" @@ -58,7 +59,7 @@ try_compile(FortranCInterface_COMPILED "-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}" ${_FortranCInterface_OSX_ARCH} ${_FortranCInterface_EXE_LINKER_FLAGS} - OUTPUT_VARIABLE FortranCInterface_OUTPUT) + ) set(FortranCInterface_COMPILED ${FortranCInterface_COMPILED}) unset(FortranCInterface_COMPILED CACHE) unset(_FortranCInterface_EXE_LINKER_FLAGS) @@ -70,9 +71,6 @@ if(FortranCInterface_COMPILED) include(${FortranCInterface_BINARY_DIR}/exe-Release.cmake OPTIONAL) else() set(_result "Failed to compile") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Fortran/C interface test project failed with the following output:\n" - "${FortranCInterface_OUTPUT}\n") endif() # Load symbols from INFO:symbol[] strings in the executable. diff --git a/Modules/Internal/CheckSourceCompiles.cmake b/Modules/Internal/CheckSourceCompiles.cmake index bf5a82d..83d7020 100644 --- a/Modules/Internal/CheckSourceCompiles.cmake +++ b/Modules/Internal/CheckSourceCompiles.cmake @@ -122,19 +122,11 @@ function(CMAKE_CHECK_SOURCE_COMPILES _lang _source _var) if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "Success") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Performing ${_lang_textual} SOURCE FILE Test ${_var} succeeded with the following output:\n" - "${OUTPUT}\n" - "Source file was:\n${_source}\n") else() if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "Failed") endif() set(${_var} "" CACHE INTERNAL "Test ${_var}") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing ${_lang_textual} SOURCE FILE Test ${_var} failed with the following output:\n" - "${OUTPUT}\n" - "Source file was:\n${_source}\n") endif() endif() endfunction() diff --git a/Modules/Internal/CheckSourceRuns.cmake b/Modules/Internal/CheckSourceRuns.cmake index 09c85c5..805d98d 100644 --- a/Modules/Internal/CheckSourceRuns.cmake +++ b/Modules/Internal/CheckSourceRuns.cmake @@ -98,8 +98,7 @@ function(CMAKE_CHECK_SOURCE_RUNS _lang _source _var) CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS} -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} "${CHECK_${_lang}_SOURCE_COMPILES_ADD_INCLUDES}" - COMPILE_OUTPUT_VARIABLE OUTPUT - RUN_OUTPUT_VARIABLE RUN_OUTPUT) + ) # if it did not compile make the return value fail code of 1 if(NOT ${_var}_COMPILED) set(${_var}_EXITCODE 1) @@ -111,13 +110,6 @@ function(CMAKE_CHECK_SOURCE_RUNS _lang _source _var) if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_PASS "Success") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Performing ${_lang_textual} SOURCE FILE Test ${_var} succeeded with the following compile output:\n" - "${OUTPUT}\n" - "...and run output:\n" - "${RUN_OUTPUT}\n" - "Return value: ${${_var}}\n" - "Source file was:\n${_source}\n") else() if(CMAKE_CROSSCOMPILING AND "${${_var}_EXITCODE}" MATCHES "FAILED_TO_RUN") set(${_var} "${${_var}_EXITCODE}" PARENT_SCOPE) @@ -128,14 +120,6 @@ function(CMAKE_CHECK_SOURCE_RUNS _lang _source _var) if(NOT CMAKE_REQUIRED_QUIET) message(CHECK_FAIL "Failed") endif() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Performing ${_lang_textual} SOURCE FILE Test ${_var} failed with the following compile output:\n" - "${OUTPUT}\n" - "...and run output:\n" - "${RUN_OUTPUT}\n" - "Return value: ${${_var}_EXITCODE}\n" - "Source file was:\n${_source}\n") - endif() endif() endfunction() diff --git a/Modules/Internal/FeatureTesting.cmake b/Modules/Internal/FeatureTesting.cmake index 06cc823..1a8a27e 100644 --- a/Modules/Internal/FeatureTesting.cmake +++ b/Modules/Internal/FeatureTesting.cmake @@ -35,7 +35,6 @@ macro(_record_compiler_features lang compile_flags feature_list) SOURCE_FROM_VAR "feature_tests.${lang_lc}" _content COMPILE_DEFINITIONS "${compile_flags}" LINK_LIBRARIES "${compile_flags_for_link}" - OUTPUT_VARIABLE _output COPY_FILE "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.bin" COPY_FILE_ERROR _copy_error ) @@ -51,14 +50,10 @@ macro(_record_compiler_features lang compile_flags feature_list) unset(compile_flags_for_link) if (_result EQUAL 0) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "\n\nDetecting ${lang} [${compile_flags}] compiler features compiled with the following output:\n${_output}\n\n") if(EXISTS "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.bin") file(STRINGS "${CMAKE_BINARY_DIR}/CMakeFiles/feature_tests.bin" features REGEX "${lang}_FEATURE:.*") foreach(info ${features}) - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - " Feature record: ${info}\n") string(REPLACE "${lang}_FEATURE:" "" info ${info}) string(SUBSTRING ${info} 0 1 has_feature) if(has_feature) @@ -67,9 +62,6 @@ macro(_record_compiler_features lang compile_flags feature_list) endif() endforeach() endif() - else() - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Detecting ${lang} [${compile_flags}] compiler features failed to compile with the following output:\n${_output}\n\n") endif() endmacro() diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake index 096c90c..12b6816 100644 --- a/Modules/TestBigEndian.cmake +++ b/Modules/TestBigEndian.cmake @@ -87,7 +87,6 @@ macro(__TEST_BIG_ENDIAN_LEGACY_IMPL VARIABLE) try_compile(HAVE_${VARIABLE} SOURCE_FROM_VAR "${_test_file}" TEST_ENDIANESS_FILE_CONTENT - OUTPUT_VARIABLE OUTPUT COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin" ) if(HAVE_${VARIABLE}) @@ -125,14 +124,8 @@ macro(__TEST_BIG_ENDIAN_LEGACY_IMPL VARIABLE) message(CHECK_FAIL "TEST_BIG_ENDIAN found no result!") message(SEND_ERROR "TEST_BIG_ENDIAN found no result!") endif() - - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the system is big endian passed with the following output:\n${OUTPUT}\n${_test_file}:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") - else() message(CHECK_FAIL "failed") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the system is big endian failed with the following output:\n${OUTPUT}\n${_test_file}:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") set(${VARIABLE}) endif() endif() diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake index 2e511ae..023d6ba 100644 --- a/Modules/TestCXXAcceptsFlag.cmake +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -27,17 +27,11 @@ macro(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE) try_compile(${VARIABLE} SOURCES ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS} - OUTPUT_VARIABLE OUTPUT) + ) if(${VARIABLE}) message(CHECK_PASS "yes") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the CXX compiler accepts the flag ${FLAGS} passed with " - "the following output:\n${OUTPUT}\n\n") else() message(CHECK_FAIL "no") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the CXX compiler accepts the flag ${FLAGS} failed with " - "the following output:\n${OUTPUT}\n\n") endif() endif() endmacro() diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake index 06db586..b1a12cf 100644 --- a/Modules/TestForANSIForScope.cmake +++ b/Modules/TestForANSIForScope.cmake @@ -19,21 +19,15 @@ if(NOT DEFINED CMAKE_ANSI_FOR_SCOPE) message(CHECK_START "Check for ANSI scope") try_compile(CMAKE_ANSI_FOR_SCOPE SOURCES ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx - OUTPUT_VARIABLE OUTPUT) + ) if (CMAKE_ANSI_FOR_SCOPE) message(CHECK_PASS "found") set (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL "Does the compiler support ansi for scope.") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the CXX compiler understands ansi for scopes passed with " - "the following output:\n${OUTPUT}\n\n") else () message(CHECK_FAIL "not found") set (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL "Does the compiler support ansi for scope.") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the CXX compiler understands ansi for scopes failed with " - "the following output:\n${OUTPUT}\n\n") endif () endif() diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake index 9a09ac7..e2cc5b0 100644 --- a/Modules/TestForSSTREAM.cmake +++ b/Modules/TestForSSTREAM.cmake @@ -18,21 +18,15 @@ if(NOT DEFINED CMAKE_HAS_ANSI_STRING_STREAM) message(CHECK_START "Check for sstream") try_compile(CMAKE_HAS_ANSI_STRING_STREAM SOURCES ${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx - OUTPUT_VARIABLE OUTPUT) + ) if (CMAKE_HAS_ANSI_STRING_STREAM) message(CHECK_PASS "found") set (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL "Does the compiler support sstream") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the CXX compiler has sstream passed with " - "the following output:\n${OUTPUT}\n\n") else () message(CHECK_FAIL "not found") set (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL "Does the compiler support sstream") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the CXX compiler has sstream failed with " - "the following output:\n${OUTPUT}\n\n") endif () endif() diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake index cd9c782..61e922d 100644 --- a/Modules/TestForSTDNamespace.cmake +++ b/Modules/TestForSTDNamespace.cmake @@ -18,21 +18,15 @@ if(NOT DEFINED CMAKE_STD_NAMESPACE) message(CHECK_START "Check for STD namespace") try_compile(CMAKE_STD_NAMESPACE SOURCES ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx - OUTPUT_VARIABLE OUTPUT) + ) if (CMAKE_STD_NAMESPACE) message(CHECK_PASS "found") set (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL "Does the compiler support std::.") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Determining if the CXX compiler has std namespace passed with " - "the following output:\n${OUTPUT}\n\n") else () message(CHECK_FAIL "not found") set (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL "Does the compiler support std::.") - file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if the CXX compiler has std namespace failed with " - "the following output:\n${OUTPUT}\n\n") endif () endif() -- cgit v0.12