jeromerobert/hmat-oss — pull request #10 by jschueller (2014-11-26 13:10:13+00:00)
Title: explicitely link to libm as CMAKE_REQUIRED_LIBRARIES is overwritten by f...

...indmkl

libm does not get linked resulting in this: (ubuntu 14.04)
[ 113s] Linking C executable example-c-simple-cylinder
[ 113s] /usr/bin/cmake -E cmake_link_script CMakeFiles/example-c-simple-cylinder.dir/link.txt --verbose=1
[ 113s] /usr/bin/gcc -fopenmp -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed CMakeFiles/example-c-simple-cylinder.dir/examples/c-simple-cylinder.c.o -o example-c-simple-cylinder -L/usr/src/packages/BUILD/obj-i686-linux-gnu -rdynamic libhmat-oss.so.1.0.0 -lrt -Wl,-rpath,/usr/src/packages/BUILD/obj-i686-linux-gnu:
[ 113s] /usr/bin/ld: CMakeFiles/example-c-simple-cylinder.dir/examples/c-simple-cylinder.c.o: undefined reference to symbol 'sincos@@GLIBC_2.1'
[ 113s] //lib/i386-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
[ 113s] collect2: error: ld returned 1 exit status
[ 113s] make[3]: *** [example-c-simple-cylinder] Error 1
[ 113s] make[3]: Leaving directory `/usr/src/packages/BUILD/obj-i686-linux-gnu'
[ 113s] make[2]: *** [CMakeFiles/example-c-simple-cylinder.dir/all] Error 2
[ 113s] make[2]: *** Waiting for unfinished jobs....