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

Leandro Moreno leandro.moreno at tallertechnologies.com
Thu Jan 16 08:51:48 EST 2014


Hello Delbert.

I work for fbuild (https://bitbucket.org/fudepan/fudepan-build) that is an
extension of SCons. And We have support for gtest and gmock. Check this
file, and you'll see how is installed:

https://bitbucket.org/fudepan/fudepan-build/src/5a477c630b488a9989d8101e030c3b0838c43668/conf/external_dependencies.xml?at=default#cl-143

And after install It. Fbuild pass the libraies with -l flag.

Hope that my answer be helpful.


On Thu, Jan 16, 2014 at 10:34 AM, delbert dev <delbertum at gmail.com> wrote:


> 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?

>

>

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>



--
<http://www.tallertechnologies.com>
Leandro Moreno
Intern Engineer

San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina

Phone: +54 351 4217888 / +54 351 4218211
Skype: letossgm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140116/34a85f5b/attachment.htm


More information about the Scons-users mailing list