[Scons-users] Problem with include path (CPPPATH)

delbert dev delbertum at gmail.com
Mon Jan 20 13:04:14 EST 2014


No I don't use: VariantDir. But its really strange. I have found out that
if I specify this folder (in the below script):

thirdpartyPath = "/home/user/samples/compare/parent/build/64gccdb*/*
3rdparty/"

instead of:

thirdpartyPath = "/home/user/samples/compare/parent/build/*64gccdbg*
/3rdparty/"

it works. Notice that the only difference is the trailing *g *(which gives
the before mentioned warnings). See below:


# Fails with this folder
thirdpartyPath = "/home/user/samples/compare/parent/build/*64gccdbg*
/3rdparty/"

# Works with this folder
#thirdpartyPath = "/home/user/samples/compare/parent/build/*64gccdb*
/3rdparty/"
# And this:
#thirdpartyPath = "/home/user/samples/compare/parent/build/sub/3rdparty/"

gtestUrl = buildUrl('com.google', 'gtest', '1.7.0', 'zip')
gtestOutputFile = os.path.join(thirdpartyPath, 'gtest-1.7.0.zip')
downloadFile(gtestUrl, gtestOutputFile)
unzip(gtestOutputFile,thirdpartyPath)

# Download, extract and build gmock
gmockUrl = buildUrl('com.google', 'gmock', '1.7.0', 'zip')
gmockOutputFile = os.path.join(thirdpartyPath, 'gmock-1.7.0.zip')
downloadFile(gmockUrl, gmockOutputFile)
unzip(gmockOutputFile,thirdpartyPath)


csGtestFlags = str(env['CCFLAGS']).replace(' -Werror', '')
env.Replace(CCFLAGS = csGtestFlags)

gTestIncludes = [os.path.join(thirdpartyPath, 'gtest-1.7.0/'),
os.path.join(thirdpartyPath, 'gtest-1.7.0', 'include/'),
os.path.join(thirdpartyPath, 'gmock-1.7.0/'),
os.path.join(thirdpartyPath, 'gmock-1.7.0', 'include/')]

env.Append(CPPPATH = gTestIncludes)
buildGtest = env.Library(thirdpartyPath + "/libs/libgtest",
thirdpartyPath + "/gtest-1.7.0/src/gtest-all.cc")

Default(env.Alias('3rdparty', buildGtest))




Any ideas what is going on??




On Mon, Jan 20, 2014 at 3:31 PM, Gary Oberbrunner <garyo at oberbrunner.com>wrote:


> On Mon, Jan 20, 2014 at 9:25 AM, delbert dev <delbertum at gmail.com> wrote:

> ...

> > But I get:

> >

> >

> > g++ -o /home/user/test/gtest-1.7.0/src/gtest-all.o -c -pthread ...

> > ...

> > -I/home/user/test/gtest-1.7.0 -Itest001/gtest-1.7.0

> > ...

> >

> > Why is :

> >

> > -Itest001/gtest-1.7.0

> >

> > also on the include path? Are there some implicit rules for what is

> added to

> > the CPPPATH?

> >

>

> Are you using VariantDir? If not, it's probably something else in your

> script. (I assume the above is not the complete script.)

>

> --

> Gary

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

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

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140120/ee691079/attachment.html


More information about the Scons-users mailing list