[CMake] segfault with ccmake, not with cmake
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sun Apr 22 11:37:15 EDT 2007
Of course, trying to build a C++ library without C++ enabled should generate
an error message so it appears the segfault you got for ccmake and no error
message for cmake are a CMake bug.
Of course, this bug may have been fixed already. What version of cmake and
what platform?
Prakash Punnoor said:
> It seem if I specify the CXX language in the first Project statement, I
don't get the segfault, but I want to conditionally enable c++.
Using the CXX option to PROJECT (or using no languages as options to PROJECT
which defaults then to C and CXX) is the correct way to enable the CXX
language.
If you want to optionally enable the CXX language, then specify just the C
language to PROJECT and optionally use the ENABLE_LANGUAGE(CXX) command.
That works fine for me except note Bug #4772 - CMAKE_BUILD_TYPE does not
work correctly for language enabled with ENABLE_LANGUAGE
Also, I can see why you missed ENABLE_LANGUAGE. Currently its
documentation says
ENABLE_LANGUAGE
Set a name for the entire project.
????
After that bad start the rest of the ENABLE_LANGUAGE documentation does
indicate how to use ENABLE_LANGUAGE.
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