Hi all,

I would like to port a hardcoded build line from an old make file to my CMakeLists.txt file for a fortran 90
project using ifort compiler.
The line is the following:

   ifort *.o -o myexec -static-intel -Bstatic -lXm -Bdynamic -lXt

First, if I get it right (sorry for my ignorance but I come from the python world where I was quite
preserved from these lines !!!), the goal is to build an executable:
   - statically bound to the intel libraries
   - statically bound to libXm library
   - dynamically bound to libXt library

A "locate" told me that on my machine both Xt and Xm are in dynamic form (libXm.so.2, libXt.so.6) and in a standard location (/usr/lib). So in my CMakeLists.txt file, I tried:

set(CMAKE_Fortran_FLAGS_RELEASE "-static-intel")
add_executable(myexec $SOURCES)
target_link_libraries(myexec -Bdynamic Xm Xt)

when building the project I get an error at link time (ld: cannot find -lXm).

Would you have any idea of what is going wrong with my settings ?

thanks a lot

Eric

--
Eric Pellegrini
Calcul Scientifique
Institut Laue-Langevin
Grenoble, France

--

Powered by www.kitware.com

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

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

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

Reply via email to