Hi Eike, On 17 October 2013 12:32, Rolf Eike Beer <[email protected]> wrote:
> >> 1) CMake generates this link.txt (error when linking) >> /usr/bin/c++ -lfusion_io -ladios -lmxml -lmpi -lopen-rte -lopen-pal >> -lpthread -lstdc++ CMakeFiles/niio-main.dir/main.**cpp.o -o niio-main >> -rdynamic -L/home/testuser/dev/niio/lib >> -L/home/testuser/dev/niio/**openmpi/lib >> >> >> 2) Desired linking that works: >> /usr/bin/c++ CMakeFiles/niio-main.dir/main.**cpp.o -lfusion_io >> -ladios >> -lmxml -lmpi -lopen-rte -lopen-pal -lpthread -lstdc++ -o niio-main >> -rdynamic -L/home/testuser/dev/niio/lib >> -L/home/testuser/dev/niio/**openmpi/lib >> >> cmake --help-module FindMPI > cmake --help-module FindThreads (I doubt you need it, this is probably > only a dependency of MPI which should take care for that itself) > cmake --help-command link_directories > > To get -g: cmake -D CMAKE_BUILD_TYPE=Debug … (or =RelWithDebInfo). > On this example I'm using a specific MPI compiled for this example. I do not want to used the MPI installed in the system. I read the help for that commands (and many other things) and I didn't find how to move link flags after the object file. I'm lost. Where I must look for to understand how to modify the way link.txt is generated? At least specify that my main.cpp.o must be the first in the chain. Best regards, JP
-- 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
