Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
preprocessor
Commits
5e6b8f0a
Commit
5e6b8f0a
authored
Oct 02, 2018
by
Sébastien Villemot
Browse files
No longer test for __MINGW32__ macro, testing for _WIN32 is enough
Closes:
dynare#1315
parent
15d026e5
Pipeline
#89
passed with stage
in 1 minute and 22 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/DataTree.cc
View file @
5e6b8f0a
...
...
@@ -759,7 +759,7 @@ DataTree::writePowerDeriv(ostream &output) const
void
DataTree
::
writeNormcdfCHeader
(
ostream
&
output
)
const
{
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
if
(
isTrinaryOpUsed
(
TrinaryOpcode
::
normcdf
))
output
<<
"#ifdef _MSC_VER"
<<
endl
<<
"double normcdf(double);"
<<
endl
...
...
@@ -770,7 +770,7 @@ DataTree::writeNormcdfCHeader(ostream &output) const
void
DataTree
::
writeNormcdf
(
ostream
&
output
)
const
{
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
if
(
isTrinaryOpUsed
(
TrinaryOpcode
::
normcdf
))
output
<<
endl
<<
"#ifdef _MSC_VER"
<<
endl
...
...
src/DynamicModel.cc
View file @
5e6b8f0a
...
...
@@ -1552,7 +1552,7 @@ DynamicModel::writeDynamicCFile(const string &basename, const int order) const
<<
" * Warning : this file is generated automatically by Dynare"
<<
endl
<<
" * from model file (.mod)"
<<
endl
<<
" */"
<<
endl
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
<<
"#ifdef _MSC_VER"
<<
endl
<<
"#define _USE_MATH_DEFINES"
<<
endl
<<
"#endif"
<<
endl
...
...
src/DynareMain.cc
View file @
5e6b8f0a
...
...
@@ -42,7 +42,7 @@ void main2(stringstream &in, string &basename, bool debug, bool clear_all, bool
WarningConsolidation
&
warnings_arg
,
bool
nostrict
,
bool
stochastic
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
,
FileOutputType
output_mode
,
LanguageOutputType
lang
,
int
params_derivs_order
,
bool
transform_unary_ops
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
,
bool
cygwin
,
bool
msvc
,
bool
mingw
#endif
,
JsonOutputPointType
json
,
JsonFileOutputType
json_output_mode
,
bool
onlyjson
,
bool
jsonderivsimple
...
...
@@ -59,7 +59,7 @@ usage()
<<
" [console] [nograph] [nointeractive] [parallel[=cluster_name]] [conffile=parallel_config_path_and_filename] [parallel_slave_open_mode] [parallel_test]"
<<
" [-D<variable>[=<value>]] [-I/path] [nostrict] [stochastic] [fast] [minimal_workspace] [compute_xrefs] [output=dynamic|first|second|third] [language=julia]"
<<
" [params_derivs_order=0|1|2] [transform_unary_ops]"
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
<<
" [cygwin] [msvc] [mingw]"
#endif
<<
" [json=parse|check|transform|compute] [jsonstdout] [onlyjson] [jsonderivsimple] [nopathchange] [nopreprocessoroutput]"
...
...
@@ -99,7 +99,7 @@ main(int argc, char **argv)
bool
console
=
false
;
bool
nograph
=
false
;
bool
nointeractive
=
false
;
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
bool
cygwin
=
false
;
bool
msvc
=
false
;
bool
mingw
=
false
;
...
...
@@ -180,7 +180,7 @@ main(int argc, char **argv)
nograph
=
true
;
else
if
(
!
strcmp
(
argv
[
arg
],
"nointeractive"
))
nointeractive
=
true
;
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
else
if
(
!
strcmp
(
argv
[
arg
],
"cygwin"
))
cygwin
=
true
;
else
if
(
!
strcmp
(
argv
[
arg
],
"msvc"
))
...
...
@@ -401,7 +401,7 @@ main(int argc, char **argv)
no_tmp_terms
,
no_log
,
no_warn
,
warn_uninit
,
console
,
nograph
,
nointeractive
,
parallel
,
config_file
,
warnings
,
nostrict
,
stochastic
,
check_model_changes
,
minimal_workspace
,
compute_xrefs
,
output_mode
,
language
,
params_derivs_order
,
transform_unary_ops
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
,
cygwin
,
msvc
,
mingw
#endif
,
json
,
json_output_mode
,
onlyjson
,
jsonderivsimple
,
nopreprocessoroutput
...
...
src/DynareMain2.cc
View file @
5e6b8f0a
...
...
@@ -33,7 +33,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
WarningConsolidation
&
warnings
,
bool
nostrict
,
bool
stochastic
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
,
FileOutputType
output_mode
,
LanguageOutputType
language
,
int
params_derivs_order
,
bool
transform_unary_ops
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
,
bool
cygwin
,
bool
msvc
,
bool
mingw
#endif
,
JsonOutputPointType
json
,
JsonFileOutputType
json_output_mode
,
bool
onlyjson
,
bool
jsonderivsimple
...
...
@@ -73,7 +73,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
else
mod_file
->
writeOutputFiles
(
basename
,
clear_all
,
clear_global
,
no_log
,
no_warn
,
console
,
nograph
,
nointeractive
,
config_file
,
check_model_changes
,
minimal_workspace
,
compute_xrefs
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
,
cygwin
,
msvc
,
mingw
#endif
,
nopreprocessoroutput
...
...
src/ModFile.cc
View file @
5e6b8f0a
...
...
@@ -983,7 +983,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
// When check_model_changes is true, don't force compile if MEX is fresher than source
if
(
use_dll
)
{
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
if
(
msvc
)
// MATLAB/Windows + Microsoft Visual C++
mOutputFile
<<
"dyn_mex('msvc', '"
<<
basename
<<
"', "
<<
!
check_model_changes
<<
")"
<<
endl
;
...
...
src/ModFile.hh
View file @
5e6b8f0a
...
...
@@ -163,7 +163,7 @@ public:
void
writeOutputFiles
(
const
string
&
basename
,
bool
clear_all
,
bool
clear_global
,
bool
no_log
,
bool
no_warn
,
bool
console
,
bool
nograph
,
bool
nointeractive
,
const
ConfigFile
&
config_file
,
bool
check_model_changes
,
bool
minimal_workspace
,
bool
compute_xrefs
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
,
bool
cygwin
,
bool
msvc
,
bool
mingw
#endif
,
const
bool
nopreprocessoroutput
...
...
src/StaticModel.cc
View file @
5e6b8f0a
...
...
@@ -1881,7 +1881,7 @@ StaticModel::writeStaticCFile(const string &basename) const
<<
" * Warning : this file is generated automatically by Dynare"
<<
endl
<<
" * from model file (.mod)"
<<
endl
<<
endl
<<
" */"
<<
endl
#if defined(_WIN32) || defined(__CYGWIN32__)
|| defined(__MINGW32__)
#if defined(_WIN32) || defined(__CYGWIN32__)
<<
"#ifdef _MSC_VER"
<<
endl
<<
"#define _USE_MATH_DEFINES"
<<
endl
<<
"#endif"
<<
endl
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment