File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ install-include install the C++ header files
11
11
install-data install data files used by the library
12
12
alltests build the unit test program "alltests"
13
13
test execute unit tests (requires the cxxtest framework)
14
- sdist create source distribution tarball (requires git repo)
14
+ sdist create source distribution tarball from git repository
15
15
16
16
Build configuration variables:
17
17
%s
@@ -68,7 +68,7 @@ vars.Add(PathVariable('datadir',
68
68
env ['prefix' ] + '/share' ,
69
69
PathVariable .PathAccept ))
70
70
vars .Add (BoolVariable ('enable_objcryst' ,
71
- 'enable objcryst support, when installed' , True ))
71
+ 'enable objcryst support, when installed' , None ))
72
72
vars .Update (env )
73
73
env .Help (MY_SCONS_HELP % vars .GenerateHelpText (env ))
74
74
Original file line number Diff line number Diff line change @@ -55,10 +55,18 @@ if not conf.CheckBoostVersion(boost_required):
55
55
# boost_serialization
56
56
configure_boost_library ('boost_serialization' )
57
57
58
- # check for ObjCryst, autoadd appends to LIBS if found.
59
- conf .env ['has_objcryst' ] = (conf .env ['enable_objcryst' ] and
60
- conf .CheckLibWithHeader ('ObjCryst' , 'ObjCryst/ObjCryst/Crystal.h' ,
61
- language = 'C++' , autoadd = True ))
58
+ # ObjCryst - assume a no-objcryst fallback configuration.
59
+ conf .env ['has_objcryst' ] = False
60
+ # Detect ObjCryst and exit with error if requested and not found.
61
+ # By default conf.env does not contain the 'enable_objcryst' key.
62
+ if conf .env .get ('enable_objcryst' , True ):
63
+ conf .env ['has_objcryst' ] = conf .CheckLibWithHeader (
64
+ 'ObjCryst' , 'ObjCryst/ObjCryst/Crystal.h' ,
65
+ language = 'C++' , autoadd = True )
66
+ objcryst_requested = conf .env .get ('enable_objcryst' , False )
67
+ if objcryst_requested and not conf .env ['has_objcryst' ]:
68
+ print ('Adjust compiler paths or build with "enable_objcryst=False".' )
69
+ Exit (1 )
62
70
63
71
env = conf .Finish ()
64
72
You can’t perform that action at this time.
0 commit comments