Ah HAH -- you're right, sort of, though I don't understand why it's this way. 
With the code added that you suggested:

GOOD

!!!! C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
-- arg=[COMMAND]
-- arg=[C:/Program Files/Regina/regina.exe]
-- arg=[cc.rex dcc.exe]
-- arg=[CMakeCCompilerId.c]
-- arg=[WORKING_DIRECTORY]
-- arg=[C:/SVN/zFPE/CMakeFiles/CompilerIdC]
-- arg=[OUTPUT_VARIABLE]
-- arg=[CMAKE_C_COMPILER_ID_OUTPUT]
-- arg=[ERROR_VARIABLE]
-- arg=[CMAKE_C_COMPILER_ID_OUTPUT]
-- arg=[RESULT_VARIABLE]
-- arg=[CMAKE_C_COMPILER_ID_RESULT]

BAD

!!!! c:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
-- arg=[COMMAND]
-- arg=[c:/Program Files/Regina/regina.exe]
-- arg=[cc.rex]
-- arg=[dcc.exe]
-- arg=[CMakeCCompilerId.c]
-- arg=[WORKING_DIRECTORY]
-- arg=[C:/SVN/zFPE/CMakeFiles/CompilerIdC]
-- arg=[OUTPUT_VARIABLE]
-- arg=[CMAKE_C_COMPILER_ID_OUTPUT]
-- arg=[ERROR_VARIABLE]
-- arg=[CMAKE_C_COMPILER_ID_OUTPUT]
-- arg=[RESULT_VARIABLE]
-- arg=[CMAKE_C_COMPILER_ID_RESULT]

But confusion continues. I changed cc.rex to echo its arguments on entry and 
its return code on exit to a log, and:

GOOD:
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c 
C:/SVN/zFPE/CMakeFiles/CMakeTmp/testCCompiler.c
Exiting cc.rex, rc=0
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/CMakeCCompilerABI.c.o -c C:/Program 
Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCCompilerABI.c
Exiting cc.rex, rc=1
dcxx.exe -o CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.cxx.o -c 
C:/SVN/zFPE/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Exiting cc.rex, rc=0
dcxx.exe -o CMakeFiles/cmTryCompileExec.dir/CMakeCXXCompilerABI.cpp.o -c 
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCXXCompilerABI.cpp
Exiting cc.rex, rc=1
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c 
C:/SVN/zFPE/CMakeFiles/CMakeTmp/CheckIncludeFile.c
Exiting cc.rex, rc=0
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c 
C:/SVN/zFPE/CMakeFiles/CMakeTmp/CheckIncludeFile.c
Exiting cc.rex, rc=0
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/CheckIncludeFile.c.o -c 
C:/SVN/zFPE/CMakeFiles/CMakeTmp/CheckIncludeFile.c
Exiting cc.rex, rc=0
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/SIZEOF_UNSIGNED_LONG_LONG.c.o -c 
C:/SVN/zFPE/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_LONG_LONG.c
Exiting cc.rex, rc=0
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/SIZEOF_UNSIGNED_LONG.c.o -c 
C:/SVN/zFPE/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_LONG.c
Exiting cc.rex, rc=0
dcc.exe -o CMakeFiles/cmTryCompileExec.dir/SIZEOF_UNSIGNED_INT.c.o -c 
C:/SVN/zFPE/CMakeFiles/CheckTypeSize/SIZEOF_UNSIGNED_INT.c
Exiting cc.rex, rc=0

BAD:
dcc.exe CMakeCCompilerId.c

So arguably this is a bug in my cc.rex, in that it's not noticing the missing 
arguments. But of course, "it worked before". Also note that cc.rex *never gets 
invoked against CMakeCCompilerId* in the GOOD case.

The more I look at this, the less I understand it...

-----Original Message-----
From: Phil Smith 
Sent: Friday, January 20, 2012 4:37 PM
To: 'Brad King'
Cc: Bill Hoffman; cmake@cmake.org
Subject: RE: [CMake] CMake still broken post-2.8.1

I'm confused because neither of your examples has the semicolon, but what we 
need is:
  "regina.exe" "cc.rex" "dcc.exe" "CMakeCCompilerId.c"

But it sounds like you're saying that we're not actually getting invoked as:
  cc.rex;dcc.exe   CMakeCCompilerId.c

The problem is, I can't tell what we ARE getting invoked as. The symptoms match 
regina being invoked with no operands, but I can't seem to prove that.

If I run with --trace and --debug-output, the last of the output is:

C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake(97):  
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 )
   Called from: [2]     C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake
                [1]     C:/SVN/zFPE/CMakeLists.txt

Does that tell us anything?

-----Original Message-----
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Friday, January 20, 2012 3:50 PM
To: Phil Smith
Cc: Bill Hoffman; cmake@cmake.org
Subject: Re: [CMake] CMake still broken post-2.8.1

On October 24, 2011 6:08 PM Bill Hoffman wrote:
 > So, right at the end it is doing this:
 >
 > 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}_COMPILER_ID_OUTPUT
 >   ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT
 >   RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT )
[snip]
 > message("${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1} 
 > ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} ${testflags} ${src}"
[snip]
On 10/24/2011 6:38 PM, Phil Smith wrote:
> Ah, ok. With 2.8.1:
>
> C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
>
> With 2.8.6:
> C:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
>
> Note the semicolon; where'd it come from? It's not in the toolchain file:

I did not notice previously that the reported ; is coming from a message()
command in a string and not a real command line that is invoked.  The
2.8.1 output line misrepresents the actual command that is running.
What you mean by:

 > SET(CMAKE_C_COMPILER   "regina.exe" "cc.rex dcc.exe")
 > SET(CMAKE_CXX_COMPILER "regina.exe" "cc.rex dcxx.exe")

is that you want the compiler to be invoked as

  "regina.exe" "cc.rex dcc.exe" "CMakeCCompilerId.c"

where the second piece puts both files in a *single* argument, right?
Much of the discussion in this thread made it appear that you wanted

  "regina.exe" "cc.rex" "dcc.exe" "CMakeCCompilerId.c"

but that is what the above-mentioned execute_process command ends up
running in 2.8.6 and causing the hang.

Correct?

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to