[CMake] CMAKE OS X fortran bug?

Pettey . Lucas LPettey at drc.com
Fri Jan 17 15:29:29 EST 2014


Did you try ENABLE_LANGUAGE(Fortran)?

As far as I know, all CMake references to Fortran only have the first letter uppercase. By having the entire name uppercase, CMake may think it is a new language and thus need to look for FORTRAN compilers and linkers.

Lucas


________________________________________
From: CMake [cmake-bounces at cmake.org] on behalf of jmerkow [jmerkow at gmail.com]
Sent: Friday, January 17, 2014 2:25 PM
To: cmake at cmake.org
Subject: [CMake] CMAKE OS X fortran bug?

Hello,

I am working on converting an older project to CMake.  Right now, I am
getting all the variables and flags in order from the Makefiles to make sure
that CMake will work for our project. And I ran across something that maybe
a bug.

I am using fortran in this project, so I wanted to enable that language
with:

ENABLE_LANGUAGE(FORTRAN)

I get the following error:

CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_FORTRAN_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be
not be built correctly.
Missing variable is:
CMAKE_FORTRAN_COMPILER
CMake Error: CMAKE_FORTRAN_COMPILER not set, after EnableLanguage

However, CMAKE_Fortran_COMPILER is set (to /usr/local/bin/gfortran in this
case).  It seems to be that error is being generated because of the improper
lowercase (CMAKE_FORTRAN_COMPILER vs CMAKE_Fortran_COMPILER)
The rest of the variables regarding fortran have the same improper
captialization (in the gui)
I am running CMake 2.8.12.1 on OS X 10.8.5.

Is this a bug or am I doing something wrong?

Jameson




--
View this message in context: http://cmake.3232098.n2.nabble.com/CMAKE-OS-X-fortran-bug-tp7586540.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
________________________________

This electronic message transmission and any attachments that accompany it contain information from DRC® (Dynamics Research Corporation) or its subsidiaries, or the intended recipient, which is privileged, proprietary, business confidential, or otherwise protected from disclosure and is the exclusive property of DRC and/or the intended recipient. The information in this email is solely intended for the use of the individual or entity that is the intended recipient. If you are not the intended recipient, any use, dissemination, distribution, retention, or copying of this communication, attachments, or substance is prohibited. If you have received this electronic transmission in error, please immediately reply to the author via email that you received the message by mistake and also promptly and permanently delete this message and all copies of this email and any attachments. We thank you for your assistance and apologize for any inconvenience.


More information about the CMake mailing list