Hello all, <br><br>I would like to know how to configure CMakeLists.txt files to do the following :<br>1- Let a Fortran90 project placed in the /root/fsrc folder link with a C shared library placed in /root/contrib/clib folder <br>
2- Specify Fortran as the linker (since Fortran is calling C) <br><br>In the /root/CMakeLists.txt I just add subdirectories fsrc and contrib, and also add clib target in /root/contrib/CMakeLists.txt. <br><br>/root/CMakeLists.txt also specify the use of Fortran language. <br>
<br>/root/fsrc/CMakeLists.txt which builds the executable links with the clib target library. <br><br>When issuing the command: > cmake . in the /root folder I get the following output:<br>-- The Fortran compiler identification is Intel<br>
-- Check for working Fortran compiler: /usr/local/intel/fc/10.1.008/bin/ifort<br>-- Check for working Fortran compiler: /usr/local/intel/fc/10.1.008/bin/ifort -- works<br>-- Checking whether /usr/local/intel/fc/10.1.008/bin/ifort supports Fortran 90<br>
-- Checking whether /usr/local/intel/fc/10.1.008/bin/ifort supports Fortran 90 -- yes<br>-- Configuring done<br>CMake Error: Cannot determine link language for target "clib".<br>-- Generating done<br><br>So I'm missing something here. How to specify the link language in my CMakeLists ?<br>
<br>--Thanks<br><br>