forked from github/server
add an easy configuration script
update core and cmake submodules to latest version now using lua 5.2 now using bool where available
This commit is contained in:
parent
8239c492ec
commit
f19f4b3037
2
cmake
2
cmake
|
@ -1 +1 @@
|
||||||
Subproject commit 8cbbeef52b5807bdec52369322cbc9f21d5ed621
|
Subproject commit dcc663a7a08072b8a1ba0525b182b798c577ccf9
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
MACHINE=`uname -m`
|
||||||
|
BIN_DIR="build-$MACHINE-Debug"
|
||||||
|
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||||
|
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||||
|
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||||
|
[ -z "$JOBS" ] && JOBS=1
|
||||||
|
|
||||||
|
DISTCC=`which distcc`
|
||||||
|
if [ ! -z "$DISTCC" ] ; then
|
||||||
|
JOBS=`distcc -j`
|
||||||
|
if [ -z "$JOBS" ] ; then
|
||||||
|
JOBS=1
|
||||||
|
elif [ $JOBS -gt 1 ] ; then
|
||||||
|
CC="distcc $CC"
|
||||||
|
MAKEOPTS=-j$JOBS
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Building with $CC and $JOBS jobs"
|
||||||
|
|
||||||
|
mkdir -p $BIN_DIR
|
||||||
|
cd $BIN_DIR
|
||||||
|
CC="$CC" cmake .. -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
make -j$JOBS
|
||||||
|
make test
|
||||||
|
cd ../game
|
||||||
|
ln -sf ../$BIN_DIR/server/server
|
||||||
|
./server -e run_tests
|
2
eressea
2
eressea
|
@ -1 +1 @@
|
||||||
Subproject commit 457c111da2ffda54ac1ff3e7758f5ba0ccc5bc26
|
Subproject commit 79feb5723c075a45a1a94ed286c87993314ce8da
|
|
@ -1,7 +1,14 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project (server C)
|
project (server C)
|
||||||
|
|
||||||
find_package (Lua51 REQUIRED)
|
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
||||||
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
|
||||||
|
ELSE(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
MESSAGE(STATUS "Unknown compiler ${CMAKE_C_COMPILER_ID}")
|
||||||
|
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
|
||||||
|
find_package (Lua 5 REQUIRED)
|
||||||
find_package (LibXml2 REQUIRED)
|
find_package (LibXml2 REQUIRED)
|
||||||
find_package (SQLite3 REQUIRED)
|
find_package (SQLite3 REQUIRED)
|
||||||
find_package (ToLua REQUIRED)
|
find_package (ToLua REQUIRED)
|
||||||
|
|
Loading…
Reference in New Issue