mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 20:21:41 -06:00
liblzma: Fix HAVE_INLINE and HAVE___INLINE checks
The checks fail even on compilers that support the keywords because
the linkage is broken:
src.c:...: undefined reference to 'test'
At the actual use sites we use `static inline` instead of just `inline`,
so perform the check this way too to fix the linkage.
This commit is contained in:
@@ -15,11 +15,11 @@ CHECK_C_SOURCE_COMPILES(
|
||||
HAVE___RESTRICT)
|
||||
|
||||
CHECK_C_SOURCE_COMPILES(
|
||||
"inline int test (void) {return 0;}\nint main (void) {return test();}"
|
||||
"static inline int test (void) {return 0;}\nint main (void) {return test();}"
|
||||
HAVE_INLINE)
|
||||
|
||||
CHECK_C_SOURCE_COMPILES (
|
||||
"__inline int test (void) {return 0;}\nint main (void) {return test();}"
|
||||
"static __inline int test (void) {return 0;}\nint main (void) {return test();}"
|
||||
HAVE___INLINE)
|
||||
|
||||
CHECK_INCLUDE_FILE(byteswap.h HAVE_BYTESWAP_H)
|
||||
|
||||
Reference in New Issue
Block a user