[CMake] CC, CXX, and FC environment variable regression in 2.8.1-rc4
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sun Mar 14 13:49:21 EDT 2010
I often build with
export CC='gcc -g -fvisibility=hidden
export CXX='g++ -g -fvisibility=hidden'
and
export FC='gfortran -g -fvisibility=hidden'
but recently this has quit working because CMake fails to add
the necessary -fPIC flag to shared library builds.
Sorry I don't know the last CMake version where this worked, but I am pretty
sure I have used this sort of build successfully for earlier versions of
2.8.x, and definitely for cmake-2.6.4.
If I specify the flags another way, e.g.,
cmake -DCMAKE_C_FLAGS:STRING="-g -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS:STRING="-g -fvisibility=hidden" \
-DCMAKE_Fortran_FLAGS:STRING="-g -fvisibility=hidden" \
...
the necessary -fPIC flag for shared libraries is added in properly. However,
I would like the more convenient (set and forget) environment variable
approach to continue to work as previously.
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
__________________________
More information about the CMake
mailing list