From 01eb20e13f0c7be95a58a1022e214df269168281 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 19 Oct 2010 11:50:01 +0200 Subject: [PATCH] cmake: Fixed a problem with ccache. --- ConfigureChecks.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 9abdd750..8723496a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -17,9 +17,13 @@ set(BINARYDIR ${CMAKE_BINARY_DIR}) set(SOURCEDIR ${CMAKE_SOURCE_DIR}) function(COMPILER_DUMPVERSION _OUTPUT_VERSION) + # Remove whitespaces from the argument. + # This is needed for CC="ccache gcc" cmake .. + string(REPLACE " " "" _C_COMPILER_ARG "${CMAKE_C_COMPILER_ARG1}") + execute_process( COMMAND - ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} -dumpversion + ${CMAKE_C_COMPILER} ${_C_COMPILER_ARG} -dumpversion OUTPUT_VARIABLE _COMPILER_VERSION )