Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-09 Thread Bill Hoffman

Brandon Van Every wrote:

On 8/8/07, Alan W. Irwin [EMAIL PROTECTED] wrote:
  

On 2007-08-08 21:52-0400 Bill Hoffman wrote:



one of the c files includes a c++ file that is why I need to compile my c
files with g++ and not gcc. One of the solution would be to rename my c
file cpp or cxx
thanks,
Marie



You can also set the language for that .c file to CXX.
set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)
  

Bill, the LANGUAGE property for set_source_files_properties is not
documented.  Please fix!



I filed bug #5393 a little over 2 weeks ago.  We first raised this
issue on the mailing list 6 weeks before that.  Asking to have it
fixed doesn't do any good.  I've filed lots of Content bugs over the
past year, now called text bugs.  Some are trivial to fix, others
would take elbow grease to deal with.  Almost none have been dealt
with.  We need a better way for the community to handle this, because
Kitware isn't going to deal with most of them.  We've had threads
about documentation infrastructure in the past 2 months.  People have
floated some ideas but nobody, including myself, has stepped up to the
plate.

I've raised the priority on this bug to high because it keeps coming
up over and over again.
  
To fix this I have to move the fix onto the branch.   The web pages for 
the online-docs are
automatically generated from the branch.   I will get to it.  But, when 
something is fixed
in CVS, I sort of consider it fixed.  This particular problem has come 
up several times,

and I will address it soon


-Bill



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-09 Thread Alexander Neundorf
On Thursday 09 August 2007 14:14, Brandon Van Every wrote:
 On 8/8/07, Alan W. Irwin [EMAIL PROTECTED] wrote:
  On 2007-08-08 21:52-0400 Bill Hoffman wrote:
   one of the c files includes a c++ file that is why I need to compile
   my c files with g++ and not gcc. One of the solution would be to
   rename my c file cpp or cxx
   thanks,
   Marie
  
   You can also set the language for that .c file to CXX.
   set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)
 
  Bill, the LANGUAGE property for set_source_files_properties is not
  documented.  Please fix!

 I filed bug #5393 a little over 2 weeks ago.  We first raised this
 issue on the mailing list 6 weeks before that.  Asking to have it
 fixed doesn't do any good.  I've filed lots of Content bugs over the
 past year, now called text bugs.  Some are trivial to fix, others
 would take elbow grease to deal with.  Almost none have been dealt
 with.  We need a better way for the community to handle this, because
 Kitware isn't going to deal with most of them.  

That's not completely true, some issues were fixed but simply the bugs were 
not closed.
If you have an improvement for the documentation, it also helps if you create 
a patch.

Alex
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-09 Thread Brandon Van Every
On 8/9/07, Bill Hoffman [EMAIL PROTECTED] wrote:
 But, when something is fixed in CVS, I sort of consider it fixed.

Closing the bugs in the bug tracker when they get fixed might help
communication.  For instance, I just closed #3776 CMake -E mkdir.
Kudos to whomever fixed it, but the bug was not closed.

Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-09 Thread Brandon Van Every
On 8/9/07, Alexander Neundorf [EMAIL PROTECTED] wrote:
 On Thursday 09 August 2007 14:14, Brandon Van Every wrote:
  On 8/8/07, Alan W. Irwin [EMAIL PROTECTED] wrote:
   On 2007-08-08 21:52-0400 Bill Hoffman wrote:
one of the c files includes a c++ file that is why I need to compile
my c files with g++ and not gcc. One of the solution would be to
rename my c file cpp or cxx
thanks,
Marie
   
You can also set the language for that .c file to CXX.
set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)
  
   Bill, the LANGUAGE property for set_source_files_properties is not
   documented.  Please fix!
 
  I filed bug #5393 a little over 2 weeks ago.  We first raised this
  issue on the mailing list 6 weeks before that.  Asking to have it
  fixed doesn't do any good.  I've filed lots of Content bugs over the
  past year, now called text bugs.  Some are trivial to fix, others
  would take elbow grease to deal with.  Almost none have been dealt
  with.  We need a better way for the community to handle this, because
  Kitware isn't going to deal with most of them.

 That's not completely true, some issues were fixed but simply the bugs were
 not closed.

I'll go back over the CVS version of cmake.html later today and see
what text bugs are still there.

 If you have an improvement for the documentation, it also helps if you create
 a patch.

I will try that for the trivial text bugs.  The elbow grease text
bugs need more infrastructure than that.


Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-09 Thread Alan W. Irwin

On 2007-08-09 14:28-0400 Bill Hoffman wrote:


To fix this (documentation bugs fixed in cvs HEAD but not in CVS branch)
I have to move the fix onto the branch.   The web pages for the 
online-docs are
automatically generated from the branch.   I will get to it.  But, when 
something is fixed
in CVS, I sort of consider it fixed.  This particular problem has come up 
several times,

and I will address it soon


I am glad you are going to revamp how you treat documentation fixes.

For my own software projects I have an informal rule that small no-brainer
changes should be done immediately (or at least the first chance I have to
get at the computer) without bothering with bug triage.  The point here is
there is a substantial cost to bug triage. For example, one cost is some
people participating in software projects have a tendency to use the bug
triage process as an excuse not to actually make a decision.  There are
additional costs to bug triage as well since somebody has to make all
those decisions about bug category, status changes, etc., etc.  If the triage
cost is higher than the cost of fixing the bug, then in my view the triage
process should be bypassed.

Thus, from my perspective, putting documentation fixes on the bug tracker is
way overkill.  Instead, I suggest you designate some CMake developer who is
a good detail person to be responsible for watching list traffic for
suggested documentation fixes from your users. If the suggested fixes are
no-brainers (which most of them are), then all that designated person has to
do is spend a few minutes putting the doc fix into CVS HEAD and release
branch and state that fix has been made on list. Of course, that person
could also watch the bug tracker for documentation suggestions, but as it
became known there was always quick response on the list to documentation
suggestions, then the bug tracker and the associated decision making process
would be clogged less and less with these minor, no-brainer issues.

My $0.02 Canadian.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread David Cole
Try moving the quotes like this:
cmake .. -DCMAKE_CXX_COMPILER:string=g++ ...

On 8/8/07, Marie-Christine Vallet [EMAIL PROTECTED] wrote:

 Hi,
 I would like to use g++ as my c compiler (which works) but cmake does
 not let me do that. Is this normal?
 Thanks again,
 Marie



 cmake -DCMAKE_Fortran_COMPILER:string=g77
 -DCMAKE_CXX_COMPILER:string=g++ -DCMAKE_C_COMPILER:string=g++



 -- Check for working CXX compiler: g++
 -- Check for working CXX compiler: g++ -- works
 -- Check for working C compiler: g++
 -- Check for working C compiler: g++ -- broken
 CMake Error: The C compiler g++ is not able to compile a simple test
 program.
 It fails with the following output:
 /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
 CMakeFiles/cmTryCompileExec.dir/build
 gmake[1]: Entering directory
 `/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp'
 /usr/bin/cmake -E cmake_progress_report
 /home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp/CMakeFiles 1
 Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
 /usr/bin/g++   -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o   -c
 /home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp/testCCompiler.c

 /home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp/testCCompiler.c:2:3:
 error: #error The CMAKE_C_COMPILER is set to a C++ compiler
 gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1
 gmake[1]: Leaving directory
 `/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp'
 gmake: *** [cmTryCompileExec/fast] Error 2


 CMake will not be able to correctly generate this project.
 -- Configuring done

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Bill Hoffman

Marie-Christine Vallet wrote:

Hi,
I would like to use g++ as my c compiler (which works) but cmake does 
not let me do that. Is this normal?

Thanks again,
Marie 
I suspect you want to look at LINKER_LANGUAGE.  You really don't want to 
use g++ for a c compiler.

What are you trying to do?

-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Alexander Neundorf
On Wednesday 08 August 2007 15:04, Marie-Christine Vallet wrote:
 Hi,
 I would like to use g++ as my c compiler (which works) but cmake does
 not let me do that. Is this normal?

Yes.
This file is used for testing:

#ifndef __cplusplus
# error The CMAKE_CXX_COMPILER is set to a C compiler
#endif
int main(){return 0;}
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Marie-Christine Vallet

Bill Hoffman wrote:
 Marie-Christine Vallet wrote:
 Hi,
 I would like to use g++ as my c compiler (which works) but cmake does
 not let me do that. Is this normal?
 Thanks again,
 Marie
 I suspect you want to look at LINKER_LANGUAGE.  You really don't want
 to use g++ for a c compiler.
 What are you trying to do?

 -Bill


one of the c files includes a c++ file that is why I need to compile my
c files with g++ and not gcc. One of the solution would be to rename my
c file cpp or cxx
thanks,
Marie

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Brandon Van Every
On 8/8/07, Marie-Christine Vallet [EMAIL PROTECTED] wrote:
 Hi,
 I would like to use g++ as my c compiler (which works) but cmake does
 not let me do that. Is this normal?

Dunno.  But the preferred interface nowadays is to set the LANGUAGE
and LINKER_LANGUAGE properties of a file.  LINKER_LANGUAGE is
documented; LANGUAGE was overlooked as per bug #5393.

Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Bill Hoffman

Marie-Christine Vallet wrote:

Bill Hoffman wrote:

Marie-Christine Vallet wrote:

Hi,
I would like to use g++ as my c compiler (which works) but cmake 
does not let me do that. Is this normal?

Thanks again,
Marie 
I suspect you want to look at LINKER_LANGUAGE.  You really don't want 
to use g++ for a c compiler.

What are you trying to do?

-Bill


one of the c files includes a c++ file that is why I need to compile 
my c files with g++ and not gcc. One of the solution would be to 
rename my c file cpp or cxx

thanks,
Marie


You can also set the language for that .c file to CXX.
set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)

-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Alan W. Irwin

On 2007-08-08 21:52-0400 Bill Hoffman wrote:

one of the c files includes a c++ file that is why I need to compile my c 
files with g++ and not gcc. One of the solution would be to rename my c 
file cpp or cxx

thanks,
Marie


You can also set the language for that .c file to CXX.
set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)


Bill, the LANGUAGE property for set_source_files_properties is not
documented.  Please fix!

However, I am very glad that you mentioned this PROPERTY is recognized by
CMake since it should work to solve an Ada language support issue that has
just arisen.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


RE: [CMake] -DCMAKE_C_COMPILER:string=g++

2007-08-08 Thread Sanchez, Juan
Note that many C/C++ compilers rely on the file extension to determine whether 
it should be processed using C or C++.

I tested this a file with a simple function and with the following extensions 
on linux 32 bit and looked at the symbols using nm.

For gcc -c
.c  unmangled
.C  mangled 
.cc mangled

For g++ -c
.c mangled
.C mangled
.cc mangled

I don't have the intel compiler handy, but I think I remember it uses the same 
binary for C and C++ compilation and relies very much on the file extension.

Regards,

Juan










-Original Message-
From: [EMAIL PROTECTED] on behalf of Bill Hoffman
Sent: Wed 8/8/2007 8:52 PM
To: Marie-Christine Vallet; cmake
Subject: Re: [CMake] -DCMAKE_C_COMPILER:string=g++
 
Marie-Christine Vallet wrote:
 Bill Hoffman wrote:
 Marie-Christine Vallet wrote:
 Hi,
 I would like to use g++ as my c compiler (which works) but cmake 
 does not let me do that. Is this normal?
 Thanks again,
 Marie 
 I suspect you want to look at LINKER_LANGUAGE.  You really don't want 
 to use g++ for a c compiler.
 What are you trying to do?

 -Bill


 one of the c files includes a c++ file that is why I need to compile 
 my c files with g++ and not gcc. One of the solution would be to 
 rename my c file cpp or cxx
 thanks,
 Marie

You can also set the language for that .c file to CXX.
set_source_file_properties(foo.c PROPERTIES LANGUAGE CXX)

-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake