From: Alan W. I. <ir...@be...> - 2007-07-13 05:40:14
|
On 2007-07-13 00:31-0400 Hazen Babcock wrote: > > On Jul 6, 2007, at 8:27 AM, Jerry wrote: > >> I hope there is another Mac user on the list. >> >> Here is the output from the 4.3 compilers which include Ada, C and >> Objective C, which output looks the same as it did when I was using >> the 4.2 compiler which included only Ada and C. (Ignore the fact that >> the path to the compiler is /usr/local/ada-4.2/bin/gcc because I just >> dumped the 4.3 compilers in there for a quick and dirty attempt at >> fixing the problem. >> >> >> [ 45%] Building C object drivers/CMakeFiles/aqt.dir/aqt.o >> /usr/local/ada-4.2/bin/gcc -Daqt_EXPORTS -fPIC -I/Users/jerry/ >> Documents/Programs/Ada/Code/Bindings/PLplot/plplot_svn/plplot/include >> -I/usr/local/plplot_build_dir -I/usr/local/plplot_build_dir/include >> -DHAVE_CONFIG_H -ObjC -o drivers/CMakeFiles/aqt.dir/aqt.o -c /Users/ >> jerry/Documents/Programs/Ada/Code/Bindings/PLplot/plplot_svn/plplot/ >> drivers/aqt.c >> cc1: error: invalid option argument '-ObjC' >> make[2]: *** [drivers/CMakeFiles/aqt.dir/aqt.o] Error 1 >> make[1]: *** [drivers/CMakeFiles/aqt.dir/all] Error 2 >> make: *** [all] Error 2 > > I've installed macada and I've managed to get this far on my OS-X > box. I was hoping to be able to tell cmake (using the ccmake > facility) to use /usr/bin/gcc for the C compiler. However when I set > the CMAKE_C_COMPILER = /usr/bin/gcc and then configure it always gets > flipped back to /usr/local/ada-4.3/bin/gcc. My suspicion is that we > could get both Ada and Aquaterm to work if we could somehow suppress > the behavior. Ideas? How do you set CMAKE_C_COMPILER? I have never used that CMake variable, but my interpretation of http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools is you can only set it using a -D option to cmake which will only work if you haven't cached anything before (i.e., you are starting fresh with no CMakeCache.txt file in your build directory). Anyhow, I assume the flipping "back to /usr/local/ada-4.3/bin/gcc" is cause by a cached value. Another way to set the C compiler (and associated flags) which I know works, is to set the CC environment variable (as also discussed at the above site) before invoking cmake _with no cache file_. Similarly, to set the Ada compiler, specify the ADA environment variable (see the first few lines of cmake/modules/CMakeDetermineAdaCompiler.cmake). >From further along in that file you can see that it is always assumed that the Ada executable builder is going to be called gnatmake, and gnatmake is looked for in the same directory as the specified Ada compiler. Anyhow, I believe that setting the CC and ADA environment variables before running cmake with no CMakeCache.txt file in your build directory should give you full and separate control of the C compiler, the Ada compiler, and the Ada executable builder. Let me know if that is not the case. 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 __________________________ |