[CMake] CXX incorrectly includes CMakeFortranInformation.cmake for MinGW/MSYS/Wine

Alan W. Irwin irwin at beluga.phys.uvic.ca
Mon Apr 5 16:04:25 EDT 2010


On 2010-04-05 13:50-0400 Bill Hoffman wrote:

> Alan W. Irwin wrote:
>
>>> Have you run cmake --trace yet to figure out what is including what and 
>>> where?
>> 
>> Yes, as alluded to above
>> the complete result for cmake --trace --debug-output for
>> a CMakeLists.txt file consisting of just
>> 
>> project(test NONE)
>> enable_language(CXX)
>> 
>> was attached to my first post in this thread.  Part way through is starts
>> accessing CMakeFortranInformation.cmake which is the source of the trouble.
>> 
>> For your convenience I will attach that cmake output to this post as well.
>> 
>
> OK, you are going to have to look at the C++ code to figure this out.
>
> You will need to add some debug prints to this function:
>
> void
> cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
>                                  cmMakefile *mf, bool)
>
> ...
>
>  for(std::vector<std::string>::const_iterator l = languages.begin();
>      l != languages.end(); ++l)
>    {
>
> Seems that Fortran is getting into the list of enabled languages.
>
> Might also want to put prints in cmEnableLanguageCommand
> ::InitialPass  and void cmMakefile::EnableLanguage(std::vector<std::string> 
> const &  lang,
>                               bool optional)

Hi Bill:

Thanks for that advice.

It turns out that the workaround of disabling Fortran that has been
mentioned in this thread does allow CXX to be enabled properly so I have
been able to build and test the CXX components of PLplot this morning (so
long as I drop the Fortran components of PLplot and disable CMake Fortran
support by renaming CMakeFortranInformation.cmake).

Therefore, I am fairly confident I can now build CMake with the cmake app on
MinGW/MSYS/Wine (so long as I disable CMake Fortran support), but I haven't
tried that yet. Also, MinGW apparently provides gdb so I will try to get
that going as well. Although my C and gdb skills are fine, my C++ skills are
not that good and I am not that familiar with the CMake code so this will
take some time even with the clues you have given me above about where
to look.

I hope to be able to report back with gdb results before the weekend.
Meanwhile, if any of the CMake developers are interested in reproducing this
issue for themselves, it is completely straightforward to get access to the
MinGW/MSYS/Wine platform, and I state that as a complete MinGW/MSYS/Wine
newbie (no experience with MinGW, MSYS, or Wine at all until late last
week).  It is simply a matter of installing wine-1.4.1 on Linux, downloading
and unpacking Windows versions of MinGW, MSYS, and CMake, running winecfg
(with default choices), putting those packages on the PATH via editing the
wine registry file, .wine/system.reg, and you have liftoff.  I have kept a
complete cookbook of what I did (including all the wget URL's for the MinGW
and MSYS componnents where collecting those URLs was the most time-consuming
part of the process). I would be happy to share that cookbook.

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