Skip to content

Commit

Permalink
Patching $CERTI_SRC/CMakeLists.txt by moving a double quote and avoid…
Browse files Browse the repository at this point in the history
…ing "clang: error: no such file or directory: ';-flat_namespace'". See https://savannah.nongnu.org/bugs/index.php?53964
  • Loading branch information
travis-ci committed Jun 18, 2018
1 parent f3942df commit 069403d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions org/hlacerti/build-certi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ fi
CERTI_SRC=$SRC/certi-4.0.0
if [ ! -f $CERTI_SRC ]; then
git clone -b br_jbch_4.0.0 https://git.savannah.nongnu.org/git/certi.git $CERTI_SRC

echo "Patching $CERTI_SRC/CMakeLists.txt by moving a double quote and avoiding \"clang: error: no such file or directory: ';-flat_namespace'\" "
echo "See https://savannah.nongnu.org/bugs/index.php?53964"

sed -e 's/SET (CMAKE_SHARED_LINKER_FLAGS \${CMAKE_SHARED_LINKER_FLAGS_INIT} "-flat_namespace -undefined suppress"/SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} -flat_namespace -undefined suppress"/' \
-e 's/SET (CMAKE_MODULE_LINKER_FLAGS \${CMAKE_MODULE_LINKER_FLAGS_INIT} "-flat_namespace -undefined suppress"/SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS_INIT} -flat_namespace -undefined suppress"/' \
$CERTI_SRC/CMakeLists.txt > $CERTI_SRC/CMakeLists.txt.tmp

diff $CERTI_SRC/CMakeLists.txt $CERTI_SRC/CMakeLists.txt.tmp
cp $CERTI_SRC/CMakeLists.txt.tmp $CERTI_SRC/CMakeLists.txt
echo ""
fi

OS=`uname -s`
Expand All @@ -48,6 +59,7 @@ case $OS in
sed 's/#include <features.h>//' $CERTI_SRC/libHLA/SemaphorePosix.hh > $CERTI_SRC/libHLA/SemaphorePosix.hh.tmp
diff $CERTI_SRC/libHLA/SemaphorePosix.hh $CERTI_SRC/libHLA/SemaphorePosix.hh.tmp
mv $CERTI_SRC/libHLA/SemaphorePosix.hh.tmp $CERTI_SRC/libHLA/SemaphorePosix.hh
echo ""
;;
*)
echo "You may need to install cmake, flex and bison"
Expand Down

0 comments on commit 069403d

Please sign in to comment.