mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add compilation test script
This commit is contained in:
29
scripts/compile.sh
Executable file
29
scripts/compile.sh
Executable 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
|
||||
Reference in New Issue
Block a user