Skip to content

Commit

Permalink
Add auto download cereal library support
Browse files Browse the repository at this point in the history
Change-Id: Iab0fe5ca9c64849d215dfcf1ec99a4f834cb26f8
Signed-off-by: Caiwen Zhang<[email protected]>
Reviewed-on: https://gerrit.iotivity.org/gerrit/328
Tested-by: jenkins-iotivity <[email protected]>
Reviewed-by: Sashi Penta <[email protected]>
Reviewed-by: Patrick Lankswert <[email protected]>
  • Loading branch information
caiwenzh authored and Patrick Lankswert committed Feb 12, 2015
1 parent 529bb98 commit 2f1a2e9
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions extlibs/cereal/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,24 @@ cur = src_dir + '/extlibs/cereal/cereal/include'

# check 'cereal' library, if it doesn't exits, ask user to download it
if not os.path.exists(old) and not os.path.exists(cur):
print '''
cereal_env = Environment(ENV = os.environ)
c = cereal_env.Action(['git clone https://github.com/USCiLab/cereal.git cereal',
'cd cereal && git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 && git apply ../../../resource/patches/cereal_gcc46.patch',
])

print 'Downloading cereal library ...'
if cereal_env.Execute(c):
print '''
*********************************** Error: ************************************
* 'Cereal' library doesn't exist. please download cereal to extlibs directory*
* add apply the patch as following: *
* Please download cereal and apply the patch as following: *
* $ git clone https://github.com/USCiLab/cereal.git extlibs/cereal/cereal *
* $ cd extlibs/cereal/cereal *
* $ git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 *
* $ git apply ../../../resource/patches/cereal_gcc46.patch *
*******************************************************************************
'''
Exit(1)
else:
env.AppendUnique(CPPPATH = [old, cur])
Exit(1)
else:
print 'Download cereal library complete'

env.AppendUnique(CPPPATH = [old, cur])

0 comments on commit 2f1a2e9

Please sign in to comment.