diff --git a/src/cpp/SConscript b/src/cpp/SConscript index b732c31..f3c0f80 100644 --- a/src/cpp/SConscript +++ b/src/cpp/SConscript @@ -16,46 +16,6 @@ cppenv = env.Clone() headers = cppenv.Glob('*.h*') includes = cppenv.Install(os.path.join(cppenv['PREFIX'], "include", "clanglite"), headers) - -GchShAction = SCons.Action.Action('$GCHSHCOM', '$GCHSHCOMSTR') - -def gen_suffix(env, sources): - return sources[0].get_suffix() + env['GCHSUFFIX'] - -GchShBuilder = SCons.Builder.Builder(action = GchShAction, - source_scanner = SCons.Scanner.C.CScanner(), - suffix = gen_suffix) - -def shared_pch_emitter(target,source,env): - SCons.Defaults.SharedObjectEmitter( target, source, env ) - - scanner = SCons.Scanner.C.CScanner() - path = scanner.path(env) - deps = scanner(source[0], env, path) - - if env.get('GchSh'): - if env['GchSh'].path.strip('.gch') in [x.path for x in deps]: - env.Depends(target, env['GchSh']) - return (target, source) - -env.Append(BUILDERS = { - 'gchsh': env.Builder( - action = GchShAction, - target_factory = env.fs.File, - ), - }) - -bldsh = GchShBuilder -env['BUILDERS']['GchSh'] = bldsh - -env['GCHSHCOM'] = '$CXX -o $TARGET -x c++-header -c $SHCXXFLAGS $_CCCOMCOM $SOURCE' -env['GCHSUFFIX'] = '.gch' - -for suffix in SCons.Util.Split('.c .C .cc .cxx .cpp .c++'): - env['BUILDERS']['SharedObject'].add_emitter(suffix, shared_pch_emitter) - -env['GchSh'] = env.GchSh(includes)[0] - Alias("cpp", includes) Alias("build", includes)