Change file structure
This commit is contained in:
parent
673ca99e36
commit
d07a9b94cf
12
.gitmodules
vendored
12
.gitmodules
vendored
@ -1,9 +1,9 @@
|
|||||||
[submodule "src/sol"]
|
[submodule "libs/sol"]
|
||||||
path = src/sol
|
path = libs/sol
|
||||||
url = https://github.com/ThePhD/sol2.git
|
url = https://github.com/ThePhD/sol2.git
|
||||||
[submodule "tests/gtest"]
|
[submodule "libs/gtest"]
|
||||||
path = tests/gtest
|
path = libs/gtest
|
||||||
url = https://github.com/google/googletest.git
|
url = https://github.com/google/googletest.git
|
||||||
[submodule "lua-tests/luaunit"]
|
[submodule "libs/luaunit"]
|
||||||
path = lua-tests/luaunit
|
path = libs/luaunit
|
||||||
url = https://github.com/bluebird75/luaunit
|
url = https://github.com/bluebird75/luaunit
|
||||||
|
|||||||
@ -29,7 +29,7 @@ matrix:
|
|||||||
- cmake -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" ..
|
- cmake -DLUA_INCLUDE_DIR="/usr/include/lua5.2" -DLUA_LIBRARY="/usr/lib/x86_64-linux-gnu/liblua5.2.so" ..
|
||||||
- make -j4 all && make install
|
- make -j4 all && make install
|
||||||
- ./tests
|
- ./tests
|
||||||
- cd ../lua-tests/ && ./run_tests.lua
|
- ./run_tests.lua
|
||||||
# Mac OS X / Clang 3.8
|
# Mac OS X / Clang 3.8
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
os: osx
|
os: osx
|
||||||
@ -42,4 +42,4 @@ matrix:
|
|||||||
- mkdir build_dir && cd build_dir
|
- mkdir build_dir && cd build_dir
|
||||||
- cmake .. && make -j4 all && make install
|
- cmake .. && make -j4 all && make install
|
||||||
- ./tests
|
- ./tests
|
||||||
- cd ../lua-tests && ./run_tests.lua
|
- ./run_tests.lua
|
||||||
|
|||||||
@ -8,11 +8,10 @@ if (NOT LUA_INCLUDE_DIR OR NOT LUA_LIBRARY)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(src src/sol/single/sol ${LUA_INCLUDE_DIR})
|
include_directories(src/cpp libs/sol/single/sol ${LUA_INCLUDE_DIR})
|
||||||
|
|
||||||
FILE(GLOB SOURCES src/*.cpp src/*.h)
|
FILE(GLOB SOURCES src/cpp/*.cpp src/cpp/*.h)
|
||||||
|
FILE(GLOB LUA_SOURCES src/lua/*.lua)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build)
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# Supress warning CMP0042
|
# Supress warning CMP0042
|
||||||
@ -31,8 +30,9 @@ set_target_properties(effil PROPERTIES COMPILE_FLAGS "${ENABLE_WARNINGS} ${GENER
|
|||||||
# TESTS ---
|
# TESTS ---
|
||||||
#----------
|
#----------
|
||||||
|
|
||||||
FILE(GLOB TEST_SOURCES tests/*.cpp)
|
FILE(GLOB TEST_SOURCES tests/cpp/*.cpp tests/cpp/*.h)
|
||||||
set(GTEST_DIR tests/gtest/googletest)
|
FILE(GLOB LUA_TEST_SOURCES tests/lua/*.lua)
|
||||||
|
set(GTEST_DIR libs/gtest/googletest)
|
||||||
|
|
||||||
include_directories(${GTEST_DIR}/include ${GTEST_DIR})
|
include_directories(${GTEST_DIR}/include ${GTEST_DIR})
|
||||||
add_executable(tests ${TEST_SOURCES} ${GTEST_DIR}/src/gtest-all.cc)
|
add_executable(tests ${TEST_SOURCES} ${GTEST_DIR}/src/gtest-all.cc)
|
||||||
@ -43,5 +43,6 @@ set_target_properties(tests PROPERTIES COMPILE_FLAGS "${ENABLE_WARNINGS} ${GENER
|
|||||||
#----------
|
#----------
|
||||||
# INSTALL -
|
# INSTALL -
|
||||||
#----------
|
#----------
|
||||||
|
install(FILES ${LUA_SOURCES} ${LUA_TEST_SOURCES}
|
||||||
install(FILES ${LUA_SOURCES} DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
|
DESTINATION ${CMAKE_BINARY_DIR}
|
||||||
|
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ)
|
||||||
|
|||||||
12
build.sh
12
build.sh
@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
ROOT_DIR=$( cd $(dirname $0); pwd )
|
|
||||||
WORK_DIR=$ROOT_DIR/.work_dir
|
|
||||||
|
|
||||||
if ! [ -d $WORK_DIR ]; then
|
|
||||||
mkdir $WORK_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $WORK_DIR
|
|
||||||
cmake $ROOT_DIR
|
|
||||||
make -j4
|
|
||||||
make install
|
|
||||||
1
libs/gtest
Submodule
1
libs/gtest
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 9ae086a9ebafabdc49b71bb7f3879f551adee09a
|
||||||
1
libs/sol
Submodule
1
libs/sol
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 5b12924d9eab43b9621b8784b5ed576686c2fb50
|
||||||
1
src/sol
1
src/sol
@ -1 +0,0 @@
|
|||||||
Subproject commit 039331e163bb3a4870426e7b8ae7b55b53ecc579
|
|
||||||
@ -1 +0,0 @@
|
|||||||
Subproject commit 5e7fd50e17b6edf1cadff973d0ec68966cf3265e
|
|
||||||
@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env lua
|
#!/usr/bin/env lua
|
||||||
|
|
||||||
package.cpath = package.cpath .. ";../build/?.so;;../build/?.dylib"
|
-- TODO: remove hardcode
|
||||||
test = require "luaunit.luaunit"
|
package.path = package.path .. ";../libs/luaunit/?.lua"
|
||||||
|
package.cpath = package.cpath .. ";./?.so;./?.dylib"
|
||||||
|
|
||||||
|
test = require "luaunit"
|
||||||
|
|
||||||
do
|
do
|
||||||
-- Hack input arguments to make tests verbose by default
|
-- Hack input arguments to make tests verbose by default
|
||||||
Loading…
x
Reference in New Issue
Block a user