[Scons-users] Building gtest/gmock in scons (linux/windows)

delbert dev delbertum at gmail.com
Thu Jan 16 08:34:04 EST 2014


I need to build gtest/gmock for our cpp unittests. I have read that they
recommend that gtest/gmock is build from source each time the unittests are
build/run:

https://code.google.com/p/googletest/wiki/FAQ#Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog

I have downloaded the 1.7.0 source release here:

https://code.google.com/p/googletest/downloads/list

extracted and checked it into my git repo (approx 5.2 MB). I need to
build/run my tests on debian, win7, solaris and ubuntu.

I see two approaches:

1) Either run ./configure && make as a post step in my SConscript using
e.g. a env.Command builder.

or:

2) Follow these instructions:
https://code.google.com/p/googletest/wiki/V1_7_Primer#Setting_up_a_New_Test_Project

so something like:
Program('src/gtest-all.cc')

"with GTEST_ROOT and GTEST_ROOT/include in the header search path,
where GTEST_ROOT is the Google Test root directory."


Anyone having experience with building gtest for cpp unittests in
SCons and have some comments for the above suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140116/33fb5c4a/attachment.html


More information about the Scons-users mailing list