[Cmake-commits] CMake branch, next, updated. v2.8.2-478-g37888a5
Alexander Neundorf
neundorf at kde.org
Tue Aug 17 15:44:20 EDT 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 37888a53f6238d39aee61861207bf2f8f8623246 (commit)
via e6c9bc267b6037e66447561b546e3ba25369140a (commit)
from 97a2f1fd23298587e87e245931a2150bd8ff91ff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37888a53f6238d39aee61861207bf2f8f8623246
commit 37888a53f6238d39aee61861207bf2f8f8623246
Merge: 97a2f1f e6c9bc2
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Aug 17 21:42:52 2010 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Aug 17 21:42:52 2010 +0200
Merge branch 'TimeoutForExecuteProcessInVendorChecking' into next
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6c9bc267b6037e66447561b546e3ba25369140a
commit e6c9bc267b6037e66447561b546e3ba25369140a
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Aug 17 21:40:45 2010 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Aug 17 21:40:45 2010 +0200
Add timeout to execute_process() in CMAKE_DETERMINE_COMPILER_ID().
In CMAKE_DETERMINE_COMPILER_ID_VENDOR() the compiler is called with various
arguments. In some cases, this can make the compiler hang and wait
forever for input (e.g. "as -v"). That's why add an timeout
so it terminates finally. 10 seconds should be more than enough,
this is the time it takes to startup the compiler, which is
usually quite fast.
Alex
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 5fc2238..bf78a5b 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -283,6 +283,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}
OUTPUT_VARIABLE output ERROR_VARIABLE output
RESULT_VARIABLE result
+ TIMEOUT 10
)
IF("${output}" MATCHES "${regex}")
FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
@@ -291,9 +292,15 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
SET(CMAKE_${lang}_COMPILER_ID "${vendor}" PARENT_SCOPE)
BREAK()
ELSE()
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
- "did not match \"${regex}\":\n${output}")
+ IF("${result}" MATCHES "timeout")
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
+ "terminated after 10 s due to timeout.")
+ ELSE()
+ FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Checking whether the ${lang} compiler is ${vendor} using \"${flags}\" "
+ "did not match \"${regex}\":\n${output}")
+ ENDIF()
ENDIF()
ENDFOREACH()
ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR)
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeDetermineCompilerId.cmake | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list