Re: [CMake] Where to change default link line on Cmake

2010-05-06 Thread Rene Salmon
True. Thanks! Rene On 5/6/10 7:09 AM, "Marcel Loose" wrote: > Hi Rene, > > -- 8< 8< 8< 8< 8< 8< 8< -- > >> On the other hand we always want to use or default to XLC or XLF on an > IBM >> Power machine and not gcc or gfrotran so I can see our users seeing > hav

Re: [CMake] Where to change default link line on Cmake

2010-05-06 Thread Marcel Loose
Hi Rene, -- 8< 8< 8< 8< 8< 8< 8< -- > On the other hand we always want to use or default to XLC or XLF on an IBM > Power machine and not gcc or gfrotran so I can see our users seeing having > to set CC, CXX etc every time as a bit of a pain. Sure they can just put >

Re: [CMake] Where to change default link line on Cmake

2010-05-05 Thread Brad King
Rene Salmon wrote: > The above seems to somewhat work with ccmake as I can do a configure and > then a generate. I guess it does not work with cmake. How do I pick > compilers using the CMakeLists.txt file rather than setting environment > variables. FYI, CMake is designed to let users choose thei

Re: [CMake] Where to change default link line on Cmake

2010-05-05 Thread Rene Salmon
> > No, no way to hint, they can specify that on the command line. > > cmake -DCMAKE_CXX_COMPILER=CC > > The environment vars do not be around during the build, only the first > time that you run cmake. > > So, you can do this: > CXX=CC cmake ../source Ok Thanks. Rene __

Re: [CMake] Where to change default link line on Cmake

2010-05-05 Thread Bill Hoffman
On 5/5/2010 9:19 AM, Rene Salmon wrote: Excellent point. I thought about that right after I hit send to my email. The whole reason we are looking at Cmake is so that we give our users more flexibility for building our software and not the other way around. I will remove those lines from the Cm

Re: [CMake] Where to change default link line on Cmake

2010-05-05 Thread Rene Salmon
Hi, > CMake was not really designed to do that. The idea of a cross platform > build system is that it should not force a compiler choice from the > build files. CMake has an order of picking compilers, if there is more > than one on the system, it is going to pick the wrong one some of the >

Re: [CMake] Where to change default link line on Cmake

2010-05-05 Thread Bill Hoffman
On 5/4/2010 6:26 PM, Rene Salmon wrote: Set environment variables to choose your compiler: $ rm -rf build $ mkdir build $ cd build $ export CC=xlc CXX=xlC FC=xlf $ cmake .. OK. That works. Thanks. But I guess that brings up another question. I have this in my CMakeLists.txt fil

Re: [CMake] Where to change default link line on Cmake

2010-05-04 Thread Rene Salmon
> Set environment variables to choose your compiler: > > $ rm -rf build > $ mkdir build > $ cd build > $ export CC=xlc CXX=xlC FC=xlf > $ cmake .. OK. That works. Thanks. But I guess that brings up another question. I have this in my CMakeLists.txt file so that (I thought) would not hav

Re: [CMake] Where to change default link line on Cmake

2010-05-04 Thread Brad King
Rene Salmon wrote: > Ahhh.. That is the problem cmake is not detecting the correct compiler ID. > > hpci6001t(salmr0)139:rm -rf build/ > hpci6001t(salmr0)140:mkdir build > hpci6001t(salmr0)141:cd build > /gpfs01/vol0/salmr0/mspain/fd/build > hpci6001t(salmr0)142:cmake .. > -- The C compiler identi

Re: [CMake] Where to change default link line on Cmake

2010-05-04 Thread Rene Salmon
> Prior to 2.8.1 CMake had a bug that led to use of -rdynamic with xlc > on Linux. Are you sure that the "ccmake" that you're running is 2.8.1? Yes. hpci6001t(salmr0)133:ccmake -version ccmake version 2.8.1 >> I am doing and out of source build. Something like this. >> hpci6001t(salmr0)54

Re: [CMake] Where to change default link line on Cmake

2010-05-04 Thread Brad King
Rene Salmon wrote: > cmake version 2.8.1 [snip] > Yes. It is xlc on Linux. Prior to 2.8.1 CMake had a bug that led to use of -rdynamic with xlc on Linux. Are you sure that the "ccmake" that you're running is 2.8.1? > I am doing and out of source build. Something like this. > hpci6001t(salmr0)54

Re: [CMake] Where to change default link line on Cmake

2010-05-04 Thread Rene Salmon
Hi, Thanks for the reply. > > What version of CMake? hpci6001t(salmr0)42:cmake --version cmake version 2.8.1 > > Is this xlc on Linux? Yes. It is xlc on Linux. > Did you try to switch the compiler after creating the build tree? I am very new to cmake so I am not sure but I want to say

Re: [CMake] Where to change default link line on Cmake

2010-05-04 Thread Brad King
Rene Salmon wrote: > xlc_r -O3 -qhot CMakeFiles/fd3ptr.dir/fd3ptr.c.o -o fd3ptr -rdynamic > xlc_r: 1501-216 (W) command option -dynamic is not recognized - passed to ld > /usr/bin/ld: unrecognized option '-dynamic' > /usr/bin/ld: use the --help option for usage information > > Basically cmake

[CMake] Where to change default link line on Cmake

2010-05-02 Thread Rene Salmon
Hi, I tried searching the list archives but did not find and answer to my problem. I am fairly new to Cmake so maybe I just don't know exactly what to look for. I installed Cmake on an IBM power machine that only had the gcc compilers. I am guessing that is where and how cmake is determining wh