summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-20 17:16:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-20 17:16:52 (GMT)
commit08512646e1c1ad23e75922a79e111365740b5cb7 (patch)
treedf30d5032c65329923ef240b90fbad327dc1895e
parentc8826fe04f5f4f8c911a751ff7979fde79e92eb1 (diff)
parentf23def2cf3d5dbb62f615db1c42cda68877131a5 (diff)
downloadCMake-08512646e1c1ad23e75922a79e111365740b5cb7.zip
CMake-08512646e1c1ad23e75922a79e111365740b5cb7.tar.gz
CMake-08512646e1c1ad23e75922a79e111365740b5cb7.tar.bz2
Merge topic 'fix-compiler-failure-formatting'
f23def2c Improve formatting of compiler failure error message Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1285
-rw-r--r--Modules/CMakeTestCCompiler.cmake5
-rw-r--r--Modules/CMakeTestCSharpCompiler.cmake5
-rw-r--r--Modules/CMakeTestCUDACompiler.cmake5
-rw-r--r--Modules/CMakeTestCXXCompiler.cmake5
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake5
-rw-r--r--Modules/CMakeTestSwiftCompiler.cmake5
6 files changed, 18 insertions, 12 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 7f19969..e34ae75 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -48,9 +48,10 @@ if(NOT CMAKE_C_COMPILER_WORKS)
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")
- message(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
+ 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 "
- "with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n"
+ "with the following output:\n ${_output}\n\n"
"CMake will not be able to correctly generate this project.")
else()
if(C_TEST_WAS_RUN)
diff --git a/Modules/CMakeTestCSharpCompiler.cmake b/Modules/CMakeTestCSharpCompiler.cmake
index 1a8bf32..f3b95fd 100644
--- a/Modules/CMakeTestCSharpCompiler.cmake
+++ b/Modules/CMakeTestCSharpCompiler.cmake
@@ -42,9 +42,10 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS)
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")
- message(FATAL_ERROR "The C# compiler \"${CMAKE_CSharp_COMPILER}\" "
+ 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 "
- "with the following output:\n ${__CMAKE_CSharp_COMPILER_OUTPUT}\n\n"
+ "with the following output:\n ${_output}\n\n"
"CMake will not be able to correctly generate this project.")
else()
if(CSharp_TEST_WAS_RUN)
diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake
index 80113cb..df5ec72 100644
--- a/Modules/CMakeTestCUDACompiler.cmake
+++ b/Modules/CMakeTestCUDACompiler.cmake
@@ -42,9 +42,10 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS)
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")
- message(FATAL_ERROR "The CUDA compiler \"${CMAKE_CUDA_COMPILER}\" "
+ 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 "
- "with the following output:\n ${__CMAKE_CUDA_COMPILER_OUTPUT}\n\n"
+ "with the following output:\n ${_output}\n\n"
"CMake will not be able to correctly generate this project.")
else()
if(CUDA_TEST_WAS_RUN)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index a31067b..7b80dc0 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -41,9 +41,10 @@ if(NOT CMAKE_CXX_COMPILER_WORKS)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the CXX compiler works failed with "
"the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
- message(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
+ 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 "
- "with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n"
+ "with the following output:\n ${_output}\n\n"
"CMake will not be able to correctly generate this project.")
else()
if(CXX_TEST_WAS_RUN)
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index c81694e..3c150a8 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -41,9 +41,10 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
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")
- message(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" "
+ 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 "
- "with the following output:\n ${OUTPUT}\n\n"
+ "with the following output:\n ${_output}\n\n"
"CMake will not be able to correctly generate this project.")
else()
if(FORTRAN_TEST_WAS_RUN)
diff --git a/Modules/CMakeTestSwiftCompiler.cmake b/Modules/CMakeTestSwiftCompiler.cmake
index 6393f44..bcd5c33 100644
--- a/Modules/CMakeTestSwiftCompiler.cmake
+++ b/Modules/CMakeTestSwiftCompiler.cmake
@@ -39,9 +39,10 @@ if(NOT CMAKE_Swift_COMPILER_WORKS)
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")
- message(FATAL_ERROR "The Swift compiler \"${CMAKE_Swift_COMPILER}\" "
+ 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 "
- "with the following output:\n ${__CMAKE_Swift_COMPILER_OUTPUT}\n\n"
+ "with the following output:\n ${_output}\n\n"
"CMake will not be able to correctly generate this project.")
else()
if(Swift_TEST_WAS_RUN)