Changeset 68d3c1b in sasmodels


Ignore:
Timestamp:
Feb 19, 2015 6:06:13 PM (9 years ago)
Author:
pkienzle
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
ab55943
Parents:
f57d123
Message:

use MSVC to build ctypes if vcvarsall has been set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    rafb2c78 r68d3c1b  
    2020elif os.name == 'nt': 
    2121    # make sure vcvarsall.bat is called first in order to set compiler, headers, lib paths, etc. 
    22     ##COMPILER = r'"C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe"' 
    23     # Can't find VCOMP90.DLL (don't know why), so remove openmp support from windows compiler build 
    24     #COMPILE = "cl /nologo /Ox /MD /W3 /GS- /DNDEBUG /Tp%(source)s /link /DLL /INCREMENTAL:NO /MANIFEST /OUT:%(output)s" 
    25     #COMPILE = "cl /nologo /Ox /MD /W3 /GS- /DNDEBUG /Tp%(source)s /openmp /link /DLL /INCREMENTAL:NO /MANIFEST /OUT:%(output)s" 
    26     #COMPILE = "gcc -shared -fPIC -std=c99 -fopenmp -O2 -Wall %(source)s -o %(output)s -lm" 
    27     COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
     22    if "VCINSTALLDIR" in os.environ: 
     23        # MSVC compiler is available, so use it. 
     24        COMPILE = "cl /nologo /Ox /MD /W3 /GS- /DNDEBUG /Tp%(source)s /openmp /link /DLL /INCREMENTAL:NO /MANIFEST /OUT:%(output)s" 
     25        # Can't find VCOMP90.DLL (don't know why), so remove openmp support from windows compiler build 
     26        #COMPILE = "cl /nologo /Ox /MD /W3 /GS- /DNDEBUG /Tp%(source)s /link /DLL /INCREMENTAL:NO /MANIFEST /OUT:%(output)s" 
     27    else: 
     28        #COMPILE = "gcc -shared -fPIC -std=c99 -fopenmp -O2 -Wall %(source)s -o %(output)s -lm" 
     29        COMPILE = "gcc -shared -fPIC -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    2830else: 
    2931    COMPILE = "cc -shared -fPIC -std=c99 -fopenmp -O2 -Wall %(source)s -o %(output)s -lm" 
Note: See TracChangeset for help on using the changeset viewer.