Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
262a0eb7
Commit
262a0eb7
authored
Oct 30, 2016
by
Praetorius, Simon
Browse files
workaround for windows macro definitions
parent
f9fd642d
Pipeline
#603
passed with stages
in 85 minutes and 16 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
AMDiS/cmake/muparser.cmake
View file @
262a0eb7
...
...
@@ -18,7 +18,7 @@ include_directories(${MUPARSER_INCLUDE_DIR})
if
(
ENABLE_CXX11
)
add_definitions
(
-D
MUPARSER
_HAS_CXX11=1
)
add_definitions
(
-D
AMDIS
_HAS_CXX11=1
)
endif
(
ENABLE_CXX11
)
# specify how to install this target:
...
...
AMDiS/cmake3/muparser.cmake
View file @
262a0eb7
...
...
@@ -18,7 +18,7 @@ target_include_directories(muparser PUBLIC ${MUPARSER_INCLUDE_DIR})
if
(
ENABLE_CXX11
)
target_enable_cxx11
(
MUPARSER_ENABLE_CXX11 muparser PRIVATE
)
target_compile_definitions
(
muparser PRIVATE
MUPARSER
_HAS_CXX11=1
)
target_compile_definitions
(
muparser PRIVATE
AMDIS
_HAS_CXX11=1
)
endif
(
ENABLE_CXX11
)
# specify how to install this target:
...
...
AMDiS/lib/muparser_v134/include/muParserBase.h
View file @
262a0eb7
...
...
@@ -262,7 +262,7 @@ private:
mutable
stringbuf_type
m_vStringBuf
;
///< String buffer, used for storing string function arguments
stringbuf_type
m_vStringVarBuf
;
#if
MUPARSER
_HAS_CXX11
#if
AMDIS
_HAS_CXX11
std
::
unique_ptr
<
token_reader_type
>
m_pTokenReader
;
///< Managed pointer to the token reader object.
#else
std
::
auto_ptr
<
token_reader_type
>
m_pTokenReader
;
///< Managed pointer to the token reader object.
...
...
AMDiS/lib/muparser_v134/include/muParserToken.h
View file @
262a0eb7
...
...
@@ -78,7 +78,7 @@ namespace mu
TString
m_strTok
;
///< Token string
TString
m_strVal
;
///< Value for string variables
value_type
m_fVal
;
#if
MUPARSER
_HAS_CXX11
#if
AMDIS
_HAS_CXX11
std
::
unique_ptr
<
ParserCallback
>
m_pCallback
;
#else
std
::
auto_ptr
<
ParserCallback
>
m_pCallback
;
...
...
AMDiS/lib/muparser_v134/src/muParserTest.cpp
View file @
262a0eb7
...
...
@@ -1040,7 +1040,7 @@ namespace mu
try
{
#if
MUPARSER
_HAS_CXX11
#if
AMDIS
_HAS_CXX11
std
::
unique_ptr
<
Parser
>
p1
;
#else
std
::
auto_ptr
<
Parser
>
p1
;
...
...
AMDiS/lib/muparser_v134/src/muParserTokenReader.cpp
View file @
262a0eb7
...
...
@@ -145,7 +145,7 @@ namespace mu
*/
ParserTokenReader
*
ParserTokenReader
::
Clone
(
ParserBase
*
a_pParent
)
const
{
#if
MUPARSER
_HAS_CXX11
#if
AMDIS
_HAS_CXX11
std
::
unique_ptr
<
ParserTokenReader
>
ptr
(
new
ParserTokenReader
(
*
this
));
#else
std
::
auto_ptr
<
ParserTokenReader
>
ptr
(
new
ParserTokenReader
(
*
this
));
...
...
AMDiS/src/config/Config_msc.h
View file @
262a0eb7
...
...
@@ -57,6 +57,14 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
#undef min
#endif
#ifdef NONE
#undef NONE
#endif
#ifdef THIS
#undef THIS
#endif
#if MSC_VERSION >= 1800 && !defined(HAS_VARIADIC_TEMPLATES)
#define HAS_VARIADIC_TEMPLATES 1
#endif
...
...
AMDiS/src/io/detail/Arh3Writer.cc
View file @
262a0eb7
...
...
@@ -140,7 +140,7 @@ namespace AMDiS { namespace io {
macroFilename
+
';'
+
perFilename
;
macroFile_nl
=
macroFile
.
length
();
}
else
if
(
writeMacro
==
Macroformat
::
THIS
)
{
}
else
if
(
writeMacro
==
Macroformat
::
SELF
)
{
macroFile_nl
=
13
;
readFileToString
(
macroFilename
,
macroData
);
...
...
@@ -163,7 +163,7 @@ namespace AMDiS { namespace io {
}
// write macro and periodic file
if
(
writeMacro
==
Macroformat
::
THIS
&&
macroFilename
.
length
())
{
if
(
writeMacro
==
Macroformat
::
SELF
&&
macroFilename
.
length
())
{
file
.
seekp
(
0
,
ios_base
::
end
);
long
macroPos
=
file
.
tellp
(),
perPos
=
0
;
file
.
write
(
macroData
.
c_str
(),
macroData
.
length
());
...
...
@@ -354,7 +354,7 @@ namespace AMDiS { namespace io {
macroFilename
+
';'
+
perFilename
;
macroFile_nl
=
macroFile
.
length
();
}
else
if
(
writeMacro
==
Macroformat
::
THIS
)
{
}
else
if
(
writeMacro
==
Macroformat
::
SELF
)
{
macroFile_nl
=
perFilename
.
length
()
?
27
:
13
;
macroFile
.
resize
(
macroFile_nl
,
' '
);
}
...
...
@@ -604,7 +604,7 @@ namespace AMDiS { namespace io {
//reset the macro positions in file
setMacrosPos
(
file
,
headerLen
,
macroSize
);
if
(
writeMacro
==
Macroformat
::
THIS
)
if
(
writeMacro
==
Macroformat
::
SELF
)
setMacroFile
(
file
,
headerLen
,
mesh
,
writeMacro
);
file
.
close
();
...
...
@@ -634,8 +634,8 @@ namespace AMDiS { namespace io {
{
FUNCNAME
(
"setMacroFile()"
);
TEST_EXIT
(
writeMacro
==
Macroformat
::
THIS
)
(
"This function should only be called under Macroformat::
THIS
.
\n
"
);
TEST_EXIT
(
writeMacro
==
Macroformat
::
SELF
)
(
"This function should only be called under Macroformat::
SELF
.
\n
"
);
string
macroFilename
=
""
,
perFilename
=
""
;
string
macroData
=
""
,
periodicData
=
""
;
...
...
AMDiS/src/io/detail/Arh3Writer.h
View file @
262a0eb7
...
...
@@ -27,7 +27,7 @@ namespace AMDiS { namespace io {
typedef
enum
{
NONE
=
0
,
// no macro
PT_MACROFILE
=
1
,
// pointer to macro file
THIS
=
2
// pointer to this file, at the end of this file
SELF
=
2
// pointer to this file, at the end of this file
}
Value
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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