-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
use m library on FreeBSD for linking of specific programs
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,7 +230,14 @@ else() # SW_BUILD=ON | |
-DHAVE_LIBJP2K=1) | ||
endif() | ||
|
||
set(libs_private "${libs_private} -lm") | ||
check_library_exists(m sin "" HAVE_LIBM) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
diizzyy
Contributor
|
||
if(HAVE_LIBM) | ||
set(libs_private "${libs_private} -lm") | ||
endif(HAVE_LIBM) | ||
|
||
if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD.*|DragonFly.*|FreeBSD") | ||
set(FREEBSD ON) | ||
endif(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD.*|DragonFly.*|FreeBSD") | ||
|
||
# ############################################################################## | ||
# | ||
|
3 comments
on commit d5c36c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stweil : thanks. I think I need to downgrade my cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be relevant, but ooking at set(math_progs) ...
there are more programs that include math.h, namely
grep "<math.h>" *.c
contrasttest.c:#include <math.h>
dna_reg.c:#include <math.h>
extrema_reg.c:#include <math.h>
fpix1_reg.c:#include <math.h>
gammatest.c:#include <math.h>
gifio_reg.c:#include <math.h>
insert_reg.c:#include <math.h>
jp2kio_reg.c:#include <math.h>
locminmax_reg.c:#include <math.h>
numa1_reg.c:#include <math.h>
numa2_reg.c:#include <math.h>
numa3_reg.c:#include <math.h>
otsutest1.c:#include <math.h>
pixalloc_reg.c:#include <math.h>
pixcomp_reg.c:#include <math.h>
plottest.c:#include <math.h>
pta_reg.c:#include <math.h>
rankhisto_reg.c:#include <math.h>
rotatefastalt.c:#include <math.h> /* required for sin and tan */
warper_reg.c:#include <math.h>
watershed_reg.c:#include <math.h>
webpio_reg.c:#include <math.h>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that they get -lm
because the linker flags for libopenjp2
, libpng
, libtiff-4
, libwebp
and other libraries also add -lm
.
@zdenop, this breaks the cmake build for Ubuntu: