[CMake] FindThreads and Fortran

Alin M Elena alin.elena at qub.ac.uk
Thu Jul 17 14:45:10 EDT 2008


Hi,

I try to determine the correct -lpthread against which I link in a Fortran 
project. (http://code.google.com/p/tdtbuj)
using only 
find_package(Threads)
leads to an error
-- Looking for include files CMAKE_HAVE_PTHREAD_H                               
CMake Error: Unknown extension ".c" for file 
"/home/alin/forge/CMakeFiles/CMakeTmp/CheckIncludeFiles.c".  TRY_COMPILE only 
works for enabled languages.         
Currently enabled languages are: Fortran                                        
See PROJECT command for help enabling other languages.

in order to make it work I have to enable C
enable_language(C)

Having in mind that my project is 100% Fortran I find the step uneasy.
Any idea how to avoid it?


Alin



-- 
______________________________________________________________________ 
 "...if the universities will not study useless subjects, who will?" 
                           G. F. Fitzgerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
alin.elena at yahoo.co.uk 
alin.elena at qub.ac.uk
______________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080717/115d94b0/attachment.htm>


More information about the CMake mailing list