Skip to content

Commit

Permalink
Merge branch 'minor' into topic/callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
langmm committed Sep 21, 2023
2 parents f7adc6c + 9bc28d3 commit d66d7b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/drivers/test_CompiledModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def test_get_flags(self, python_class):
from yggdrasil import __version__ as yggver
yggver = yggver.split('+')[0].split('v')[-1].split('.')
assert (python_class.get_flags(flags='hello', libtype='object')
== ['hello', '-DWITH_YGGDRASIL',
== ['hello', '-DWITH_YGGDRASIL', '-D_USE_MATH_DEFINES',
f'-DYGGVER_MAJOR={yggver[0]}'])

def test_get_executable_command(self, python_class):
Expand Down
7 changes: 5 additions & 2 deletions yggdrasil/languages/C/datatypes/datatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#ifdef __cplusplus
#include <cmath>
#else // __cplusplus
#include <math.h> // Required to prevent error when using mingw on windows
#endif // __cplusplus

#ifndef RAPIDJSON_NO_INT64DEFINE
#ifndef __STDC_LIMIT_MACROS
Expand Down Expand Up @@ -110,8 +115,6 @@ typedef long double _Complex complex_long_double;
extern "C" {
#endif

#include <math.h> // Required to prevent error when using mingw on windows

#ifdef YGGDRASIL_DISABLE_PYTHON_C_API

#ifndef PyObject
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil/rapidjson

0 comments on commit d66d7b4

Please sign in to comment.