<div dir="ltr">snip<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">>>> cmake -DBLAS=/path/to/lib/libgoto.a PATH_TO_SOURCE<br>
>>><br>
>>> If I link the lib manually I enter<br>
>>> gcc -o output myfile.c /path/to/lib/libgoto.a<br>
>><br>
>>FIND_PACKAGE(BLAS REQUIRED)<br>
>><br>
>>ADD_EXECUTABLE(output myfile.c)<br>
>>TARGET_LINK_LIBRARIES(output ${BLAS_LIBRARIES})<br>
<br></div></blockquote><div><br>snip<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"></div>
> In my opinion the best way is to pass the right file as parameter. The cause is that the choose of the blas implementation is very important to solve the problems as fast as possible and so I want an easy way to switch which blas is used.<br>
<br>
Either run it via ccmake and changed whatever option is "wrong".<br>
reading the code of FindBLAS.cmake there is apparently a subtle<br>
mechanism which rely on the setting of "BLA_VENDOR", change this value<br>
until you are happy with cmake system inspection (neither did I wrote<br>
this module, nor did I ever used it...)<br>
<div></div></blockquote><div><br><br>I am in a vaguely similar position, and I can understand the desire
to specify the library on the command line (so that you can configure
via a selection of scripts that call cmake), rather than having to
manually edit the properties in ccmake.<br><br>Maybe instead, is it possible to set the value of BLAS_LIBRARIES via the command line? You would probably also want to set BLAS_INCLUDES too in case you have different headers as well.<br>
</div></div><br>At the end of the day, FIND_PACKAGE()'s goal is to set the values of numerous "standard" variables (eg BLAS_LIBRARIES)... so if you can do a better job than cmake's automatic package finding tool, then it might be easier to just specify the required variables yourself and remove the FIND_PACKAGE call entirely.<br>
<br><br><br></div>