On 10/24/2011 05:25 AM, Jack Chessa wrote:
> I am new to cmake and have a question that I hope has a simple answer.
> I am building a simple C++ program that uses blas scopy. I am using
>
> find_package(BLAS REQUIRED)
>
> to find blas on the system (OSX in this case), and the cmake step seems
> to find it, but when I go to the make step I get the
> Undefined symbols:
> "_scopy_", referenced from:
> _main in blas_ex.cpp.o
>
> I usually can fix this with the -fleading-underscore
> or -fnoleading-underscore or -Dadd_... but I am not really sure what is
> going on in the cmake build or the Makefile that cmake creates. I don't
> see any .o files to nm on either. So my question is what is the best
> way to deal with underscore issues in cmake? Does anyone have a simple
> example for using cmake to build a c++ program with blas or lapack.
>
> Thanks
>
> Jack Chessa
> Associate Professor
> Department of Mechanical Engineering
> University of Texas at El Paso
> Email: [email protected] <mailto:[email protected]>
> Office: A309
> Voice: (915) 747-6900
> Fax: (915) 747-5019
> Web: http://utminers.utep.edu/jfchessa/index.html
Do you invoke target_link_libraries? Something like this:
target_link_libraries(foo ${BLAS_LIBRARIES})
Michael
--
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