<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
You were actually right the problem was the FindGSL.cmake file.<br>Like I said earlier, I took it from the net.<br>The line SET(GSL_LIBRARIES `${GSL_CONFIG} --libs`) did not returned the expected result.<br>I replaced it by<br>EXEC_PROGRAM(${GSL_CONFIG}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ARGS --libs<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTPUT_VARIABLE GSL_LIBRARIES)<br><br>It works well.<br><br>Thank you very much.<br>Best regards,<br>Ben<br><br><br><hr id="stopSpelling">Date: Mon, 14 Sep 2009 07:26:03 -0400<br>Subject: Re: [CMake] linking error with gsl<br>From: philip@yhbt.com<br>To: laurentbenoist@hotmail.com<br>CC: cmake@cmake.org<br><br>Have you tried using "make VERBOSE=1" to get the full command line being executed?<br><br>It looks like `/usr/local/bin/gsl-config might be being passed to the linker via target_link_libraries()?<br>CMake doesn't evaluate backticks, you'll have to use a command like execute_process().<br>
<br>There might be a problem in the FindGSL module you're using.&nbsp; This might take some debugging with the message() command to trace down.&nbsp; There are several find modules shipped with CMake 2.6.4 that use a "foo-config" style program to parse include directories and libraries which may be helpful.&nbsp; One is FindFLTK.cmake for example.<br>
<br><div class="EC_gmail_quote">On Sun, Sep 13, 2009 at 4:05 PM, Benoist Laurent <span dir="ltr">&lt;<a href="mailto:laurentbenoist@hotmail.com">laurentbenoist@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="EC_gmail_quote" style="padding-left: 1ex;">




<div>
Hi,<br><br>I'm a begginner with CMake.<br>I've got a project with all sources written and I want to switch to a CMake building process.<br>My project is quite small :<br>&nbsp; - 5 sources in myProject/src directory<br>
&nbsp; - 5 headers in myProject/include directory<br><br>The problem is that is need to link with the gsl libraries.<br>I used the FindGSL.cmake file that I found here <a href="http://www.cmake.org/pipermail/cmake/2006-March/008628.html">http://www.cmake.org/pipermail/cmake/2006-March/008628.html</a>.<br>
<br>But when I type make, this error occurs :<br>Linking C executable myExe<br>i686-apple-darwin9-gcc-4.0.1: `/usr/local/bin/gsl-config: No such file or directory<br>make[2]: *** [myExe] Error 1<br>make[1]: *** [CMakeFiles/myExe.dir/all] Error 2<br>
make: *** [all] Error 2<br><br>It's quite strange because the program /usr/local/bin/gsl-config does exist and prints -L/usr/local/lib -lgsl -lgslcblas -lm.<br>This is my CMakeLists.txt file :<br><br>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)<br>
PROJECT(PROJET)<br><br>FIND_PACKAGE(GSL REQUIRED)<br><br>SET(PROJET_SRCS <br>&nbsp;&nbsp;&nbsp; ./src/FN_functions.c<br>&nbsp;&nbsp;&nbsp; ./src/HH_functions.c<br>&nbsp;&nbsp;&nbsp; ./src/HR_functions.c<br>&nbsp;&nbsp;&nbsp; ./src/Iz_functions.c<br>&nbsp;&nbsp;&nbsp; ./src/main.c<br>&nbsp;&nbsp;&nbsp; ./src/misc.c<br>
&nbsp;&nbsp;&nbsp; ./src/ML_functions.c<br>&nbsp;&nbsp;&nbsp; ./src/parsing.c<br>&nbsp;&nbsp;&nbsp; ./src/stim.c<br>)&nbsp;&nbsp;&nbsp; <br><br>SET(INCLUDE_DIRS<br>&nbsp;&nbsp;&nbsp; ${PROJET_SOURCE_DIR}/include<br>&nbsp;&nbsp;&nbsp; ${GSL_INCLUDE_DIRS}<br>)<br><br>SET(LIBS ${LIBS} ${GSL_LIBRARIES})<br><br>INCLUDE_DIRECTORIES(${INCLUDE_DIRS})<br>
ADD_DEFINITIONS(-Wall -ansi -pedantic -02)<br>ADD_EXECUTABLE(myExe ${PROJET_SRCS})<br><br>TARGET_LINK_LIBRARIES(myExe ${LIBS})<br><br>--------------<br><br>Do you see the problem ?<br><br><br><hr>Achetez un nouveau PC et bénéficiez de Windows 7 dès sa sortie ! <a href="http://www.portable-windows.com/">En savoir plus</a></div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><br>-- <br>Philip Lowman<br><br /><hr />Vous cherchez l'intégrale des clips de Michael Jackson ? <a href='http://www.bing.com/videos/search?q=Michael+Jackson&FORM=MVDE6' target='_new'>Bing ! Trouvez !</a></body>
</html>