[CMake] Building a library with fortran and c code

Paulo Jabardo pjabardo at yahoo.com.br
Thu Nov 10 08:01:46 EST 2005


Sorry, I musta have mada some very silliy mistake when originally posting:
 
 My CMakeLists.txt is as follows:
 In the top directory,
 
 PROJECT(Veclib C Fortran)
 
 INCLUDE_DIRECTORIES(${Veclib_SOURCE_DIR}/../include)
 
 # For each subdirectory, include its CMakeLists.txt, according to procdure suggested by the CMake book
 
 INCLUDE(misc/CMakeLists.txt)
 FOREACH(FILE ${FILES}
   SET(misc  ${misc} ${misc}/${FILE})
 ENDFOREACH(FILE)
 
 ADD_LIBRARY(vec ${misc} ... ) # misc and variables corresponding to other directories
 In directory misc, the CMakeLists.txt is:
 
 SET(FILES
   xscatr.c
   xgathr.c
   # ... Several other C files
   zbesj.f)
 
 If I simply exclude zbesj.f, the library is built fine but if I include it, then the error mentioned occurs.
 
 Thanks,
 
 Paulo Jabardo
 

"William A. Hoffman" <billlist at nycap.rr.com> escreveu: Please post the CMakeLists.txt files and not just the output of the build.

-Bill


At 12:59 PM 11/8/2005, Paulo Jabardo wrote:
>I'm trying to write a CMakeLists.txt file for a static
>library which has several c files in a few different
>directories and a single fortran file.
>
>I used an approach suggested in the CMake book and if
>eliminate the fortran file, the program will build
>allright. Once I include the fortran file (in a
>directory with other c files) I get an error.
>
>My top CMakeLists.txt file is as foollows:
>
>>make
>Scanning dependencies of target vec
>make[2]: *** No rule to make target
>`FORWARD.mod.proxy', needed by
>`CMakeFiles/vec.dir/misc/zbesj.o.requires'.  Stop.
>make[1]: *** [CMakeFiles/vec.dir/all] Error 2
>make: *** [all] Error 2
>
>Any help is welcome
>
>
>Thanks, Paulo Jabardo
>
>
>
>        
>
>
>
>        
>                
>_______________________________________________________ 
>Yahoo! Acesso Grátis: Internet rápida e grátis. 
>Instale o discador agora!
>http://br.acesso.yahoo.com/
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake




		
---------------------------------
 Yahoo! Acesso Grátis: Internet rápida e grátis.
Instale o discador agora!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20051110/bcc4e515/attachment.html


More information about the CMake mailing list