gmio_core: move internal build options into config.h.cmake

This commit is contained in:
Hugues Delorme 2015-06-11 17:22:13 +02:00
parent 44d73a66c8
commit 1707dd7891
3 changed files with 14 additions and 9 deletions

View File

@ -58,9 +58,18 @@
# define GMIO_TARGET_ARCH_BIT_SIZE @GMIO_TARGET_ARCH_BIT_SIZE@
#endif
/* gmio_core/internal/string_parse.h */
#ifndef GMIO_USE_FAST_ATOF
# define GMIO_USE_FAST_ATOF
/* Header: gmio_core/internal/string_parse.h */
#ifndef GMIO_STRINGPARSE_USE_FAST_ATOF
/* Use fast_atof() instead of std string-to-float functions */
# define GMIO_STRINGPARSE_USE_FAST_ATOF
#endif
/* Header: gmio_core/internal/string_utils.h */
#ifndef GMIO_STRINGUTILS_DIRECT_TESTS
/* Use implementation based on "direct testing" */
# define GMIO_STRINGUTILS_DIRECT_TESTS
#endif
/*#define GMIO_STRINGUTILS_C_ARRAYS*/
/*#define GMIO_STRINGUTILS_CTYPE_H*/
#endif /* GMIO_CONFIG_H_CMAKE */

View File

@ -22,7 +22,7 @@
/* For implementation section */
#include "helper_stream.h"
#include "string_utils.h"
#ifdef GMIO_USE_FAST_ATOF
#ifdef GMIO_STRINGPARSE_USE_FAST_ATOF
# include "fast_atof.h"
#endif
@ -145,7 +145,7 @@ const char* gmio_skip_spaces(
int gmio_get_float32(const char* str, gmio_float32_t* value_ptr)
{
#if defined(GMIO_USE_FAST_ATOF)
#if defined(GMIO_STRINGPARSE_USE_FAST_ATOF)
const char* end_ptr = NULL;
*value_ptr = fast_atof(str, &end_ptr);
#elif defined(GMIO_HAVE_STRTOF_FUNC) /* Requires C99 */

View File

@ -18,10 +18,6 @@
#include "../global.h"
/*#define GMIO_STRINGUTILS_C_ARRAYS*/
/*#define GMIO_STRINGUTILS_CTYPE_H*/
#define GMIO_STRINGUTILS_DIRECT_TESTS
#ifdef GMIO_STRINGUTILS_CTYPE_H
# include <ctype.h>
#endif