gmio_core: move internal build options into config.h.cmake
This commit is contained in:
parent
44d73a66c8
commit
1707dd7891
@ -58,9 +58,18 @@
|
|||||||
# define GMIO_TARGET_ARCH_BIT_SIZE @GMIO_TARGET_ARCH_BIT_SIZE@
|
# define GMIO_TARGET_ARCH_BIT_SIZE @GMIO_TARGET_ARCH_BIT_SIZE@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* gmio_core/internal/string_parse.h */
|
/* Header: gmio_core/internal/string_parse.h */
|
||||||
#ifndef GMIO_USE_FAST_ATOF
|
#ifndef GMIO_STRINGPARSE_USE_FAST_ATOF
|
||||||
# define GMIO_USE_FAST_ATOF
|
/* Use fast_atof() instead of std string-to-float functions */
|
||||||
|
# define GMIO_STRINGPARSE_USE_FAST_ATOF
|
||||||
#endif
|
#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 */
|
#endif /* GMIO_CONFIG_H_CMAKE */
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
/* For implementation section */
|
/* For implementation section */
|
||||||
#include "helper_stream.h"
|
#include "helper_stream.h"
|
||||||
#include "string_utils.h"
|
#include "string_utils.h"
|
||||||
#ifdef GMIO_USE_FAST_ATOF
|
#ifdef GMIO_STRINGPARSE_USE_FAST_ATOF
|
||||||
# include "fast_atof.h"
|
# include "fast_atof.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ const char* gmio_skip_spaces(
|
|||||||
|
|
||||||
int gmio_get_float32(const char* str, gmio_float32_t* value_ptr)
|
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;
|
const char* end_ptr = NULL;
|
||||||
*value_ptr = fast_atof(str, &end_ptr);
|
*value_ptr = fast_atof(str, &end_ptr);
|
||||||
#elif defined(GMIO_HAVE_STRTOF_FUNC) /* Requires C99 */
|
#elif defined(GMIO_HAVE_STRTOF_FUNC) /* Requires C99 */
|
||||||
|
@ -18,10 +18,6 @@
|
|||||||
|
|
||||||
#include "../global.h"
|
#include "../global.h"
|
||||||
|
|
||||||
/*#define GMIO_STRINGUTILS_C_ARRAYS*/
|
|
||||||
/*#define GMIO_STRINGUTILS_CTYPE_H*/
|
|
||||||
#define GMIO_STRINGUTILS_DIRECT_TESTS
|
|
||||||
|
|
||||||
#ifdef GMIO_STRINGUTILS_CTYPE_H
|
#ifdef GMIO_STRINGUTILS_CTYPE_H
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user