Changeset b2f1d2f in sasmodels
- Timestamp:
- Apr 7, 2017 10:17:35 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3a45c2c, 41709dc
- Parents:
- dbfd471
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kerneldll.py
r886fa25 rb2f1d2f 97 97 98 98 if "SAS_COMPILER" in os.environ: 99 compiler= os.environ["SAS_COMPILER"]99 COMPILER = os.environ["SAS_COMPILER"] 100 100 elif os.name == 'nt': 101 # If vcvarsall.bat has been called, then VCINSTALLDIR is in the environment102 # and we can use the MSVC compiler. Otherwise, if tinycc is available103 # the use it. Otherwise, hope that mingw is available.104 if "VCINSTALLDIR" in os.environ:105 compiler = "msvc"106 elif tinycc:107 compiler = "tinycc"101 if tinycc is not None: 102 COMPILER = "tinycc" 103 elif "VCINSTALLDIR" in os.environ: 104 # If vcvarsall.bat has been called, then VCINSTALLDIR is in the environment 105 # and we can use the MSVC compiler. Otherwise, if tinycc is available 106 # the use it. Otherwise, hope that mingw is available. 107 COMPILER = "msvc" 108 108 else: 109 compiler= "mingw"109 COMPILER = "mingw" 110 110 else: 111 compiler= "unix"111 COMPILER = "unix" 112 112 113 113 ARCH = "" if ct.sizeof(ct.c_void_p) > 4 else "x86" # 4 byte pointers on x86 114 if compiler== "unix":114 if COMPILER == "unix": 115 115 # Generic unix compile 116 116 # On mac users will need the X code command line tools installed … … 123 123 """unix compiler command""" 124 124 return CC + [source, "-o", output, "-lm"] 125 elif compiler== "msvc":125 elif COMPILER == "msvc": 126 126 # Call vcvarsall.bat before compiling to set path, headers, libs, etc. 127 127 # MSVC compiler is available, so use it. OpenMP requires a copy of … … 139 139 """MSVC compiler command""" 140 140 return CC + ["/Tp%s"%source] + LN + ["/OUT:%s"%output] 141 elif compiler== "tinycc":141 elif COMPILER == "tinycc": 142 142 # TinyCC compiler. 143 143 CC = [tinycc.TCC] + "-shared -rdynamic -Wall".split() … … 145 145 """tinycc compiler command""" 146 146 return CC + [source, "-o", output] 147 elif compiler== "mingw":147 elif COMPILER == "mingw": 148 148 # MinGW compiler. 149 149 CC = "gcc -shared -std=c99 -O2 -Wall".split()
Note: See TracChangeset
for help on using the changeset viewer.