5757class CMakeExtension (Extension ):
5858 def __init__ (self , name ):
5959 # don't invoke the original build_ext for this special extension
60- Extension .__init__ (self , name , sources = [])
60+ Extension .__init__ (self , name , sources = [], optional = True )
6161
6262class TestCommand (Command ):
6363 user_options = []
@@ -77,6 +77,7 @@ def run(self):
7777class build_ext (_build_ext ):
7878 user_options = [('with-boost' , None , 'Use Boost Libraries (OFF)' )
7979 , ('with-gsl' , None , 'Use Gnu Scienfific Library (ON)' )
80+ , ('with-gsl-static' , None , 'Use GNU Scientific Library (static library) (OFF)' )
8081 , ('debug' , None , 'Build moose in debugging mode (OFF)' )
8182 , ('no-build' , None , 'DO NOT BUILD. (for debugging/development)' )
8283 ] + _build_ext .user_options
@@ -85,6 +86,7 @@ def initialize_options(self):
8586 # Initialize options.
8687 self .with_boost = 0
8788 self .with_gsl = 1
89+ self .with_gsl_static = 0
8890 self .debug = 0
8991 self .no_build = 0
9092 self .cmake_options = {}
@@ -99,6 +101,9 @@ def finalize_options(self):
99101 if self .with_boost :
100102 self .cmake_options ['WITH_BOOST' ] = 'ON'
101103 self .cmake_options ['WITH_GSL' ] = 'OFF'
104+ else :
105+ if self .with_gsl_static :
106+ self .cmake_options ['GSL_USE_STATIC_LIBRARIES' ] = 'ON'
102107 if self .debug :
103108 self .cmake_options ['CMAKE_BUILD_TYPE' ] = 'Debug'
104109 else :
@@ -157,6 +162,6 @@ def build_cmake(self, ext):
157162 , os .path .join ('chemUtil' , 'rainbow2.pkl' )
158163 ]
159164 },
160- ext_modules = [CMakeExtension ('pymoose ' )],
165+ ext_modules = [CMakeExtension ('' )],
161166 cmdclass = {'build_ext' : build_ext , 'test' : TestCommand },
162167)
0 commit comments