Skip to content

Commit

Permalink
Set cflags
Browse files Browse the repository at this point in the history
  • Loading branch information
iMichka committed Dec 12, 2016
1 parent 3b3528d commit cb22589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,17 @@ before_install:

# Patch the c++ version to test on the fly
- if [[ $CPPSTD == "-std=c++03" ]]; then
cd unittests && sed -i s%compiler=compiler,%compiler=compiler,\\n\ \ \ \ \ \ \ \ cflags=\"-std=c++03\",%g autoconfig.py && cd ..;
cd unittests && sed -i s%cflags=cflags,%cflags=\"-std=c++03\",%g autoconfig.py && cd ..;
fi

# Patch the c++ version to test on the fly
- if [[ $CPPSTD == "-std=c++11" ]]; then
cd unittests && sed -i s%compiler=compiler,%compiler=compiler,\\n\ \ \ \ \ \ \ \ cflags=\"-std=c++11\",%g autoconfig.py && cd ..;
cd unittests && sed -i s%cflags=cflags,%cflags=\"-std=c++11\",%g autoconfig.py && cd ..;
fi

# Patch the c++ version to test on the fly
- if [[ $CPPSTD == "-std=c++14" ]]; then
cd unittests && sed -i s%compiler=compiler,%compiler=compiler,\\n\ \ \ \ \ \ \ \ cflags=\"-std=c++14\",%g autoconfig.py && cd ..;
cd unittests && sed -i s%cflags=cflags,%cflags=\"-std=c++14\",%g autoconfig.py && cd ..;
fi

# Patch the compiler path on the fly for gcc5 testing
Expand Down
3 changes: 3 additions & 0 deletions unittests/autoconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,21 @@
class cxx_parsers_cfg(object):
compiler = None
compiler_path = None
cflags = None
if os.name == "nt":
compiler = "msvc"
compiler_path = os.path.normpath(
"C:/Program Files (x86)/Microsoft Visual Studio 14.0" +
"/VC/vcvarsall.bat")
cflags = "-std=c++03"

gccxml = pygccxml.parser.load_xml_generator_configuration(
'xml_generator.cfg',
xml_generator_path=generator_path,
working_directory=data_directory,
compiler=compiler,
compiler_path=compiler_path,
cflags=cflags,
xml_generator=generator_name)

if generator_name == 'gccxml':
Expand Down

0 comments on commit cb22589

Please sign in to comment.