diff options
author | Brad King <brad.king@kitware.com> | 2017-05-17 19:00:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-17 19:00:16 (GMT) |
commit | fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04 (patch) | |
tree | f7de6bc25905972cbf9d9bdd39b3612b80366c92 /Utilities | |
parent | 3f25f873f8f0cd4c9c8d5dce29535c6b2757eaea (diff) | |
download | CMake-fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04.zip CMake-fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04.tar.gz CMake-fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04.tar.bz2 |
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.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmliblzma/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/cmliblzma/CMakeLists.txt b/Utilities/cmliblzma/CMakeLists.txt index e806680..bb3b8a7 100644 --- a/Utilities/cmliblzma/CMakeLists.txt +++ b/Utilities/cmliblzma/CMakeLists.txt @@ -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) |