Skip to content

Commit

Permalink
Strip down Scons build of googletest and googlemock
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jan 13, 2020
1 parent 9e6b800 commit 611e986
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
9 changes: 1 addition & 8 deletions lib/googletest-1.8.x/googlemock/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@ env.Prepend(CPPPATH = ['.', '../include'])

# Sources used by base library and library that includes main.
gmock_source = 'src/gmock-all.cc'
gmock_main_source = 'src/gmock_main.cc'

# gmock.lib to be used by most apps (if you have your own main
# function)
gmock = env.StaticLibrary(target='gmock',
source=[gmock_source])

# gmock_main.lib can be used if you just want a basic main function;
# it is also used by the tests for Google Test itself.
gmock_main = env.StaticLibrary(target='gmock_main',
source=[gmock_source, gmock_main_source])
gmock = env.StaticLibrary(target='gmock', source=gmock_source)
24 changes: 1 addition & 23 deletions lib/googletest-1.8.x/googletest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,7 @@ env.Prepend(CPPPATH = ['.', '../include'])

# Sources used by base library and library that includes main.
gtest_source = 'src/gtest-all.cc'
gtest_main_source = 'src/gtest_main.cc'

# gtest.lib to be used by most apps (if you have your own main
# function)
gtest = env.StaticLibrary(target='gtest',
source=[gtest_source])

# gtest_main.lib can be used if you just want a basic main function;
# it is also used by the tests for Google Test itself.
gtest_main = env.StaticLibrary(target='gtest_main',
source=[gtest_source, gtest_main_source])

env_with_exceptions = env.Clone()
platform = env_with_exceptions['PLATFORM']
if platform == 'win32':
env_with_exceptions.Append(CCFLAGS = ['/EHsc'])
env_with_exceptions.Append(CPPDEFINES = '_HAS_EXCEPTIONS=1')

gtest_ex_obj = env_with_exceptions.Object(target='gtest_ex',
source=gtest_source)
gtest_main_ex_obj = env_with_exceptions.Object(target='gtest_main_ex',
source=gtest_main_source)

gtest_ex_main = env_with_exceptions.StaticLibrary(
target='gtest_ex_main',
source=gtest_ex_obj + gtest_main_ex_obj)
gtest = env.StaticLibrary(target='gtest', source=gtest_source)

0 comments on commit 611e986

Please sign in to comment.