Changeset 984 for trunk

Show
Ignore:
Timestamp:
07/15/11 11:10:59 (10 months ago)
Author:
mhull
Message:

Adjust nrnivmodl call for NMODL building, so that
we can globally decided to link against gsl or not.
This is needed because gsl is not yet in the trunk.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/neuron/nineml.py

    r981 r984  
    104104    #write_nmodl(xml_file, weight_variables) # weight variables should really come from xml file 
    105105 
     106 
    106107    print "Running 'nrnivmodl' from %s"%NMODL_DIR 
    107     p = subprocess.check_call(["nrnivmodl"]) 
     108 
     109 
     110    import nineml 
     111    if nineml.utility.settings.enable_nmodl_gsl: 
     112        flgs = ["-L%s"% nineml.utility.LocationMgr().getNRNIVMODLNINEMLDir(), 
     113                "-lninemlnrn -lgsl -lgslcblas"] 
     114        subprocess.check_call(['nrnivmodl','-loadflags','"%s"'%(' '.join(flgs) ) ] ) 
     115    else: 
     116        subprocess.check_call(['nrnivmodl',] ) 
     117 
     118 
     119 
    108120    os.chdir(cwd) 
    109121    neuron.load_mechanisms(NMODL_DIR)