[CMake] underscore mangling with blas and cmake
Jack Chessa
jfchessa at utep.edu
Sun Oct 23 23:25:16 EDT 2011
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: jfchessa at utep.edu
Office: A309
Voice: (915) 747-6900
Fax: (915) 747-5019
Web: http://utminers.utep.edu/jfchessa/index.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111023/14fbc7ed/attachment.htm>
More information about the CMake
mailing list