Skip to content

Commit

Permalink
Squashed 'externals/coda-oss/' changes from 026c665..8499ef8
Browse files Browse the repository at this point in the history
8499ef8 Merge pull request #258 from mdaus/solarisC99
d9c0160 Compile solaris with c99
bbf8be1 Merge pull request #257 from mdaus/python_three_output
91dbc11 build/build.py
a142cd8 Merge pull request #256 from mdaus/sys-datetime-python
848e80c Commiting the swig generated code for the sys changes
f7d95d4 Exposing the UTCDateTime class to python

git-subtree-dir: externals/coda-oss
git-subtree-split: 8499ef8d3db879dc737fd17096ec99432a42329e
  • Loading branch information
JonathanMeans committed May 17, 2018
1 parent 6bd6ade commit a4c22ea
Show file tree
Hide file tree
Showing 4 changed files with 722 additions and 13 deletions.
14 changes: 11 additions & 3 deletions build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,9 @@ def configureCompilerOptions(self):
config['cc']['optz_fastest'] = '-xO5'
self.env['CFLAGS_cshlib'] = ['-KPIC', '-DPIC']

self.env.append_value('CFLAGS', '-KPIC'.split())
# C99 is required for Solaris to be compatible with
# macros that openjpeg sets
self.env.append_value('CFLAGS', ['-KPIC', '-xc99=all'])
self.env.append_value('CFLAGS_THREAD', '-mt')

elif re.match(winRegex, sys_platform):
Expand Down Expand Up @@ -1711,7 +1713,10 @@ def getSolarisFlags(compilerName):

def gccHasCpp11():
try:
output = subprocess.check_output("g++ --help=c++", stderr=subprocess.STDOUT, shell=True)
output = subprocess.check_output("g++ --help=c++",
stderr=subprocess.STDOUT,
shell=True,
universal_newlines=True)
except subprocess.CalledProcessError:
# If gcc is too old for --help=, then it is too old for C++11
return False
Expand All @@ -1722,7 +1727,10 @@ def gccHasCpp11():

def iccHasCpp11():
try:
output = subprocess.check_output("icpc -help", stderr=subprocess.STDOUT, shell=True)
output = subprocess.check_output("icpc -help",
stderr=subprocess.STDOUT,
shell=True,
universal_newlines=True)
except subprocess.CalledProcessError:
# If icc is too old for -help, then it is too old for C++11
return False
Expand Down
50 changes: 48 additions & 2 deletions modules/python/sys/source/generated/coda_sys.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,54 @@ def alignedAlloc(*args):
def alignedFree(p):
"""alignedFree(void * p)"""
return _coda_sys.alignedFree(p)
# This file is compatible with both classic and new-style classes.

class UTCDateTime(_object):
"""Proxy of C++ sys::UTCDateTime class."""

__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, UTCDateTime, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, UTCDateTime, name)
__repr__ = _swig_repr

def __init__(self, *args):
"""
__init__(sys::UTCDateTime self) -> UTCDateTime
__init__(sys::UTCDateTime self, int hour, int minute, double second) -> UTCDateTime
__init__(sys::UTCDateTime self, int year, int month, int day) -> UTCDateTime
__init__(sys::UTCDateTime self, int year, int month, int day, int hour, int minute, double second) -> UTCDateTime
__init__(sys::UTCDateTime self, double timeInMillis) -> UTCDateTime
__init__(sys::UTCDateTime self, std::string const & time, std::string const & format) -> UTCDateTime
__init__(sys::UTCDateTime self, std::string const & time) -> UTCDateTime
"""
this = _coda_sys.new_UTCDateTime(*args)
try:
self.this.append(this)
except __builtin__.Exception:
self.this = this

def format(self, *args):
"""
format(UTCDateTime self)
format(UTCDateTime self) -> std::string
"""
return _coda_sys.UTCDateTime_format(self, *args)

__swig_destroy__ = _coda_sys.delete_UTCDateTime
__del__ = lambda self: None
UTCDateTime_swigregister = _coda_sys.UTCDateTime_swigregister
UTCDateTime_swigregister(UTCDateTime)
cvar = _coda_sys.cvar
SSE_INSTRUCTION_ALIGNMENT = cvar.SSE_INSTRUCTION_ALIGNMENT
UTCDateTime.DEFAULT_DATETIME_FORMAT = _coda_sys.cvar.UTCDateTime_DEFAULT_DATETIME_FORMAT


def __lshift__(os, dateTime):
"""__lshift__(std::ostream & os, UTCDateTime dateTime) -> std::ostream &"""
return _coda_sys.__lshift__(os, dateTime)

def __rshift__(arg1, dateTime):
"""__rshift__(std::istream & arg1, UTCDateTime dateTime) -> std::istream &"""
return _coda_sys.__rshift__(arg1, dateTime)
# This file is compatible with both classic and new-style classes.


Loading

0 comments on commit a4c22ea

Please sign in to comment.