Use check_symbol_exists instead of check_function_exists
ClosedPublic

Authored by heikobecker on Feb 8 2019, 9:39 PM.

Details

Summary

check_function_exists has some shortcomings, which fails to detect
isnan when build against musl libc. The cmake documentation [1]
suggests to prefer check_symbol_exists, which detects isnan/isinf
fine on both glibc and musl.

[1] https://cmake.org/cmake/help/latest/module/CheckFunctionExists.html#command:check_function_exists

Test Plan

Builds with glibc and musl

Diff Detail

Repository
R8 Calligra
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8052
Build 8070: arc lint + arc unit
heikobecker created this revision.Feb 8 2019, 9:39 PM
Restricted Application added a project: Calligra: 3.0. · View Herald TranscriptFeb 8 2019, 9:39 PM
Restricted Application added a subscriber: Calligra-Devel-list. · View Herald Transcript
heikobecker requested review of this revision.Feb 8 2019, 9:39 PM

What about the other ​check_function_exists, should they also be changed?
Also, do you know when ​check_symbol_exists was introduced?
We still use cmake 2.8.12.

Replaced other check_function_exists invocations

What about the other ​check_function_exists, should they also be changed?

Changed them, too.

Also, do you know when ​check_symbol_exists was introduced?
We still use cmake 2.8.12.

No, but it's not that "new" and 2.8.12 definitely has it: https://cmake.org/cmake/help/v2.8.12/cmake.html#module:CheckSymbolExists

pino added a subscriber: pino.Feb 10 2019, 11:14 AM
pino added inline comments.
filters/words/msword-odf/wv2/CMakeLists.txt
83

missing "h" in "zlib.h"

Added missing "h". Thanks for noticing that.

heikobecker marked an inline comment as done.Feb 10 2019, 11:20 AM
danders accepted this revision.Feb 11 2019, 9:56 AM
This revision is now accepted and ready to land.Feb 11 2019, 9:56 AM
This revision was automatically updated to reflect the committed changes.