[CMake] CMake still broken post-2.8.1

Bill Hoffman bill.hoffman at kitware.com
Mon Oct 24 18:07:44 EDT 2011


On 10/24/2011 5:42 PM, Phil Smith wrote:
> Attached. ZTOOL is a wrapper for CMake, because we’re cross-compiling
> with a two-stage compiler and have various other requirements.
>
> We do a bunch of CMAKE –E commands before the cmake
> -DCMAKE_TOOLCHAIN_FILE:string="%~dp0\zosport.cmake" -G"Unix Makefiles" .\
>

So, right at the end it is doing this:


  )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake(95): 
IF(COMMAND EXECUTE_PROCESS )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake(96): 
EXECUTE_PROCESS(COMMAND ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_
COMPILER_ID_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${testflags} 
${src} WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR} 
OUTPUT_VARIABLE CMAKE_${lang}_C
OMPILER_ID_OUTPUT ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT 
RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT )
^CTerminate batch job (Y/N)?
^C*** 'CMake' phase ended at Mon 10/24/2011 17:38:47.64 with errorlevel 
-1073741510 **


Cmake is running the compiler you gave it.  Looks like:
regina.exe.


SET(CMAKE_C_COMPILER regina.exe cc.rex dcc.exe )
c:/SVN/Dignus/zosport.cmake(9):  SET(CMAKE_CXX_COMPILER regina.exe 
cc.rex dcxx.exe )

So, regina.exe is hanging forever.

To debug more, you could print out the exact command line CMake is 
trying to run.  Edit C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake on line 96, 
and add a new line that does this:

message("${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_
COMPILER_ID_ARG1} ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${testflags} 
${src}"


> Hope this makes some sense…
>
It does....  Add the above print, and try again.  Also, maybe run the 
command that CMake is running by hand and see if it hangs.  Since this 
is a toolchain file, you should be able to short circut the test 
altogether and set the information CMake is trying to figure out.


-Bill


More information about the CMake mailing list