Skip to content

Commit

Permalink
Added precompiled headers
Browse files Browse the repository at this point in the history
  • Loading branch information
XutaxKamay committed Sep 14, 2024
1 parent 29befa8 commit 9292d41
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
15 changes: 15 additions & 0 deletions game/client/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def configure(conf):
if game not in games.keys():
conf.fatal("Couldn't find game: ", game)

if conf.env.COMPILER_CC != 'msvc':
conf.options.with_pch = True
conf.load('pch')

def build(bld):
game = vpc_parser.parse_vpcs( bld.env, games[bld.env.GAMES], '../..' )

Expand Down Expand Up @@ -79,6 +83,17 @@ def build(bld):

defines.remove('PROTECTED_THINGS_ENABLE')

if bld.env.COMPILER_CC != 'msvc':
bld(features='cxx pch',
target='client-precompiled-headers',
name='client-precompiled-headers',
headers='cbase.h',
includes = includes,
defines = defines,
subsystem = bld.env.MSVC_SUBSYSTEM
)
libs += 'client-precompiled-headers'

bld.shlib(
source = source,
target = PROJECT_NAME,
Expand Down
15 changes: 15 additions & 0 deletions game/server/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def configure(conf):
if game not in games.keys():
conf.fatal("Couldn't find game: ", game)

if conf.env.COMPILER_CC != 'msvc':
conf.options.with_pch = True
conf.load('pch')

def build(bld):
game = vpc_parser.parse_vpcs( bld.env, games[bld.env.GAMES], '../..' )

Expand Down Expand Up @@ -69,6 +73,17 @@ def build(bld):

defines.remove('PROTECTED_THINGS_ENABLE')

if bld.env.COMPILER_CC != 'msvc':
bld(features='cxx pch',
target='server-precompiled-headers',
name='server-precompiled-headers',
headers='cbase.h',
includes = includes,
defines = defines,
subsystem = bld.env.MSVC_SUBSYSTEM
)
libs += 'server-precompiled-headers'

bld.shlib(
source = source,
target = PROJECT_NAME,
Expand Down
12 changes: 6 additions & 6 deletions waf

Large diffs are not rendered by default.

0 comments on commit 9292d41

Please sign in to comment.