Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Phil Smith
Just to be clear: that doesn't mean CMake is right -- it's not passing all the 
arguments it should. How to move this forward?

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Phil Smith
Sent: Saturday, January 21, 2012 4:50 PM
To: Brad King
Cc: cmake@cmake.org; Bill Hoffman
Subject: Re: [CMake] CMake still broken post-2.8.1

Argh, premature send syndrome: the hang is definitely because cc.rex is missing 
arguments and thus invokes the actual, two-stage C compiler without a source 
file.

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

On 1/21/2012 12:24 PM, Phil Smith wrote:
 GOOD
  C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
 -- arg=[C:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 BAD
  c:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
 -- arg=[c:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex]
 -- arg=[dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 GOOD:
 dcc.exe -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c 
 C:/SVN/zFPE/CMakeFiles/CMakeTmp/testCCompiler.c
 Exiting cc.rex, rc=0
[snip]
 BAD:
 dcc.exe CMakeCCompilerId.c

Can you reproduce these two results by running the two different
command lines on a dummy .c file by hand at a command prompt?

-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
--

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Brad King

On 1/25/2012 9:06 AM, Phil Smith wrote:

Just to be clear: that doesn't mean CMake is right -- it's not passing all

 the arguments it should. How to move this forward?

IMO the change to CMake that exposed this was correct.  The ARG1
has always been a literal string placed in command shells after the
compiler command.  This is how it was treated everywhere except in
the compiler id detection, which uses execute_process instead of a
command shell to run the compiler.  That was a bug because it was
not running the compiler during identification in the same way that
it runs the compiler in the generated build system.  The change in
question fixed that bug by separating the arguments like they would
be in the generated command lines.  The only remaining possible fix
to that is to do a better job of separating the arguments like a
shell would by honoring quoted arguments with spaces, but that would
not make a difference in your case because there are no quotes inside
the argument value itself (only quotes in the CMake language syntax).

In your case, the code

  SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)

tells CMake to generate command lines in the build system like

  regina.exe cc.rex dcc.exe ...

because the second argument is placed literally on the command line.
Prior to the change in question CMake was doing this most of the time
but not during compiler identification.  Now it is fixed.

It's unfortunate that the bug fix to CMake exposed this bug in your
project, but that is something you'll have to fix in your project.
We've also provided other approaches elsewhere in this thread to
avoid the problem altogether by setting up your toolchain file to
skip compiler id detection.  I consider this matter closed.

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Phil Smith
We've also provided other approaches elsewhere in this thread to
avoid the problem altogether by setting up your toolchain file to
skip compiler id detection.  

OK, I'm willing to do that, but I can't figure out how to do so.

It seems like:

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

need to change to 

SET(CMAKE_FORCE_C_COMPILER   something)
SET(CMAKE_FORCE_CXX_COMPILER something)

but I've tried various somethings with no luck. I suspect this is complicated 
by the fact that my compiler is a multi-token invocation (regina.exe cc.rex 
dcc.exe). I tried:

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

and
SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe Dignus)
SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe Dignus)

I'm out of ideas, but it sounds like we're on a path to resolution?!
--

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Brad King

On 1/25/2012 10:53 AM, Phil Smith wrote:

We've also provided other approaches elsewhere in this thread to
avoid the problem altogether by setting up your toolchain file to
skip compiler id detection.


OK, I'm willing to do that, but I can't figure out how to do so.


Actually the previous discussion was about skipping the test for a
working compiler as well as the compiler id.  There is a mid ground
that can skip just the id part but keep everything else the same.


It seems like:

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


Keep those lines and add

  SET(CMAKE_C_COMPILER_ID_RUN 1)
  SET(CMAKE_C_PLATFORM_ID )
  SET(CMAKE_C_COMPILER_ID )
  SET(CMAKE_CXX_COMPILER_ID_RUN 1)
  SET(CMAKE_CXX_PLATFORM_ID )
  SET(CMAKE_CXX_COMPILER_ID )

Fill in the ID values if you need to.

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Brad King

On 1/25/2012 1:50 PM, Phil Smith wrote:

Ok, that *maybe* gets me further. CMakeDetermineASM_DIGNUSCompiler.cmake (in 
Modules\) is:

SET(ASM_DIALECT _DIGNUS)
SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT asmit.bat)
INCLUDE(CMakeDetermineASMCompiler)
SET(ASM_DIALECT)

and that gets invoked several times, with:

dasm.exe --version
dasm.exe -h
dasm.exe -qversion
dasm.exe -V

...none of which work. Maybe I need to force something for the assembler?

 Or should asmit.bat just return 0 for any of those?

Assembly support was very immature as of 2.8.0 and has been modified
since then.  I've heard complaints that some incompatibilities were
introduced but never worked with it myself.

Alex?


Oh, I did also try the recommended lines, both as listed and as:

SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID DIGNUS)
SET(CMAKE_C_COMPILER_ID DIGNUS)
SET(CMAKE_CXX_COMPILER_ID_RUN 1)
SET(CMAKE_CXX_PLATFORM_ID DIGNUS)
SET(CMAKE_CXX_COMPILER_ID DIGNUS
I'm not sure DIGNUS was the right ID to try, but it didn't seem to make any 
difference.


It won't make a difference unless CMake has a matching Platform/*
and/or Compiler/* information module available in CMAKE_MODULE_PATH.
If it works without that then don't worry about it.


The problem here, of course, is that I don't understand what it's *trying* to do


The relevant process is documented here:

  
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGlobalGenerator.cxx;hb=v2.8.6#l152

During CMakeDetermine(LANG)Compiler CMake figures out what compiler
the user is asking it to choose for a LANGuage (via either the
environment or a toolchain file).  Then it runs that compiler in
the CMakeDetermineCompilerId module to detect the compiler vendor.
From that name the CMake(LANG)Information.cmake step loads matching
Platform/* and Compiler/* modules that contain information about how
to generate build rules for that compiler.

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Alexander Neundorf
On Wednesday 25 January 2012, Brad King wrote:
 On 1/25/2012 1:50 PM, Phil Smith wrote:
  Ok, that *maybe* gets me further. CMakeDetermineASM_DIGNUSCompiler.cmake
  (in Modules\) is:
  
  SET(ASM_DIALECT _DIGNUS)
  SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT asmit.bat)
  INCLUDE(CMakeDetermineASMCompiler)
  SET(ASM_DIALECT)
  
  and that gets invoked several times, with:
  
  dasm.exe --version
  dasm.exe -h
  dasm.exe -qversion
  dasm.exe -V
  
  ...none of which work. Maybe I need to force something for the assembler?
  
   Or should asmit.bat just return 0 for any of those?

This is cmak trying to recognize which assembler this is by looking at the 
output of the assembler,

This is e.g. what GNU as says:
hammer:~$ as --version
GNU assembler (Linux/GNU Binutils) 2.21.51.0.6.20110118
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i486-slackware-linux'.

There is then a regexp in CMakeDetermineASMCompiler.cmake, which recognizes 
this as the GNU assembler.
Does dasm.exe have a command line switch which just makes it print its name 
and version number and exit ?

This should be added to CMakeDetermineASMCompiler.cmake then.
...or you preset CMAKE_ASM_DIGNUS_COMPILER_ID to DIGNUS.

 Assembly support was very immature as of 2.8.0 and has been modified
 since then.  I've heard complaints that some incompatibilities were
 introduced but never worked with it myself.

Yes. It should be much better now.
But I didn't follow that whole thread...

Alex
--

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Phil Smith
No, there's no What version are you? flag for dasm.

I added 
set(CMAKE_ASM_DIGNUS_COMPILER_ID DIGNUS)

and now it seems to be invoking regina.exe with just the -o flag. Is that the 
right SET ?

-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Wednesday, January 25, 2012 2:46 PM
To: cmake@cmake.org; Phil Smith
Subject: Re: [CMake] CMake still broken post-2.8.1

On Wednesday 25 January 2012, Brad King wrote:
 On 1/25/2012 1:50 PM, Phil Smith wrote:
  Ok, that *maybe* gets me further. CMakeDetermineASM_DIGNUSCompiler.cmake
  (in Modules\) is:
  
  SET(ASM_DIALECT _DIGNUS)
  SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT asmit.bat)
  INCLUDE(CMakeDetermineASMCompiler)
  SET(ASM_DIALECT)
  
  and that gets invoked several times, with:
  
  dasm.exe --version
  dasm.exe -h
  dasm.exe -qversion
  dasm.exe -V
  
  ...none of which work. Maybe I need to force something for the assembler?
  
   Or should asmit.bat just return 0 for any of those?

This is cmak trying to recognize which assembler this is by looking at the 
output of the assembler,

This is e.g. what GNU as says:
hammer:~$ as --version
GNU assembler (Linux/GNU Binutils) 2.21.51.0.6.20110118
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `i486-slackware-linux'.

There is then a regexp in CMakeDetermineASMCompiler.cmake, which recognizes 
this as the GNU assembler.
Does dasm.exe have a command line switch which just makes it print its name 
and version number and exit ?

This should be added to CMakeDetermineASMCompiler.cmake then.
...or you preset CMAKE_ASM_DIGNUS_COMPILER_ID to DIGNUS.

 Assembly support was very immature as of 2.8.0 and has been modified
 since then.  I've heard complaints that some incompatibilities were
 introduced but never worked with it myself.

Yes. It should be much better now.
But I didn't follow that whole thread...

Alex
--

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-25 Thread Alexander Neundorf
On Wednesday 25 January 2012, Phil Smith wrote:
 No, there's no What version are you? flag for dasm.
 
 I added
   set(CMAKE_ASM_DIGNUS_COMPILER_ID DIGNUS)
 
 and now it seems to be invoking regina.exe with just the -o flag. Is that
 the right SET ?

Looks good, are you sure this is still from the compiler ID detection ?

Add some debugging output to CMakeDetermineASMCompiler.cmake, this should show 
you what it going on.
Or run cmake --trace, that prints line by line what cmake valuates.

Alex
--

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Phil Smith
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_

Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Brad King
On 1/21/2012 12:24 PM, Phil Smith wrote:
 GOOD
  C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
 -- arg=[C:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 BAD
  c:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
 -- arg=[c:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex]
 -- arg=[dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 GOOD:
 dcc.exe -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c 
 C:/SVN/zFPE/CMakeFiles/CMakeTmp/testCCompiler.c
 Exiting cc.rex, rc=0
[snip]
 BAD:
 dcc.exe CMakeCCompilerId.c

Can you reproduce these two results by running the two different
command lines on a dummy .c file by hand at a command prompt?

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Phil Smith
Well, the hang occurs when I do so. The good line doesn't work due to paths, 
the temporary C file not having been created, etc., but it doesn't hang.

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

On 1/21/2012 12:24 PM, Phil Smith wrote:
 GOOD
  C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
 -- arg=[C:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 BAD
  c:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
 -- arg=[c:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex]
 -- arg=[dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 GOOD:
 dcc.exe -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c 
 C:/SVN/zFPE/CMakeFiles/CMakeTmp/testCCompiler.c
 Exiting cc.rex, rc=0
[snip]
 BAD:
 dcc.exe CMakeCCompilerId.c

Can you reproduce these two results by running the two different
command lines on a dummy .c file by hand at a command prompt?

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-21 Thread Phil Smith
Argh, premature send syndrome: the hang is definitely because cc.rex is missing 
arguments and thus invokes the actual, two-stage C compiler without a source 
file.

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

On 1/21/2012 12:24 PM, Phil Smith wrote:
 GOOD
  C:/Program Files/Regina/regina.exe cc.rex dcc.exe   CMakeCCompilerId.c
 -- arg=[C:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 BAD
  c:/Program Files/Regina/regina.exe cc.rex;dcc.exe   CMakeCCompilerId.c
 -- arg=[c:/Program Files/Regina/regina.exe]
 -- arg=[cc.rex]
 -- arg=[dcc.exe]
 -- arg=[CMakeCCompilerId.c]
[snip]
 GOOD:
 dcc.exe -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c 
 C:/SVN/zFPE/CMakeFiles/CMakeTmp/testCCompiler.c
 Exiting cc.rex, rc=0
[snip]
 BAD:
 dcc.exe CMakeCCompilerId.c

Can you reproduce these two results by running the two different
command lines on a dummy .c file by hand at a command prompt?

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-20 Thread Phil Smith
Still no answer to these questions?

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Phil Smith
Sent: Tuesday, January 03, 2012 1:29 PM
To: Brad King
Cc: cmake@cmake.org; b...@public.kitware.com; Hoffman; Janet Graff
Subject: Re: [CMake] CMake still broken post-2.8.1

I'm back to this. I never got (or never understood!) an answer to this part of 
the thread, which is where the breakage occurred:
--
If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
old toolchain file, but fails later with the new one, because it appears to 
call the compiler without the flags, and regina with no arguments produces 
Help and exits.

Why are the semicolons being inserted? If I wanted semicolons between the 
parameters, why wouldn't I just specify them?

Brad, your comment in the thread says:
Teach compiler identification to support values such as
  export CC='gcc -g -O2'
by separating the arguments on spaces.

Not sure what on spaces means, but again, it seems wrong to me that anything 
is messing with my option format.
--

So -- why are semicolons being inserted?

...phsiii
--

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
--

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-20 Thread Brad King

On 1/3/2012 1:29 PM, Phil Smith wrote:

If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
old toolchain file

[snip]

So -- why are semicolons being inserted?


The change was discussed here:

 http://www.cmake.org/pipermail/cmake/2010-March/035810.html
 http://www.cmake.org/pipermail/cmake/2010-March/035811.html
 http://www.cmake.org/pipermail/cmake/2010-March/035812.html
 http://www.cmake.org/pipermail/cmake/2010-March/035815.html [1]
 http://www.cmake.org/pipermail/cmake/2010-March/035816.html
 http://www.cmake.org/pipermail/cmake/2010-March/035817.html [2]
 http://www.cmake.org/pipermail/cmake/2010-March/035818.html

The patch in [1] seemed correct at the time.  It looks like in [2]
I mentioned the possibility of the failure you are seeing.  Does
reverting the change completely solve the problem for you?

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-20 Thread Phil Smith
Ah. Yes, it does solve the problem. This isn't path-related, however, it's 
option-related. This is on Windows.

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

On 1/3/2012 1:29 PM, Phil Smith wrote:
 If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
 old toolchain file
[snip]
 So -- why are semicolons being inserted?

The change was discussed here:

  http://www.cmake.org/pipermail/cmake/2010-March/035810.html
  http://www.cmake.org/pipermail/cmake/2010-March/035811.html
  http://www.cmake.org/pipermail/cmake/2010-March/035812.html
  http://www.cmake.org/pipermail/cmake/2010-March/035815.html [1]
  http://www.cmake.org/pipermail/cmake/2010-March/035816.html
  http://www.cmake.org/pipermail/cmake/2010-March/035817.html [2]
  http://www.cmake.org/pipermail/cmake/2010-March/035818.html

The patch in [1] seemed correct at the time.  It looks like in [2]
I mentioned the possibility of the failure you are seeing.  Does
reverting the change completely solve the problem for you?

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-20 Thread Brad King

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


Re: [CMake] CMake still broken post-2.8.1

2012-01-20 Thread Phil Smith
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


Re: [CMake] CMake still broken post-2.8.1

2012-01-20 Thread Brad King

On 1/20/2012 4:37 PM, Phil Smith wrote:

I'm confused because neither of your examples has the semicolon,


I was asking which one you need, so neither option has semicolons.

 but what we need is:

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


Okay.


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


Correct.  The execute_process should not be using the ;.  The semicolon
is CMake's list separator.  The execute process command line you see:


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 )


is here:

  
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerId.cmake;hb=v2.8.6#l96

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
  )

CMake will evaluate ${CMAKE_${lang}_COMPILER_ID_ARG1} and split it on
the semicolons.  The execute_process will see the result as two arguments,
cc.rex and dcc.exe, which is what you said is needed.  In fact if it
were not for the ;-change you would be getting a single cc.rex dcc.exe
argument.  That is why I asked if that's what you want, since it appears
to work.

To see this, add this code right above that EXECUTE_PROCESS call:

FOREACH(arg
  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
  )
  MESSAGE(STATUS arg=[${arg}])
ENDFOREACH()

The configure output should show you the exact set of arguments.

-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


Re: [CMake] CMake still broken post-2.8.1

2012-01-03 Thread Phil Smith
I'm back to this. I never got (or never understood!) an answer to this part of 
the thread, which is where the breakage occurred:
--
If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
old toolchain file, but fails later with the new one, because it appears to 
call the compiler without the flags, and regina with no arguments produces 
Help and exits.

Why are the semicolons being inserted? If I wanted semicolons between the 
parameters, why wouldn't I just specify them?

Brad, your comment in the thread says:
Teach compiler identification to support values such as
  export CC='gcc -g -O2'
by separating the arguments on spaces.

Not sure what on spaces means, but again, it seems wrong to me that anything 
is messing with my option format.
--

So -- why are semicolons being inserted?

...phsiii
--

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


[CMake] CMake still broken post-2.8.1

2011-10-31 Thread Eric Noulard
2011/10/27 Phil Smith p...@voltage.com:
 Ok, tried the CMakeLists change, no change.

 The Dignus-related files are attached.

Thanks, nothing strange in there.

Sorry for the delay, but I'm entering a not so much spare time loop
moreover I should admit I do not have any more debugging idea
for your problem.

Since I may not be able to reproduce your problem I'm stuck.

I hope someone here could take over and help you more.
If ever you would be able to reproduce the problem with
some publicly available tools it would be easier to seek the issue.


--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Phil Smith
Hmm. My zosport.cmake is now (comments/blank lines removed):

SET(CMAKE_SYSTEM_NAME IBM_ZOS)
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID MyPlatform)
SET(CMAKE_C_COMPILER_ID MyCompiler)
SET(CMAKE_C_COMPILER   regina)
SET(CMAKE_C_FLAGS cc.rex dcc.exe)
SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)
SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
\-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)

I get:
-- Found assembler: C:/SVN/Dignus/asmit.bat
-- Check for working C compiler: C:/Program Files/Regina/regina.exe
-- Check for working C compiler: C:/Program Files/Regina/regina.exe -- broken
CMake Error at C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler C:/Program Files/Regina/regina.exe is not able to compile
  a simple test program.

So it looks like it's still trying to run the C compiler?!

...phsiii
-Original Message-
From: Bill Hoffman [mailto:bill.hoff...@kitware.com] 
Sent: Wednesday, October 26, 2011 12:43 PM
To: Phil Smith
Cc: a.neundorf-w...@gmx.net; cmake@cmake.org; David Cole; Janet Graff; Brad King
Subject: Re: [CMake] CMake still broken post-2.8.1

So, since this is a cross compile situation, there is really no need to 
run the compiler id code.  You should be able to put the following into 
your toolchain file and avoid the compiler id check code altogether:


   SET(CMAKE_C_COMPILER_ID_RUN 1)
   SET(CMAKE_C_PLATFORM_ID MyPlatform)
   SET(CMAKE_C_COMPILER_ID MyCompiler)


Does that work, or does it get stuck somewhere else?

-Bill
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Eric Noulard
2011/10/27 Phil Smith p...@voltage.com:
 Hmm. My zosport.cmake is now (comments/blank lines removed):

 SET(CMAKE_SYSTEM_NAME IBM_ZOS)
 SET(CMAKE_C_COMPILER_ID_RUN 1)
 SET(CMAKE_C_PLATFORM_ID MyPlatform)
 SET(CMAKE_C_COMPILER_ID MyCompiler)
 SET(CMAKE_C_COMPILER   regina)
 SET(CMAKE_C_FLAGS cc.rex dcc.exe)
 SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)
 SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
 \-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)

 I get:

Did you put the code above in a Platform file or a Toolchain file?

What is the exact command line did you use to get the following?


 -- Found assembler: C:/SVN/Dignus/asmit.bat
 -- Check for working C compiler: C:/Program Files/Regina/regina.exe
 -- Check for working C compiler: C:/Program Files/Regina/regina.exe -- broken
 CMake Error at C:/Program Files (x86)/CMake 
 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler C:/Program Files/Regina/regina.exe is not able to compile
  a simple test program.

 So it looks like it's still trying to run the C compiler?!

 ...phsiii
 -Original Message-
 From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
 Sent: Wednesday, October 26, 2011 12:43 PM
 To: Phil Smith
 Cc: a.neundorf-w...@gmx.net; cmake@cmake.org; David Cole; Janet Graff; Brad 
 King
 Subject: Re: [CMake] CMake still broken post-2.8.1

 So, since this is a cross compile situation, there is really no need to
 run the compiler id code.  You should be able to put the following into
 your toolchain file and avoid the compiler id check code altogether:


   SET(CMAKE_C_COMPILER_ID_RUN 1)
   SET(CMAKE_C_PLATFORM_ID MyPlatform)
   SET(CMAKE_C_COMPILER_ID MyCompiler)


 Does that work, or does it get stuck somewhere else?

 -Bill
 --

 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




-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Hendrik Sattler

On Thu, 27 Oct 2011 05:40:24 -0700, Phil Smith wrote:

Hmm. My zosport.cmake is now (comments/blank lines removed):

SET(CMAKE_SYSTEM_NAME IBM_ZOS)
SET(CMAKE_C_COMPILER_ID_RUN 1)
SET(CMAKE_C_PLATFORM_ID MyPlatform)
SET(CMAKE_C_COMPILER_ID MyCompiler)
SET(CMAKE_C_COMPILER   regina)
SET(CMAKE_C_FLAGS cc.rex dcc.exe)


Shouldn't this be
  SET(CMAKE_C_FLAGS_INIT cc.rex dcc.exe)
?

HS

--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Phil Smith
Toolchain. Command line:

cmake -DCMAKE_TOOLCHAIN_FILE:string=%~dp0\zosport.cmake -GUnix Makefiles .\

But Hendrik asked:
Shouldn't this be
   SET(CMAKE_C_FLAGS_INIT cc.rex dcc.exe)

and that helped: I get past CMAKE. But then MAKE invokes Regina with no 
operands. I tried adding another SET(CMAKE_C_FLAGS cc.rex dcc.exe) but that 
didn't help. In CMakeCache.txt I see:

CMAKE_C_COMPILER:FILEPATH=C:/Program Files/Regina/regina.exe
and
CMAKE_C_COMPILER_WITH_PATH:FILEPATH=C:/Program Files/Regina/regina.exe

and 
CMAKE_C_FLAGS:STRING= cc.rex dcc.exe

So I'm confused??

But we're making progress!
-Original Message-
From: Eric Noulard [mailto:eric.noul...@gmail.com] 
Sent: Thursday, October 27, 2011 9:00 AM
To: Phil Smith
Cc: Bill Hoffman; Brad King; cmake@cmake.org; Janet Graff; 
a.neundorf-w...@gmx.net
Subject: Re: [CMake] CMake still broken post-2.8.1

2011/10/27 Phil Smith p...@voltage.com:
 Hmm. My zosport.cmake is now (comments/blank lines removed):

 SET(CMAKE_SYSTEM_NAME IBM_ZOS)
 SET(CMAKE_C_COMPILER_ID_RUN 1)
 SET(CMAKE_C_PLATFORM_ID MyPlatform)
 SET(CMAKE_C_COMPILER_ID MyCompiler)
 SET(CMAKE_C_COMPILER   regina)
 SET(CMAKE_C_FLAGS cc.rex dcc.exe)
 SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)
 SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
 \-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)

 I get:

Did you put the code above in a Platform file or a Toolchain file?

What is the exact command line did you use to get the following?


 -- Found assembler: C:/SVN/Dignus/asmit.bat
 -- Check for working C compiler: C:/Program Files/Regina/regina.exe
 -- Check for working C compiler: C:/Program Files/Regina/regina.exe -- broken
 CMake Error at C:/Program Files (x86)/CMake 
 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler C:/Program Files/Regina/regina.exe is not able to compile
  a simple test program.

 So it looks like it's still trying to run the C compiler?!

 ...phsiii
 -Original Message-
 From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
 Sent: Wednesday, October 26, 2011 12:43 PM
 To: Phil Smith
 Cc: a.neundorf-w...@gmx.net; cmake@cmake.org; David Cole; Janet Graff; Brad 
 King
 Subject: Re: [CMake] CMake still broken post-2.8.1

 So, since this is a cross compile situation, there is really no need to
 run the compiler id code.  You should be able to put the following into
 your toolchain file and avoid the compiler id check code altogether:


   SET(CMAKE_C_COMPILER_ID_RUN 1)
   SET(CMAKE_C_PLATFORM_ID MyPlatform)
   SET(CMAKE_C_COMPILER_ID MyCompiler)


 Does that work, or does it get stuck somewhere else?

 -Bill
 --

 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




-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Eric Noulard
Narrowing down the cc list, everybody should be subscribed to the list..

2011/10/27 Phil Smith p...@voltage.com:
 Toolchain.

You lack some var definitions in your toolchain:
see
http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH  /home/alex/src/ecos/install )

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

aren't you using some find_path or find_package in your CMakeLists.txt ?

 Command line:

 cmake -DCMAKE_TOOLCHAIN_FILE:string=%~dp0\zosport.cmake -GUnix Makefiles 
 .\

You seem to be doing in-source build, are you sure you did get rid of
CMake generated files
(CMakeCache.txt, CMakeFiles etc...) between two trials?

Using out-of-source build should makes it easier to start from
pristine source tree:
http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees


 But Hendrik asked:
 Shouldn't this be
   SET(CMAKE_C_FLAGS_INIT cc.rex dcc.exe)

 and that helped: I get past CMAKE. But then MAKE invokes Regina with no 
 operands. I tried adding another SET(CMAKE_C_FLAGS cc.rex dcc.exe) but that 
 didn't help. In CMakeCache.txt I see:for a

 CMAKE_C_COMPILER:FILEPATH=C:/Program Files/Regina/regina.exe
 and
 CMAKE_C_COMPILER_WITH_PATH:FILEPATH=C:/Program Files/Regina/regina.exe

 and
 CMAKE_C_FLAGS:STRING= cc.rex dcc.exe

 So I'm confused??

 But we're making progress!

You seem to be using assembler as well:

 -- Found assembler: C:/SVN/Dignus/asmit.bat
 -- Check for working C compiler: C:/Program Files/Regina/regina.exe

May be you can send us your main CMakeLists.txt?
I do not know how Assembler and C support interact when cross-compiling
Alex any advice on that?


--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Phil Smith
Yeah, I know everyone thinks out-of-source builds are better, but we have 
peculiar requirements related to packaging up the object decks and the like 
that really make out-of-source builds unappealing. We've been doing this for 
almost 4 years, so we're pretty happy with it (other than this new issue).

I delete CMakeCache.txt and rm -rf CMakeFiles, re-cmake, make, and it calls 
Regina with no operands. Is there anything else I need to clean up?

There are no FIND_anythings in the CMakeLists.

Yes, we're using assembler as well. ASMIT.BAT is simple:
@echo off
rexx.exe cc.rex dasm.exe %*

That works because dasm doesn't take parameters in the var=value format.

I've attached the CMakeLists.txt.

...phsiii
-Original Message-
From: Eric Noulard [mailto:eric.noul...@gmail.com] 
Sent: Thursday, October 27, 2011 10:23 AM
To: Phil Smith; CMake ML
Subject: Re: [CMake] CMake still broken post-2.8.1

Narrowing down the cc list, everybody should be subscribed to the list..

2011/10/27 Phil Smith p...@voltage.com:
 Toolchain.

You lack some var definitions in your toolchain:
see
http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH  /home/alex/src/ecos/install )

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

aren't you using some find_path or find_package in your CMakeLists.txt ?

 Command line:

 cmake -DCMAKE_TOOLCHAIN_FILE:string=%~dp0\zosport.cmake -GUnix Makefiles 
 .\

You seem to be doing in-source build, are you sure you did get rid of
CMake generated files
(CMakeCache.txt, CMakeFiles etc...) between two trials?

Using out-of-source build should makes it easier to start from
pristine source tree:
http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees


 But Hendrik asked:
 Shouldn't this be
   SET(CMAKE_C_FLAGS_INIT cc.rex dcc.exe)

 and that helped: I get past CMAKE. But then MAKE invokes Regina with no 
 operands. I tried adding another SET(CMAKE_C_FLAGS cc.rex dcc.exe) but that 
 didn't help. In CMakeCache.txt I see:for a

 CMAKE_C_COMPILER:FILEPATH=C:/Program Files/Regina/regina.exe
 and
 CMAKE_C_COMPILER_WITH_PATH:FILEPATH=C:/Program Files/Regina/regina.exe

 and
 CMAKE_C_FLAGS:STRING= cc.rex dcc.exe

 So I'm confused??

 But we're making progress!

You seem to be using assembler as well:

 -- Found assembler: C:/SVN/Dignus/asmit.bat
 -- Check for working C compiler: C:/Program Files/Regina/regina.exe

May be you can send us your main CMakeLists.txt?
I do not know how Assembler and C support interact when cross-compiling
Alex any advice on that?


--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
#
#   CMake File for ZFPE, the z/OS SecureData integration tool
#   (c) in 2009 by Voltage Security Inc.
#

cmake_minimum_required (VERSION 2.6)

project(ZFPE C ASM_DIGNUS)

SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)

#set(CMAKE_C_COMPILER xlc)
#SET(CMAKE_CXX_COMPILER XLC++)

set(CMAKE_BUILD_TYPE Release CACHE STRING Release or Debug FORCE)

include(CheckTypeSize)

set(VOLT_GMP   OFF CACHE BOOL Use GMP Bignum Library [requires Toolkit 
with GMP Support])
set(VOLT_SHAREDLIB OFF CACHE BOOL Additionally build shared libraries)

# Handle possible z/OS build
if (CMAKE_SYSTEM_NAME STREQUAL IBM_ZOS)
  set(IBM_ZOS 1)

# Files that are EBCDIC and should NOT use -fasciiout are set here
# *** FILENAMES CAN BE BARE OR FULLY QUALIFIED ***
# That is, deffile.c could be ../some/path/deffile.c, but either will
# work and will not cause bogus matches.
  set(EBCDIC_source
*.c
*.C
  )
endif ()

if (WIN32)
set(CMAKE_C_FLAGS_DEBUG /MTd)
set(CMAKE_C_FLAGS_RELEASE /MT)
endif()
if (IBM_ZOS)
set(VOLT_COMPILER VOLT_DIGNUS_C)
endif ()


# LIST_CONTAINS takes a variable name, a value, and a list, returns TRUE if 
value in list
# E.g.: LIST_CONTAINS(result token 'A B C D TOKEN')
#   would set RESULT to TRUE
#
# This code tries to be clever and allow both simple fileids and fully 
qualified ones
# in the list. Thus both /some/path/filename.c and just filename.c will match 
filename.c.
   macro(LIST_CONTAINS var value)
  set(${var})
  foreach (token ${ARGN})
# Fully qualified filename??
string(REGEX MATCH .*/.* LCfp ${token})
# Fully qualified, just use IF/STREQUAL
if(LCfp)
   if (${value} STREQUAL ${token})
  set(${var} TRUE)
   endif (${value} STREQUAL ${token})
# Not fully qualified, use regex with leading / to avoid false matches
else()
   string(REGEX MATCH /${token}$ LCfp ${value})
   if (NOT LCfp STREQUAL )
  set(${var} TRUE)
   endif ()
endif(LCfp)
# DEBUG
# if(${var})
# MESSAGE(STATUS EBCDIC is ${EBCDIC} VAR is ${var} LIST_CONTAINS matched 
/${token

Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Eric Noulard
2011/10/27 Phil Smith p...@voltage.com:
 Yeah, I know everyone thinks out-of-source builds are better, but we have 
 peculiar requirements related to packaging up the object decks and the like 
 that really make out-of-source builds unappealing. We've been doing this for 
 almost 4 years, so we're pretty happy with it (other than this new issue).

OK I see I do intend to change your habits just to suggest
that it is usually safer for testing purpose.

 I delete CMakeCache.txt and rm -rf CMakeFiles, re-cmake, make, and it calls 
 Regina with no operands. Is there anything else I need to clean up?

You should have a bunch of cmake_install.cmake files (but those
shouldn't change the behaviour of the next cmake run)
You'll probably have CPackConfig.cmake and CPackSourceConfig.cmake
Then any file coming from configure_file or add_custom_command of yours.

 There are no FIND_anythings in the CMakeLists.

OK good.

 Yes, we're using assembler as well. ASMIT.BAT is simple:
 @echo off
 rexx.exe cc.rex dasm.exe %*

Ok then may be the ASM usage triggers C compiler setup too early,
again Alex would know better than me here.

Could you try

cmake_minimum_required (VERSION 2.6)
project(ZFPE C)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
enable_language(ASM_DIGNUS)

instead of your current.

cmake_minimum_required (VERSION 2.6)
project(ZFPE C ASM_DIGNUS)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)

 That works because dasm doesn't take parameters in the var=value format.
 I've attached the CMakeLists.txt.

Yes then now we may need your ASM_DIGNUS cmake support file
because unless I'm wrong I do not see it in CMake upstream source.



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-27 Thread Phil Smith
Ok, tried the CMakeLists change, no change.

The Dignus-related files are attached.

Thanks.

-Original Message-
From: Eric Noulard [mailto:eric.noul...@gmail.com] 
Sent: Thursday, October 27, 2011 1:47 PM
To: Phil Smith
Cc: CMake ML
Subject: Re: [CMake] CMake still broken post-2.8.1

2011/10/27 Phil Smith p...@voltage.com:
 Yeah, I know everyone thinks out-of-source builds are better, but we have 
 peculiar requirements related to packaging up the object decks and the like 
 that really make out-of-source builds unappealing. We've been doing this for 
 almost 4 years, so we're pretty happy with it (other than this new issue).

OK I see I do intend to change your habits just to suggest
that it is usually safer for testing purpose.

 I delete CMakeCache.txt and rm -rf CMakeFiles, re-cmake, make, and it calls 
 Regina with no operands. Is there anything else I need to clean up?

You should have a bunch of cmake_install.cmake files (but those
shouldn't change the behaviour of the next cmake run)
You'll probably have CPackConfig.cmake and CPackSourceConfig.cmake
Then any file coming from configure_file or add_custom_command of yours.

 There are no FIND_anythings in the CMakeLists.

OK good.

 Yes, we're using assembler as well. ASMIT.BAT is simple:
 @echo off
 rexx.exe cc.rex dasm.exe %*

Ok then may be the ASM usage triggers C compiler setup too early,
again Alex would know better than me here.

Could you try

cmake_minimum_required (VERSION 2.6)
project(ZFPE C)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
enable_language(ASM_DIGNUS)

instead of your current.

cmake_minimum_required (VERSION 2.6)
project(ZFPE C ASM_DIGNUS)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)

 That works because dasm doesn't take parameters in the var=value format.
 I've attached the CMakeLists.txt.

Yes then now we may need your ASM_DIGNUS cmake support file
because unless I'm wrong I do not see it in CMake upstream source.



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


CMakeASM_DIGNUSInformation.cmake
Description: CMakeASM_DIGNUSInformation.cmake


CMakeDetermineASM_DIGNUSCompiler.cmake
Description: CMakeDetermineASM_DIGNUSCompiler.cmake


CMakeTestASM_DIGNUSCompiler.cmake
Description: CMakeTestASM_DIGNUSCompiler.cmake
--

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

Re: [CMake] CMake still broken post-2.8.1

2011-10-26 Thread Bill Hoffman
So, since this is a cross compile situation, there is really no need to 
run the compiler id code.  You should be able to put the following into 
your toolchain file and avoid the compiler id check code altogether:



  SET(CMAKE_C_COMPILER_ID_RUN 1)
  SET(CMAKE_C_PLATFORM_ID MyPlatform)
  SET(CMAKE_C_COMPILER_ID MyCompiler)


Does that work, or does it get stuck somewhere else?

-Bill
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-26 Thread Phil Smith
Thanks, Bill; I will try that and report back.

-Original Message-
From: Bill Hoffman [mailto:bill.hoff...@kitware.com] 
Sent: Wednesday, October 26, 2011 12:43 PM
To: Phil Smith
Cc: a.neundorf-w...@gmx.net; cmake@cmake.org; David Cole; Janet Graff; Brad King
Subject: Re: [CMake] CMake still broken post-2.8.1

So, since this is a cross compile situation, there is really no need to 
run the compiler id code.  You should be able to put the following into 
your toolchain file and avoid the compiler id check code altogether:


   SET(CMAKE_C_COMPILER_ID_RUN 1)
   SET(CMAKE_C_PLATFORM_ID MyPlatform)
   SET(CMAKE_C_COMPILER_ID MyCompiler)


Does that work, or does it get stuck somewhere else?

-Bill
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Eric Noulard
2011/10/25 Phil Smith p...@voltage.com:
 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?

This is clearly a change of behavior but from my point of view it is a change
of unsupported and/or unexpected behaviour.

  It's not in the toolchain file:
 
 # This is a CMake Toolchain file, required for cross-compiling using
 # the Dignus cross-compilers on Windows, compiling for z/OS.

 # Tell CMAKE the target system name
 SET(CMAKE_SYSTEM_NAME IBM_ZOS)

 # Specify the cross-compilers
 SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)
 SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe)

I think CMAKE_[C|CXX]_COMPILER vars are supposed to contain

 SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)

 SET(CMAKE_CXX_LINK_EXECUTABLE plink.exe 
 \-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)
 SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
 \-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)
 

 BTW, Regina is a Rexx processor -- it's running a script called cc.rex. If I 
 invoke it directly:

 C:\SVN\Dignusc:\Program Files\Regina\regina.exe  cc.rex;dcc.exe   
 CMakeCCompilerId.c
 Error 3 running cc.rex;dcc.exe: Failure during initialization
 Error 3.1: Failure during initialization: Program was not found

 ...which is what I'd expect. But the semicolon is still the problem here...

 -Original Message-
 From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
 Bill Hoffman
 Sent: Monday, October 24, 2011 6:08 PM
 To: cmake@cmake.org
 Subject: Re: [CMake] CMake still broken post-2.8.1

 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 -GUnix 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
 --

 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
 --

 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




-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Eric Noulard
Sorry for previous unfinished e-mail.

2011/10/25 Phil Smith p...@voltage.com:
 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?

This is clearly a change of behavior but from my point of view it is a change
of unsupported and/or unexpected behaviour.


 It's not in the toolchain file:
 
 # This is a CMake Toolchain file, required for cross-compiling using
 # the Dignus cross-compilers on Windows, compiling for z/OS.

 # Tell CMAKE the target system name
 SET(CMAKE_SYSTEM_NAME IBM_ZOS)

 # Specify the cross-compilers
 SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)
 SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe)

I think CMAKE_[C|CXX]_COMPILER vars are supposed to contain
a command not command + list of args.
If I'm wrong please someone (Alex, Bill,...) just tell me.

Doesn't
SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)
SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe)
works for you?

If not I would say that you may either create a wrapper script which
make the triplet
a single command or may be you should:
SET(CMAKE_C_COMPILER   regina.exe)
SET(CMAKE_C_FLAGS cc.rex dcc.exe

 SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)

 SET(CMAKE_CXX_LINK_EXECUTABLE plink.exe 
 \-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)
 SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
 \-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)
 

 BTW, Regina is a Rexx processor -- it's running a script called cc.rex. If I 
 invoke it directly:

 C:\SVN\Dignusc:\Program Files\Regina\regina.exe  cc.rex;dcc.exe   
 CMakeCCompilerId.c
 Error 3 running cc.rex;dcc.exe: Failure during initialization
 Error 3.1: Failure during initialization: Program was not found

 ...which is what I'd expect. But the semicolon is still the problem here...


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Brad King

On 10/25/2011 5:00 AM, Eric Noulard wrote:

2011/10/25 Phil Smithp...@voltage.com:

# Specify the cross-compilers
SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)
SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe)


I think CMAKE_[C|CXX]_COMPILER vars are supposed to contain
a command not command + list of args.
If I'm wrong please someone (Alex, Bill,...) just tell me.


Correct.  Those variables always hold only the compiler name.
When they are built from environment variables like CC and CXX
we split the arguments out into a separate variable.  I think
the change in behavior came from this thread's change:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/27857
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd38eda9

Read my first message in that thread for an explanation.

-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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Phil Smith
OK, but it should then reject the extra parameters, since it used to work.

In any case, I've changed the toolchain file:

# This is a CMake Toolchain file, required for cross-compiling using
# the Dignus cross-compilers on Windows, compiling for z/OS.

# Tell CMAKE the target system name
SET(CMAKE_SYSTEM_NAME IBM_ZOS)

# Specify the cross-compilers
SET(CMAKE_C_COMPILER   regina)
SET(CMAKE_C_FLAGS cc.rex dcc.exe)

SET(CMAKE_CXX_COMPILER regina)
SET(CMAKE_CXX_FLAGS cc.rex dcc.exe)

SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)

SET(CMAKE_CXX_LINK_EXECUTABLE plink.exe 
\-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)
SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
\-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)

...and the behavior persists:
C:/Program Files/Regina/regina.exe  cc.rex;dcc.exe  CMakeCCompilerId.c

So it's not clear that that's a solution. I can't wrap the regina call because 
what will I wrap it in? BAT is criminally busted -- it eats equals signs. So 
later calls with -fwhatever=value will be broken.

If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
old toolchain file, but fails later with the new one, because it appears to 
call the compiler without the flags, and regina with no arguments produces 
Help and exits.

Why are the semicolons being inserted? If I wanted semicolons between the 
parameters, why wouldn't I just specify them?

Brad, your comment in the thread says:
Teach compiler identification to support values such as
  export CC='gcc -g -O2'
by separating the arguments on spaces.

Not sure what on spaces means, but again, it seems wrong to me that anything 
is messing with my option format.

...phsiii
-Original Message-
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Tuesday, October 25, 2011 9:14 AM
To: Phil Smith
Cc: Eric Noulard; cmake@cmake.org; Bill Hoffman; David Cole
Subject: Re: [CMake] CMake still broken post-2.8.1

On 10/25/2011 5:00 AM, Eric Noulard wrote:
 2011/10/25 Phil Smithp...@voltage.com:
 # Specify the cross-compilers
 SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)
 SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe)

 I think CMAKE_[C|CXX]_COMPILER vars are supposed to contain
 a command not command + list of args.
 If I'm wrong please someone (Alex, Bill,...) just tell me.

Correct.  Those variables always hold only the compiler name.
When they are built from environment variables like CC and CXX
we split the arguments out into a separate variable.  I think
the change in behavior came from this thread's change:

  http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/27857
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd38eda9

Read my first message in that thread for an explanation.

-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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread David Boesner
Hi,

I want to link a .so file with a executable.
how do I do that?

Regards

David
--

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

Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Alexander Neundorf
On Tuesday 25 October 2011, David Boesner wrote:
 Hi,
 
 I want to link a .so file with a executable.
 how do I do that?

Use target_link_libraries().
And maybe find_library() before, depending on where that library comes from.

Giving some more information and also using a suitable subject would make 
helping easier.

Alex
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Eric Noulard
2011/10/25 Phil Smith p...@voltage.com:
 OK, but it should then reject the extra parameters, since it used to work.

Difficult to warn about a usage you did not even dream of ?
Now that we know I agree there should be a warning
(if not a clean failure with explanation).


 In any case, I've changed the toolchain file:
 
 # This is a CMake Toolchain file, required for cross-compiling using
 # the Dignus cross-compilers on Windows, compiling for z/OS.

 # Tell CMAKE the target system name
 SET(CMAKE_SYSTEM_NAME IBM_ZOS)

Do you have a platform file for IBM_ZOS as well?

if not
what is the compiler ID found?
The C compiler identification is WhatsInHere

may be you could try for force compiler:
see
http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
and
cmake --help-module CMakeForceCompiler

[...]

 
 ...and the behavior persists:
 C:/Program Files/Regina/regina.exe  cc.rex;dcc.exe  CMakeCCompilerId.c

You did this in a clean build tree, right?


 So it's not clear that that's a solution. I can't wrap the regina call 
 because what will I wrap it in? BAT is criminally busted -- it eats equals 
 signs. So later calls with -fwhatever=value will be broken.

May be with a REXX script ?
Just a wild guess because I did only write 2 lines of REXX in my life
so I may be wrong about the REXX capability.

 If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
 old toolchain file, but fails later with the new one, because it appears to 
 call the compiler without the flags, and regina with no arguments 
 produces Help and exits.

Line 29 for which CMake version?
Do you mean this line:
STRING(REGEX REPLACE  + ; CMAKE_${lang}_COMPILER_ID_ARG1
${CMAKE_${lang}_COMPILER_ID_ARG1})



 Why are the semicolons being inserted? If I wanted semicolons between the 
 parameters, why wouldn't I just specify them?

 Brad, your comment in the thread says:
Teach compiler identification to support values such as
  export CC='gcc -g -O2'
by separating the arguments on spaces.

 Not sure what on spaces means, but again, it seems wrong to me that 
 anything is messing with my option format.

I think it means replace spaces with ; in order to get a proper list.

May be the compiler args handling is broken in the cross-compiling case?
Such kind of setup?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Phil Smith
Replying inline is getting unwieldy, so I've excerpted what I'm replying to 
here.

 Do you have a platform file for IBM_ZOS as well?
Yes, there's a platform file, IBM_ZOS.cmake:

INCLUDE(Platform/UnixPaths)

(exciting, huh?)

 what is the compiler ID found?
-- The C compiler identification is unknown

 may be you could try for force compiler:
I don't understand what that means. Well, maybe I partly do: it means skipping 
the compile-a-tiny-program. Since I don't understand why I care about that, I 
don't understand the rest. I inherited our use of CMake, hacked it into working 
three+ years ago, so maybe

You did this in a clean build tree, right?
Well, I whacked the CMakeCache.txt and the CMakeFiles directory.

 May be with a REXX script ?
I don't think I can wrap it in a Rexx script -- that's how we got here, eh? I 
did try this:

SET(CMAKE_C_COMPILER   cc.rex)
SET(CMAKE_C_FLAGS dcc.exe)

...since .rex is associated with Regina anyway. That got further, but it got to:
Check for working C compiler: C:/SVN/Dignus/cc.rex
...and that hung. It never called cc.rex in that case (I suspect this is why I 
was explicitly prefacing it with regina.exe -- it was a long time ago that I 
set this up!).

 Line 29 for which CMake version?
 Do you mean this line:
Yes, that's the line I meant.

 I think it means replace spaces with ; in order to get a proper list.
OK, but why are arguments to the compiler supposed to be separated with 
semicolons? That doesn't seem right. Is something later supposed to undo this?

-Original Message-
From: Eric Noulard [mailto:eric.noul...@gmail.com] 
Sent: Tuesday, October 25, 2011 12:40 PM
To: Phil Smith
Cc: Brad King; cmake@cmake.org; Bill Hoffman; David Cole; Janet Graff
Subject: Re: [CMake] CMake still broken post-2.8.1

2011/10/25 Phil Smith p...@voltage.com:
 OK, but it should then reject the extra parameters, since it used to work.

Difficult to warn about a usage you did not even dream of ?
Now that we know I agree there should be a warning
(if not a clean failure with explanation).


 In any case, I've changed the toolchain file:
 
 # This is a CMake Toolchain file, required for cross-compiling using
 # the Dignus cross-compilers on Windows, compiling for z/OS.

 # Tell CMAKE the target system name
 SET(CMAKE_SYSTEM_NAME IBM_ZOS)

Do you have a platform file for IBM_ZOS as well?

if not
what is the compiler ID found?
The C compiler identification is WhatsInHere

may be you could try for force compiler:
see
http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
and
cmake --help-module CMakeForceCompiler

[...]

 
 ...and the behavior persists:
 C:/Program Files/Regina/regina.exe  cc.rex;dcc.exe  CMakeCCompilerId.c

You did this in a clean build tree, right?


 So it's not clear that that's a solution. I can't wrap the regina call 
 because what will I wrap it in? BAT is criminally busted -- it eats equals 
 signs. So later calls with -fwhatever=value will be broken.

May be with a REXX script ?
Just a wild guess because I did only write 2 lines of REXX in my life
so I may be wrong about the REXX capability.

 If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
 old toolchain file, but fails later with the new one, because it appears to 
 call the compiler without the flags, and regina with no arguments 
 produces Help and exits.

Line 29 for which CMake version?
Do you mean this line:
STRING(REGEX REPLACE  + ; CMAKE_${lang}_COMPILER_ID_ARG1
${CMAKE_${lang}_COMPILER_ID_ARG1})



 Why are the semicolons being inserted? If I wanted semicolons between the 
 parameters, why wouldn't I just specify them?

 Brad, your comment in the thread says:
Teach compiler identification to support values such as
  export CC='gcc -g -O2'
by separating the arguments on spaces.

 Not sure what on spaces means, but again, it seems wrong to me that 
 anything is messing with my option format.

I think it means replace spaces with ; in order to get a proper list.

May be the compiler args handling is broken in the cross-compiling case?
Such kind of setup?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread David Cole
Is your project's source publicly available? And are these compilers freely
available, too?

It may be easier for us to help with a more complete picture of what's going
on...


On Tue, Oct 25, 2011 at 1:32 PM, Phil Smith p...@voltage.com wrote:

 Replying inline is getting unwieldy, so I've excerpted what I'm replying to
 here.

  Do you have a platform file for IBM_ZOS as well?
 Yes, there's a platform file, IBM_ZOS.cmake:

 INCLUDE(Platform/UnixPaths)

 (exciting, huh?)

  what is the compiler ID found?
 -- The C compiler identification is unknown

  may be you could try for force compiler:
 I don't understand what that means. Well, maybe I partly do: it means
 skipping the compile-a-tiny-program. Since I don't understand why I care
 about that, I don't understand the rest. I inherited our use of CMake,
 hacked it into working three+ years ago, so maybe

 You did this in a clean build tree, right?
 Well, I whacked the CMakeCache.txt and the CMakeFiles directory.

  May be with a REXX script ?
 I don't think I can wrap it in a Rexx script -- that's how we got here, eh?
 I did try this:

 SET(CMAKE_C_COMPILER   cc.rex)
 SET(CMAKE_C_FLAGS dcc.exe)

 ...since .rex is associated with Regina anyway. That got further, but it
 got to:
 Check for working C compiler: C:/SVN/Dignus/cc.rex
 ...and that hung. It never called cc.rex in that case (I suspect this is
 why I was explicitly prefacing it with regina.exe -- it was a long time ago
 that I set this up!).

  Line 29 for which CMake version?
  Do you mean this line:
 Yes, that's the line I meant.

  I think it means replace spaces with ; in order to get a proper list.
 OK, but why are arguments to the compiler supposed to be separated with
 semicolons? That doesn't seem right. Is something later supposed to undo
 this?

 -Original Message-
 From: Eric Noulard [mailto:eric.noul...@gmail.com]
 Sent: Tuesday, October 25, 2011 12:40 PM
 To: Phil Smith
 Cc: Brad King; cmake@cmake.org; Bill Hoffman; David Cole; Janet Graff
 Subject: Re: [CMake] CMake still broken post-2.8.1

 2011/10/25 Phil Smith p...@voltage.com:
  OK, but it should then reject the extra parameters, since it used to
 work.

 Difficult to warn about a usage you did not even dream of ?
 Now that we know I agree there should be a warning
 (if not a clean failure with explanation).

 
  In any case, I've changed the toolchain file:
  
  # This is a CMake Toolchain file, required for cross-compiling using
  # the Dignus cross-compilers on Windows, compiling for z/OS.
 
  # Tell CMAKE the target system name
  SET(CMAKE_SYSTEM_NAME IBM_ZOS)

 Do you have a platform file for IBM_ZOS as well?

 if not
 what is the compiler ID found?
 The C compiler identification is WhatsInHere

 may be you could try for force compiler:
 see
 http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
 and
 cmake --help-module CMakeForceCompiler

 [...]

  
  ...and the behavior persists:
  C:/Program Files/Regina/regina.exe  cc.rex;dcc.exe  CMakeCCompilerId.c

 You did this in a clean build tree, right?


  So it's not clear that that's a solution. I can't wrap the regina call
 because what will I wrap it in? BAT is criminally busted -- it eats equals
 signs. So later calls with -fwhatever=value will be broken.

 May be with a REXX script ?
 Just a wild guess because I did only write 2 lines of REXX in my life
 so I may be wrong about the REXX capability.

  If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with
 my old toolchain file, but fails later with the new one, because it appears
 to call the compiler without the flags, and regina with no arguments
 produces Help and exits.

 Line 29 for which CMake version?
 Do you mean this line:
 STRING(REGEX REPLACE  + ; CMAKE_${lang}_COMPILER_ID_ARG1
 ${CMAKE_${lang}_COMPILER_ID_ARG1})


 
  Why are the semicolons being inserted? If I wanted semicolons between the
 parameters, why wouldn't I just specify them?
 
  Brad, your comment in the thread says:
 Teach compiler identification to support values such as
   export CC='gcc -g -O2'
 by separating the arguments on spaces.
 
  Not sure what on spaces means, but again, it seems wrong to me that
 anything is messing with my option format.

 I think it means replace spaces with ; in order to get a proper list.

 May be the compiler args handling is broken in the cross-compiling case?
 Such kind of setup?

 --
 Erk
 Membre de l'April - « promouvoir et défendre le logiciel libre » -
 http://www.april.org

--

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

Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Phil Smith
No, alas. Code is proprietary and the compiler is licensed too.

From: David Cole [mailto:david.c...@kitware.com]
Sent: Tuesday, October 25, 2011 1:41 PM
To: Phil Smith
Cc: Eric Noulard; Brad King; cmake@cmake.org; Bill Hoffman; Janet Graff
Subject: Re: [CMake] CMake still broken post-2.8.1

Is your project's source publicly available? And are these compilers freely 
available, too?

It may be easier for us to help with a more complete picture of what's going 
on...

On Tue, Oct 25, 2011 at 1:32 PM, Phil Smith 
p...@voltage.commailto:p...@voltage.com wrote:
Replying inline is getting unwieldy, so I've excerpted what I'm replying to 
here.

 Do you have a platform file for IBM_ZOS as well?
Yes, there's a platform file, IBM_ZOS.cmake:

INCLUDE(Platform/UnixPaths)

(exciting, huh?)

 what is the compiler ID found?
-- The C compiler identification is unknown

 may be you could try for force compiler:
I don't understand what that means. Well, maybe I partly do: it means skipping 
the compile-a-tiny-program. Since I don't understand why I care about that, I 
don't understand the rest. I inherited our use of CMake, hacked it into working 
three+ years ago, so maybe

You did this in a clean build tree, right?
Well, I whacked the CMakeCache.txt and the CMakeFiles directory.

 May be with a REXX script ?
I don't think I can wrap it in a Rexx script -- that's how we got here, eh? I 
did try this:

SET(CMAKE_C_COMPILER   cc.rex)
SET(CMAKE_C_FLAGS dcc.exe)

...since .rex is associated with Regina anyway. That got further, but it got to:
Check for working C compiler: C:/SVN/Dignus/cc.rex
...and that hung. It never called cc.rex in that case (I suspect this is why I 
was explicitly prefacing it with regina.exe -- it was a long time ago that I 
set this up!).

 Line 29 for which CMake version?
 Do you mean this line:
Yes, that's the line I meant.

 I think it means replace spaces with ; in order to get a proper list.
OK, but why are arguments to the compiler supposed to be separated with 
semicolons? That doesn't seem right. Is something later supposed to undo this?

-Original Message-
From: Eric Noulard 
[mailto:eric.noul...@gmail.commailto:eric.noul...@gmail.com]
Sent: Tuesday, October 25, 2011 12:40 PM
To: Phil Smith
Cc: Brad King; cmake@cmake.orgmailto:cmake@cmake.org; Bill Hoffman; David 
Cole; Janet Graff
Subject: Re: [CMake] CMake still broken post-2.8.1
2011/10/25 Phil Smith p...@voltage.commailto:p...@voltage.com:
 OK, but it should then reject the extra parameters, since it used to work.

Difficult to warn about a usage you did not even dream of ?
Now that we know I agree there should be a warning
(if not a clean failure with explanation).


 In any case, I've changed the toolchain file:
 
 # This is a CMake Toolchain file, required for cross-compiling using
 # the Dignus cross-compilers on Windows, compiling for z/OS.

 # Tell CMAKE the target system name
 SET(CMAKE_SYSTEM_NAME IBM_ZOS)

Do you have a platform file for IBM_ZOS as well?

if not
what is the compiler ID found?
The C compiler identification is WhatsInHere

may be you could try for force compiler:
see
http://www.cmake.org/Wiki/CMake_Cross_Compiling#The_toolchain_file
and
cmake --help-module CMakeForceCompiler

[...]

 
 ...and the behavior persists:
 C:/Program Files/Regina/regina.exe  cc.rex;dcc.exe  CMakeCCompilerId.c

You did this in a clean build tree, right?


 So it's not clear that that's a solution. I can't wrap the regina call 
 because what will I wrap it in? BAT is criminally busted -- it eats equals 
 signs. So later calls with -fwhatever=value will be broken.

May be with a REXX script ?
Just a wild guess because I did only write 2 lines of REXX in my life
so I may be wrong about the REXX capability.

 If I comment out line 29 in CMakeDetermineCompilerId.cmake, it works with my 
 old toolchain file, but fails later with the new one, because it appears to 
 call the compiler without the flags, and regina with no arguments 
 produces Help and exits.

Line 29 for which CMake version?
Do you mean this line:
STRING(REGEX REPLACE  + ; CMAKE_${lang}_COMPILER_ID_ARG1
${CMAKE_${lang}_COMPILER_ID_ARG1})



 Why are the semicolons being inserted? If I wanted semicolons between the 
 parameters, why wouldn't I just specify them?

 Brad, your comment in the thread says:
Teach compiler identification to support values such as
  export CC='gcc -g -O2'
by separating the arguments on spaces.

 Not sure what on spaces means, but again, it seems wrong to me that 
 anything is messing with my option format.

I think it means replace spaces with ; in order to get a proper list.

May be the compiler args handling is broken in the cross-compiling case?
Such kind of setup?

--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org

--

Powered by www.kitware.com

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

Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Alexander Neundorf
On Tuesday 25 October 2011, Phil Smith wrote:
 No, alas. Code is proprietary and the compiler is licensed too.

I think Phil asked here on the list like one year ago or so.
So, there are some things to be found in the archive.
Was this EBDIC stuff ?

Alex
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-25 Thread Phil Smith
Yes, it's partly EBCDIC, but I don't think that's actually an issue here. The 
compiler allows compiling both in ASCII (so constants are ASCII) and native 
(EBCDIC); we do some of both.

Good memory, btw!
-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Tuesday, October 25, 2011 2:03 PM
To: cmake@cmake.org
Cc: Phil Smith; David Cole; Janet Graff; Brad King; Bill Hoffman
Subject: Re: [CMake] CMake still broken post-2.8.1

On Tuesday 25 October 2011, Phil Smith wrote:
 No, alas. Code is proprietary and the compiler is licensed too.

I think Phil asked here on the list like one year ago or so.
So, there are some things to be found in the archive.
Was this EBDIC stuff ?

Alex
--

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


[CMake] CMake still broken post-2.8.1

2011-10-24 Thread Phil Smith
A while ago, when 2.8.2 came out, I installed it and found that it hung 
processing our CMakeLists.txt. There doesn't seem to be any debugging ability 
in the code, so we went back to 2.8.1. Today I decided to try the latest  
greatest (2.8.6): same result. This seems...bad.

It works fine with 2.8.1; with 2.8.2 and later, it hangs before it even says:
-- The C compiler identification is unknown

With some brutally crude MESSAGE statements, I've determined that it hangs in 
CMakeDetermineCCompiler.cmake, on the line:
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)

But I don't know what that line is doing (I mean, I can guess, but it looks 
like it's going into some primitive and never coming back).

I don't have Windows debugging tools (or skills). Suggestions?
--
...phsiii

Phil Smith III
p...@voltage.commailto:p...@voltage.com
Voltage Security, Inc.
www.voltage.comhttp://www.voltage.com

--

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

Re: [CMake] CMake still broken post-2.8.1

2011-10-24 Thread David Cole
Run cmake --trace and redirect the voluminous output to a file.

Inspect it for what's unusual and report back with that.

Or, if the file is not too large (I think 40k is our mailing list limit),
just send the whole thing along with a reply.

If it is really large, and you want us to look at it, you can try sending
the whole thing directly to me via email, or post it somewhere online where
everybody can look at it.


HTH,
David


On Mon, Oct 24, 2011 at 4:29 PM, Phil Smith p...@voltage.com wrote:

 A while ago, when 2.8.2 came out, I installed it and found that it hung
 processing our CMakeLists.txt. There doesn’t seem to be any debugging
 ability in the code, so we went back to 2.8.1. Today I decided to try the
 latest  greatest (2.8.6): same result. This seems…bad.

 ** **

 It works fine with 2.8.1; with 2.8.2 and later, it hangs before it even
 says:

 -- The C compiler identification is unknown

 ** **

 With some brutally crude MESSAGE statements, I’ve determined that it hangs
 in CMakeDetermineCCompiler.cmake, on the line:

 CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)

 ** **

 But I don’t know what that line is doing (I mean, I can guess, but it looks
 like it’s going into some primitive and never coming back).

 ** **

 I don’t have Windows debugging tools (or skills). Suggestions?

 --

 …phsiii

 ** **

 Phil Smith III

 p...@voltage.com

 Voltage Security, Inc.

 www.voltage.com

 ** **

 --

 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

--

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

Re: [CMake] CMake still broken post-2.8.1

2011-10-24 Thread Phil Smith
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 -GUnix Makefiles .\

Hope this makes some sense...

From: David Cole [mailto:david.c...@kitware.com]
Sent: Monday, October 24, 2011 5:04 PM
To: Phil Smith
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake still broken post-2.8.1

Run cmake --trace and redirect the voluminous output to a file.

Inspect it for what's unusual and report back with that.

Or, if the file is not too large (I think 40k is our mailing list limit), just 
send the whole thing along with a reply.

If it is really large, and you want us to look at it, you can try sending the 
whole thing directly to me via email, or post it somewhere online where 
everybody can look at it.


HTH,
David

On Mon, Oct 24, 2011 at 4:29 PM, Phil Smith 
p...@voltage.commailto:p...@voltage.com wrote:
A while ago, when 2.8.2 came out, I installed it and found that it hung 
processing our CMakeLists.txt. There doesn't seem to be any debugging ability 
in the code, so we went back to 2.8.1. Today I decided to try the latest  
greatest (2.8.6): same result. This seems...bad.

It works fine with 2.8.1; with 2.8.2 and later, it hangs before it even says:
-- The C compiler identification is unknown

With some brutally crude MESSAGE statements, I've determined that it hangs in 
CMakeDetermineCCompiler.cmake, on the line:
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)

But I don't know what that line is doing (I mean, I can guess, but it looks 
like it's going into some primitive and never coming back).

I don't have Windows debugging tools (or skills). Suggestions?
--
...phsiii

Phil Smith III
p...@voltage.commailto:p...@voltage.com
Voltage Security, Inc.
www.voltage.comhttp://www.voltage.com


--

Powered by www.kitware.comhttp://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

C:\SVN\zFPE\SimpleAPI\vtk-coreztool cmake
Build is normal
===
|||
|||
|||
===
ztool starting at Mon 10/24/2011 17:38:36.59

** 'CMake' phase started at Mon 10/24/2011 17:38:36.67 **
Running with trace output on.
C:/SVN/zFPE/SimpleAPI/vtk-core/CMakeLists.txt(7):  
cmake_minimum_required(VERSION 2.6 FATAL_ERROR )
C:/SVN/zFPE/SimpleAPI/vtk-core/CMakeLists.txt(11):  if(NOT DEFINED VSINIT )
C:/SVN/zFPE/SimpleAPI/vtk-core/CMakeLists.txt(12):  project(vtk-core C )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeUnixFindMake.cmake(15):  
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeUnixFindMake.cmake(16):  
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(45):  IF(CMAKE_HOST_UNIX 
)
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(74):  
IF(CMAKE_HOST_WIN32 )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(75):  
SET(CMAKE_HOST_SYSTEM_NAME Windows )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(76):  
SET(CMAKE_HOST_SYSTEM_PROCESSOR $ENV{PROCESSOR_ARCHITECTURE} )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(84):  
IF(CMAKE_TOOLCHAIN_FILE )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(86):  
INCLUDE(${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE} OPTIONAL RESULT_VA
RIABLE _INCLUDED_TOOLCHAIN_FILE )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(87):  IF(NOT 
_INCLUDED_TOOLCHAIN_FILE )
C:/Program Files (x86)/CMake 
2.8/share/cmake-2.8/Modules/CMakeDetermineSystem.cmake(89):  
INCLUDE(${CMAKE_TOOLCHAIN_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_TOO
LCHAIN_FILE )
c:/SVN/Dignus/zosport.cmake(5):  SET(CMAKE_SYSTEM_NAME IBM_ZOS )
c:/SVN/Dignus/zosport.cmake(8):  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 )
c:/SVN/Dignus/zosport.cmake(11):  SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv 
TARGET OBJECTS )
c:/SVN/Dignus/zosport.cmake(13):  SET(CMAKE_CXX_LINK_EXECUTABLE plink.exe 
\-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET )
c:/SVN/Dignus/zosport.cmake(14):  SET

Re: [CMake] CMake still broken post-2.8.1

2011-10-24 Thread Bill Hoffman

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 -GUnix 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
--

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


Re: [CMake] CMake still broken post-2.8.1

2011-10-24 Thread Phil Smith
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:

# This is a CMake Toolchain file, required for cross-compiling using
# the Dignus cross-compilers on Windows, compiling for z/OS.

# Tell CMAKE the target system name
SET(CMAKE_SYSTEM_NAME IBM_ZOS)

# Specify the cross-compilers
SET(CMAKE_C_COMPILER   regina.exe cc.rex dcc.exe)
SET(CMAKE_CXX_COMPILER regina.exe cc.rex dcxx.exe)

SET(CMAKE_C_CREATE_STATIC_LIBRARY DAR -rv TARGET OBJECTS)

SET(CMAKE_CXX_LINK_EXECUTABLE plink.exe 
\-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)
SET(CMAKE_C_LINK_EXECUTABLE   plink.exe 
\-S$ENV{DIGNUS_PROGRAM}/objs_norent/M\ OBJECTS -o TARGET)


BTW, Regina is a Rexx processor -- it's running a script called cc.rex. If I 
invoke it directly:

C:\SVN\Dignusc:\Program Files\Regina\regina.exe  cc.rex;dcc.exe   
CMakeCCompilerId.c
Error 3 running cc.rex;dcc.exe: Failure during initialization
Error 3.1: Failure during initialization: Program was not found

...which is what I'd expect. But the semicolon is still the problem here...

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Bill Hoffman
Sent: Monday, October 24, 2011 6:08 PM
To: cmake@cmake.org
Subject: Re: [CMake] CMake still broken post-2.8.1

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 -GUnix 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
--

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
--

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