<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello Eric,<div><br></div><div>Thanks for your answer.</div><div><br></div><div><div><div>On Apr 27, 2012, at 10:44 PM, Eric Noulard wrote:</div><blockquote type="cite"><div>What do you mean "executes just fine from the command line"?<br><br></div></blockquote><div><br></div><div>I mean that I can build all the targets in command line without problem and execute them without any problems.</div><br><blockquote type="cite"><div><blockquote type="cite">Linking CXX executable benchmark<br></blockquote><blockquote type="cite">/usr/bin/cmake -E cmake_link_script CMakeFiles/benchmark.dir/link.txt --verbose=1<br></blockquote><blockquote type="cite">/usr/bin/c++ -Wall -Wextra -Wshadow -Woverloaded-virtual -g3 -ggdb3 CMakeFiles/benchmark.dir/test/benchmark.cc.o -o benchmark -rdynamic libxxxxx.a libxxx_func_fw.a libqr_updates.a -lrt -lmkl_rt -liomp5 -limf -lgfortran -lquadmath<br></blockquote><blockquote type="cite">/usr/bin/ld: cannot find -lmkl_rt<br></blockquote><blockquote type="cite">/usr/bin/ld: cannot find -liomp5<br></blockquote><blockquote type="cite">/usr/bin/ld: cannot find -limf<br></blockquote><blockquote type="cite">collect2: ld returned 1 exit status<br></blockquote><blockquote type="cite">make[2]: Leaving directory `/home/bravegag/code/fastcode_project/build'<br></blockquote><blockquote type="cite">make[1]: Leaving directory `/home/bravegag/code/fastcode_project/build'<br></blockquote><blockquote type="cite">make[2]: *** [benchmark] Error 1<br></blockquote><blockquote type="cite">make[1]: *** [CMakeFiles/benchmark.dir/all] Error 2<br></blockquote><blockquote type="cite">make: *** [all] Error 2</blockquote><font class="Apple-style-span" color="#007520"><br></font>Looks like you are using<br>target_link_library in your CMakeLists.txt without using corresponding<br>find module<br>Could you give us an excerpt of your CMakeLists.txt?<br>Ij particular the CMake script corresponding to your "benchmark" executable.<br><br></div></blockquote><div><br></div></div>Here it is:</div><div><br></div><div><div><div>#*****************************************************************************************</div></div></div><div><br></div><div><div>find_package(MKL)</div><div><br></div><div>set(HAVE_INTEL_MKL ${MKL_FOUND})</div><div>if (MKL_FOUND)</div><div> include_directories(${MKL_INCLUDE_DIRS})</div><div> link_directories(${MKL_LIBRARY_DIRS})</div><div>endif()</div></div><div><br></div><div># [snip]</div><div><br></div><div><div>sfo_executable(benchmark test/benchmark.cc)</div><div>target_link_libraries(benchmark submodularity xxx_func_fw qr_updates)</div><div>if (UNIX)</div><div> find_library(RT_LIBRARY rt)</div><div> if(RT_LIBRARY)</div><div> target_link_libraries(benchmark ${RT_LIBRARY})</div><div> endif()</div><div>endif()</div></div><div><br></div><div><div>#*****************************************************************************************</div></div><div><br></div><div>Thank you.</div><div>Best regards,</div><div>Giovanni</div></body></html>