forked from bastibe/lunatic-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from bastibe/master
Update to bastibe
- Loading branch information
Showing
12 changed files
with
500 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
language: c | ||
|
||
sudo: required | ||
dist: trusty | ||
|
||
compiler: | ||
- gcc | ||
|
||
env: | ||
- LUA_ENV=lua5.1 PY_ENV=python2.7 m_SUFFIX= | ||
- LUA_ENV=lua5.3 PY_ENV=python2.7 m_SUFFIX= | ||
- LUA_ENV=lua5.1 PY_ENV=python3.6 m_SUFFIX=m | ||
- LUA_ENV=lua5.3 PY_ENV=python3.6 m_SUFFIX=m | ||
|
||
|
||
before_install: | ||
- sudo add-apt-repository -y "deb http://ppa.launchpad.net/grilo-team/travis/ubuntu trusty main" | ||
- sudo add-apt-repository -y "deb http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu trusty main" | ||
- sudo apt-get update -qq | ||
|
||
install: | ||
- sudo apt-get install -qq --force-yes ${LUA_ENV} | ||
- sudo apt-get install -qq --force-yes ${PY_ENV} | ||
- sudo apt-get install -qq --force-yes lib${LUA_ENV}-dev | ||
- sudo apt-get install -qq --force-yes lib${PY_ENV}-dev | ||
- ${LUA_ENV} -v | ||
- ${PY_ENV} --version | ||
|
||
script: | ||
- cmake -B./build -H. -DPYTHON_INCLUDE_DIR=/usr/include/${PY_ENV}${m_SUFFIX} -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/lib${PY_ENV}${m_SUFFIX}.so | ||
- cmake --build ./build | ||
- cd ./build/bin | ||
- ${PY_ENV} ../../tests/test_lua.py | ||
- ${LUA_ENV} ../../tests/test_py.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
add_definitions(-DLUA_BUILD_AS_DLL) | ||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
add_definitions(-DLUA_LIB) | ||
|
||
add_library(src OBJECT luainpython.c pythoninlua.c) | ||
set_target_properties(src PROPERTIES | ||
POSITION_INDEPENDENT_CODE TRUE) | ||
|
||
target_include_directories(src PRIVATE ${LUA_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR}) | ||
|
||
target_compile_definitions(src PRIVATE LUA_LIB) | ||
if (WIN32) | ||
target_compile_definitions(src PRIVATE LUA_BUILD_AS_DLL) | ||
endif (WIN32) | ||
|
||
if (CMAKE_COMPILER_IS_GNUCC) | ||
target_compile_options(src PUBLIC -Wall -pedantic -std=c99) | ||
endif (CMAKE_COMPILER_IS_GNUCC) |
Oops, something went wrong.