Re: [CMake] Cmake 2.8.4 and gcc 4.6 on OSX

2011-05-06 Thread Sean McBride
On Fri, 6 May 2011 10:51:57 -0400, Michael Allen said:

I've installed a newer version of gcc because the version supplied by
Apple is so far out of date, but I don't know how to configure cmake
such that it uses the normal gcc flags instead of the
Apple specific flags. Is there a way to configure cmake to use the
appropriate flags even though I'm not using the normal compiler?

IMHO, a Mac compiler that does not recognise -arch is pretty broken. 
Where did you get it?  I think if you use macports or fink you can get a
newer gcc that recognises the normal/typical flags.  Another option is
to use clang, which comes with recent versions of Xcode.

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


___
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 2.8.4 and gcc 4.6 on OSX

2011-05-06 Thread Michael Allen
I got it from here:
http://hpc.sourceforge.net/

But that's just a pre-compiled version. If you compile gcc4.x yourself
on your mac you'll see that it behaves the same way.
I'm not trying to use any part of the Apple toolchain, so it makes
perfect sense to me.


On Fri, May 6, 2011 at 11:04 AM, Sean McBride s...@rogue-research.com wrote:
 On Fri, 6 May 2011 10:51:57 -0400, Michael Allen said:

I've installed a newer version of gcc because the version supplied by
Apple is so far out of date, but I don't know how to configure cmake
such that it uses the normal gcc flags instead of the
Apple specific flags. Is there a way to configure cmake to use the
appropriate flags even though I'm not using the normal compiler?

 IMHO, a Mac compiler that does not recognise -arch is pretty broken.
 Where did you get it?  I think if you use macports or fink you can get a
 newer gcc that recognises the normal/typical flags.  Another option is
 to use clang, which comes with recent versions of Xcode.

 --
 
 Sean McBride, B. Eng                 s...@rogue-research.com
 Rogue Research                        www.rogue-research.com
 Mac Software Developer              Montréal, Québec, Canada



___
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 2.8.4 and gcc 4.6 on OSX

2011-05-06 Thread j s
Macports works, but be warned that if you use rtti, (exceptions,
dynamic casting), make sure that you only link against C++ libraries
using the same compiler.  Macports errantly uses its own system
libraries in its compiler's.

Juan

On Fri, May 6, 2011 at 10:04 AM, Sean McBride s...@rogue-research.com wrote:
 On Fri, 6 May 2011 10:51:57 -0400, Michael Allen said:

I've installed a newer version of gcc because the version supplied by
Apple is so far out of date, but I don't know how to configure cmake
such that it uses the normal gcc flags instead of the
Apple specific flags. Is there a way to configure cmake to use the
appropriate flags even though I'm not using the normal compiler?

 IMHO, a Mac compiler that does not recognise -arch is pretty broken.
 Where did you get it?  I think if you use macports or fink you can get a
 newer gcc that recognises the normal/typical flags.  Another option is
 to use clang, which comes with recent versions of Xcode.

 --
 
 Sean McBride, B. Eng                 s...@rogue-research.com
 Rogue Research                        www.rogue-research.com
 Mac Software Developer              Montréal, Québec, Canada


 ___
 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 2.8.4 and gcc 4.6 on OSX

2011-05-06 Thread j s
I'm really sorry I answered this question.  I personally hate
macports, but it has its own version of cmake that won't work with the apple
compiler:

/opt/local/bin/cmake -DCMAKE_CXX_COMPILER=/opt/local/bin/g++
-DCMAKE_C_COMPILER=/opt/local/bin/gcc ..

make VERBOSE=1

/opt/local/bin/g++-Wl,-search_paths_first
-headerpad_max_install_names  CMakeFiles/test.dir/test.cc.o  -o test

Regards,

Juan

On Fri, May 6, 2011 at 11:34 AM, Michael Allen jmal...@gmail.com wrote:
 What do you mean by Macports works?

 The macports gcc compiler works with a hand-compiled cmake? Does it
 accept the apple-specific compile flags?
 or do you mean that the macports cmake will work with a self-compiled gcc?
 or do you mean that the macports cmake will work with the macports gcc?

 What specific setup are you suggesting that I use to get a gcc 4.5+
 working with cmake on osx? I'm flexible here but I need to know
 exactly which setup works.

 Also, is there really no way to tell cmake that I'm not using Apple's
 compiler? It's clearly capable of doing the right thing on linux. I
 just want to tell it to use the non-apple flags.

 That would be the easiest since I really dislike macports. There
 seriously needs to be a way to do this if there isn't. There are
 plenty of people out there who work on macs that only want to use the
 posix stuff. I feel like I even tried using macports cmake and gcc and
 it didn't work actually.


 On Fri, May 6, 2011 at 12:10 PM, j s j.s4...@gmail.com wrote:
 Macports works, but be warned that if you use rtti, (exceptions,
 dynamic casting), make sure that you only link against C++ libraries
 using the same compiler.  Macports errantly uses its own system
 libraries in its compiler's.

 Juan

 On Fri, May 6, 2011 at 10:04 AM, Sean McBride s...@rogue-research.com 
 wrote:
 On Fri, 6 May 2011 10:51:57 -0400, Michael Allen said:

I've installed a newer version of gcc because the version supplied by
Apple is so far out of date, but I don't know how to configure cmake
such that it uses the normal gcc flags instead of the
Apple specific flags. Is there a way to configure cmake to use the
appropriate flags even though I'm not using the normal compiler?

 IMHO, a Mac compiler that does not recognise -arch is pretty broken.
 Where did you get it?  I think if you use macports or fink you can get a
 newer gcc that recognises the normal/typical flags.  Another option is
 to use clang, which comes with recent versions of Xcode.

 --
 
 Sean McBride, B. Eng                 s...@rogue-research.com
 Rogue Research                        www.rogue-research.com
 Mac Software Developer              Montréal, Québec, Canada


 ___
 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 2.8.4 and gcc 4.6 on OSX

2011-05-06 Thread Michael Allen
Ok so you're basically saying that I can just tell cmake that I want
to use a different compiler then, I think that would actually work
with my current compiler and cmake...


On Fri, May 6, 2011 at 12:58 PM, j s j.s4...@gmail.com wrote:
 I'm really sorry I answered this question.  I personally hate
 macports, but it has its own version of cmake that won't work with the apple
 compiler:

 /opt/local/bin/cmake -Dct=/opt/local/bin/g++
 -DCMAKE_C_COMPILER=/opt/local/bin/gcc ..

 make VERBOSE=1

 /opt/local/bin/g++    -Wl,-search_paths_first
 -headerpad_max_install_names  CMakeFiles/test.dir/test.cc.o  -o test

 Regards,

 Juan

 On Fri, May 6, 2011 at 11:34 AM, Michael Allen jmal...@gmail.com wrote:
 What do you mean by Macports works?

 The macports gcc compiler works with a hand-compiled cmake? Does it
 accept the apple-specific compile flags?
 or do you mean that the macports cmake will work with a self-compiled gcc?
 or do you mean that the macports cmake will work with the macports gcc?

 What specific setup are you suggesting that I use to get a gcc 4.5+
 working with cmake on osx? I'm flexible here but I need to know
 exactly which setup works.

 Also, is there really no way to tell cmake that I'm not using Apple's
 compiler? It's clearly capable of doing the right thing on linux. I
 just want to tell it to use the non-apple flags.

 That would be the easiest since I really dislike macports. There
 seriously needs to be a way to do this if there isn't. There are
 plenty of people out there who work on macs that only want to use the
 posix stuff. I feel like I even tried using macports cmake and gcc and
 it didn't work actually.


 On Fri, May 6, 2011 at 12:10 PM, j s j.s4...@gmail.com wrote:
 Macports works, but be warned that if you use rtti, (exceptions,
 dynamic casting), make sure that you only link against C++ libraries
 using the same compiler.  Macports errantly uses its own system
 libraries in its compiler's.

 Juan

 On Fri, May 6, 2011 at 10:04 AM, Sean McBride s...@rogue-research.com 
 wrote:
 On Fri, 6 May 2011 10:51:57 -0400, Michael Allen said:

I've installed a newer version of gcc because the version supplied by
Apple is so far out of date, but I don't know how to configure cmake
such that it uses the normal gcc flags instead of the
Apple specific flags. Is there a way to configure cmake to use the
appropriate flags even though I'm not using the normal compiler?

 IMHO, a Mac compiler that does not recognise -arch is pretty broken.
 Where did you get it?  I think if you use macports or fink you can get a
 newer gcc that recognises the normal/typical flags.  Another option is
 to use clang, which comes with recent versions of Xcode.

 --
 
 Sean McBride, B. Eng                 s...@rogue-research.com
 Rogue Research                        www.rogue-research.com
 Mac Software Developer              Montréal, Québec, Canada


 ___
 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