From 6f4ad74fcd9b1b889ea164262bec51ecf002e62b Mon Sep 17 00:00:00 2001 From: Tiago Quintino Date: Fri, 18 May 2018 16:34:35 +0100 Subject: [PATCH] ECC-688: move inline test --- CMakeLists.txt | 8 ++++++++ eccodes_config.h.in | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bd8315d8..575df907e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,14 @@ check_symbol_exists( posix_memalign "stdlib.h" ECCODES_HAVE_POSIX_MEMALIGN ) check_symbol_exists( fmemopen "stdio.h" ECCODES_HAVE_FMEMOPEN ) check_symbol_exists( funopen "stdio.h" ECCODES_HAVE_FUNOPEN ) +check_c_source_compiles( + " typedef int foo_t; + static inline foo_t static_foo(){return 0;} + foo_t foo(){return 0;} + int main(int argc, char *argv[]){return 0;} + " ECCODES_HAVE_C_INLINE ) + + ############################################################################### # some variables/options of this project diff --git a/eccodes_config.h.in b/eccodes_config.h.in index 7e3464fad..e9a068d07 100644 --- a/eccodes_config.h.in +++ b/eccodes_config.h.in @@ -23,7 +23,7 @@ #define ECCODES_DEFINITION_PATH "@ECCODES_DEFINITION_PATH@" -#ifdef EC_HAVE_C_INLINE +#ifdef ECCODES_HAVE_C_INLINE #define GRIB_INLINE inline #endif