Add compilation test script

This commit is contained in:
Vinnie Falco
2013-09-27 17:13:36 -07:00
parent cc05ce19f9
commit 0b7574ba00
34 changed files with 343 additions and 241 deletions

29
scripts/compile.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# This script makes sure that every directly includable header
# file compiles stand-alone for all supported platforms.
#
for f in $1/*.h $1/*/*.h
do
{
echo "Compilng '$f'"
g++ -xc++ - -c -o /dev/null <<EOF
#define BEAST_BEASTCONFIG_H_INCLUDED
#include "$f"
EOF
g++ -xc++ -std=c++11 - -c -o /dev/null <<EOF
#define BEAST_BEASTCONFIG_H_INCLUDED
#include "$f"
EOF
}
done
for f in $1/*/*.cpp
do
{
echo "Compilng '$f'"
g++ -xc++ -I$1/../scripts/ "$f" -c -o /dev/null
g++ -xc++ -std=c++11 -I$1/../scripts/ "$f" -c -o /dev/null
}
done