Skip to content

Commit

Permalink
Merge pull request #266 from sys-bio/develop
Browse files Browse the repository at this point in the history
Travis was pretty much useless, it never built this PR. Merging anyway.
  • Loading branch information
0u812 committed Jan 19, 2016
2 parents e9e5015 + 3c40b76 commit 0248105
Show file tree
Hide file tree
Showing 40,903 changed files with 511,995 additions and 10,575,943 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
*.h text
*.hpp text

# Python
*.py text

# Object Pascal
*.pas text

Expand Down
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
*.orig
*.kate-swp

**/.swp

# Merge backups (kdiff3?)
*.BACKUP*
*.BASE*
*.LOCAL*
*.REMOTE*

# libsbml auto-generated files
third_party/libSBML-5.9.0-Source/src/bindings/swig/libsbml-packages.h
third_party/libSBML-5.9.0-Source/src/bindings/swig/libsbml-packages.i
Expand All @@ -20,3 +28,8 @@ third_party/libSBML-5.9.0-Source/src/bindings/python/local-downcast-plugins.cpp
third_party/libSBML-5.9.0-Source/src/bindings/python/local-downcast.cpp
third_party/libSBML-5.9.0-Source/src/bindings/python/local-packages.i
wrappers/C/Testing/alexTestOutput.xml

# no idea
.swm
.swn
.swo
81 changes: 30 additions & 51 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,53 @@
#sudo: false
sudo: required
dist: trusty

language: cpp

notifications:
email:
- [email protected]

compiler: gcc

branches:
only:
- develop
- travis

#addons:
#apt:
#sources:
#- llvm-toolchain-precise-3.5

#addons:
#apt:
#packages:
#- cmake
#- llvm-3.4
- master


before_install:
# https://github.com/travis-ci/travis-ci/issues/1379
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
# print the distro information
- lsb_release -a

# cache refresh required to install packages
- sudo apt-get update -qq
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
- mkdir ~/install

# setup CMake 3.2.1
- mkdir ~/install/cmake-3.2.1
- cd ~/install/cmake-3.2.1
- wget http://www.cmake.org/files/v3.2/cmake-3.2.1-Linux-x86_64.tar.Z
- tar xf cmake-3.2.1-Linux-x86_64.tar.Z --strip-components=1
# install dependencies
- sudo apt-get -y install cmake swig python-dev python-numpy llvm-3.5-dev

## get LLVM 3.5.1 sources
#- mkdir -p ~/src/rr-deps/llvm-3.5.1
#- cd ~/src/rr-deps/llvm-3.5.1
#- wget http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz
#- tar xf llvm-3.5.1.src.tar.xz
## build LLVM 3.5.1
#- mkdir -p ~/build/llvm-3.5.1
#- cd ~/build/llvm-3.5.1
#- ~/install/cmake-3.2.1/bin/cmake --version
#- ~/install/cmake-3.2.1/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/install/llvm-3.5.1 ~/src/rr-deps/llvm-3.5.1/llvm-3.5.1.src
#- make -j2 && make install
- mkdir ~/install

# download LLVM 3.5.1 binaries
- cd ~/install
- wget http://sourceforge.net/projects/roadrunner-deps/files/ubuntu-12.04.5/llvm-3.5.1.tar.xz
- tar xf llvm-3.5.1.tar.xz
# install roadrunner dependencies via apt:
- sudo sh -c 'echo "\n\ndeb http://cdn.rawgit.com/sys-bio/roadrunner-debs/master ./ \n\n" >> /etc/apt/sources.list'
- sudo cat /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get -y --force-yes install libroadrunner-deps-dev

# roadrunner third party:
- mkdir -p ~/build/roadrunner-tp
- cd ~/build/roadrunner-tp
- ~/install/cmake-3.2.1/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/install/roadrunner-tp $TRAVIS_BUILD_DIR/third_party
- make -j2
- echo "TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR"
# build roadrunner:
- mkdir -p ~/build/roadrunner

install:
- cd ~/build/roadrunner-tp
- cd ~/build/roadrunner
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/install/roadrunner -DTHIRD_PARTY_INSTALL_FOLDER=/usr -DLLVM_CONFIG_EXECUTABLE=/usr/lib/llvm-3.5/bin/llvm-config -DBUILD_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so python2.7 -DBUILD_TESTS=ON -DBUILD_TEST_TOOLS=ON -DUSE_TR1_CXX_NS=ON -DBUILD_JAVA_INTERFACE=OFF "$TRAVIS_BUILD_DIR"
- make -j2
- make install

before_script:
- echo "TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR"
# roadrunner:
- mkdir -p ~/build/roadrunner
- cd ~/build/roadrunner
- ~/install/cmake-3.2.1/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/install/roadrunner -DTHIRD_PARTY_INSTALL_FOLDER=~/install/roadrunner-tp -DLLVM_CONFIG_EXECUTABLE=~/install/llvm-3.5.1/bin/llvm-config -DBUILD_PYTHON=OFF -DBUILD_TESTS=OFF -DUSE_TR1_CXX_NS=ON -DBUILD_JAVA_INTERFACE=OFF -DBUILD_TEST_TOOLS=OFF "$TRAVIS_BUILD_DIR"
before_script: true

script:
- cd ~/build/roadrunner
- make -j2 && make install
- make -j2 && make install
- ctest -VV
# display results of compiled tests
- cat autotest/compiled-test-suite/results.xml
14 changes: 13 additions & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,17 @@ The C# backend was ported to C++ by
The Plugin Framework was designed and developed by

Totte Karlsson

with Tellurium integration and further enhancements by

For more information visit libroadRunner.org
Kiri Choi

The continuous integration (CI) system and Java API were developed by

J Kyle Medley

Redesign of the integrator interface was done by

Wilbert Copeland

For more information visit libroadrunner.org
89 changes: 70 additions & 19 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
cmake_minimum_required(VERSION 2.8)
project(rr)

# libRoadRunner semantic versioning (http://semver.org/) - used to generate
# source files expose library version information

set(ROADRUNNER_VERSION_MAJOR 1)
set(ROADRUNNER_VERSION_MINOR 4)
set(ROADRUNNER_VERSION_PATCH 2)

set(ROADRUNNER_VERSION "${ROADRUNNER_VERSION_MAJOR}.${ROADRUNNER_VERSION_MINOR}.${ROADRUNNER_VERSION_PATCH}")

set(CMAKE_MACOSX_RPATH 1)

# ** Configuration Options *****************************************************

# These will be the defaults ...
if(WIN32)
SET(RR_BUILDS_ROOT "c:/builds")
Expand Down Expand Up @@ -31,6 +44,8 @@ endif(WIN32)
# add cmake files to find things, prepend with our path
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/ ${CMAKE_MODULE_PATH})

# TODO: add some logic to automatically set based on compiler version
set(RR_USE_CXX11 FALSE CACHE BOOL "Set to TRUE to enable C++11 features")

set(LLVM_INSTALL_PREFIX CACHE PATH "If LLVM was built using CMake, this is the location where it was installed")

Expand Down Expand Up @@ -75,10 +90,15 @@ option(BUILD_LEGACY_C "Build the legacy C code generating backend (deprecated)")

# should we build the swig python wrapper?
option (BUILD_PYTHON "build the SWIG generated python wrapper" OFF)
set( PYTHON_SITE_DIR site-packages CACHE PATH "Path to Python site packages directory" )

# should we build the swig Java wrapper?
option (BUILD_JAVA_INTERFACE "build the SWIG generated Java wrapper" OFF)

if(BUILD_TESTS OR BUILD_JAVA_INTERFACE)
enable_testing()
endif()

if(BUILD_LLVM AND NOT LLVM_FOUND)
message(FATAL_ERROR "BUILD_LLVM is enabled, but no LLVM installation was found")
endif()
Expand All @@ -90,15 +110,20 @@ mark_as_advanced(
INSTALL_C_API
INSTALL_C_API_PYTHON
INSTALL_STATIC_LIB
RR_USE_CXX11
)

set(RR_GENERATED_HEADER_PATH ${CMAKE_CURRENT_BINARY_DIR}/source)
set(RR_ROADRUNNER_INSTALL_PATH ${CMAKE_INSTALL_PREFIX})
set(RR_ROADRUNNER_INSTALL_LIB_PATH ${RR_ROADRUNNER_INSTALL_PATH}/lib)
set(RR_SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

# new clang on OSX and msvc use std namespace.
option (USE_TR1_CXX_NS "Use the tr1 c++ namespace for swig smart pointer" ${CMAKE_COMPILER_IS_GNUCXX})
# new clang on OSX and msvc use std namespace.
if(RR_USE_CXX11)
option (USE_TR1_CXX_NS "Use the tr1 c++ namespace for swig smart pointer" OFF)
else()
option (USE_TR1_CXX_NS "Use the tr1 c++ namespace for swig smart pointer" ${CMAKE_COMPILER_IS_GNUCXX})
endif()
OPTION (INSTALL_CXX_API "Generate C++ api" ON )
OPTION (INSTALL_C_API "Generate C API" ON )
OPTION (INSTALL_C_API_PYTHON "Package ctypes Python wrapper for the C API" ON )
Expand Down Expand Up @@ -149,6 +174,17 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

#** Apply Project/Compiler Settings ********************************************

# Set C++11 flags
if(RR_USE_CXX11)
IF(NOT MSVC)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
else()
message(WARNING "RR_USE_CXX11 enabled but has no effect on Microsoft compilers")
endif()
endif()

include_directories(
${RR_ROOT}
${THIRD_PARTY_FOLDER}
Expand All @@ -163,7 +199,7 @@ if (WIN32)
else()
#UNIX
find_package(LibXml2 REQUIRED)
message(STATUS "found libxml2, include dir: ${LIBXML2_INCLUDE_DIR}")
message(STATUS "found libxml2, include dir: ${LIBXML2_INCLUDE_DIR}")
include_directories(${LIBXML2_INCLUDE_DIR})
endif(WIN32)

Expand All @@ -189,11 +225,11 @@ if(${MSVC})
-DCRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_WARNINGS #MS wanting you to changes basically all standard C functions :(
)

# 4251 About exporting std classes
# 4018 Comparing unsigned/signed ints
# 4996 Deprecated functions
add_definitions( "/wd4251 /wd4018 /wd4996 /nologo" )
# 4996 Deprecated functions
add_definitions( "/wd4251 /wd4018 /wd4996 /nologo" )

SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc ")
SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ") #/FORCE:MULTIPLE")
Expand Down Expand Up @@ -269,12 +305,35 @@ endif(INSTALL_CXX_API)

add_subdirectory(wrappers)

if(BUILD_TEST_TOOLS)
if(BUILD_TESTS AND BUILD_TEST_TOOLS)
message(STATUS "building tests")
file (GLOB TEST_FILES "testing/*" )

file (GLOB PYTHON_TEST_FILES "wrappers/Python/roadrunner/testing/*" )
list( APPEND TEST_FILES ${PYTHON_TEST_FILES} )

file(GLOB PYTHON_TEST_DATA "${CMAKE_CURRENT_SOURCE_DIR}/testing/*.rrtest")

foreach( f ${TEST_FILES} )
if(NOT IS_DIRECTORY ${f})
get_filename_component( FILE_NAME ${f} NAME )
configure_file( ${f} testing/${FILE_NAME} COPYONLY )
configure_file( ${f} lib/site-packages/roadrunner/testing/${FILE_NAME} COPYONLY )
endif()
endforeach()

foreach( f ${PYTHON_TEST_DATA} )
if(NOT IS_DIRECTORY ${f})
get_filename_component( FILE_NAME ${f} NAME )
configure_file( ${f} lib/site-packages/roadrunner/testing/test_data/${FILE_NAME} COPYONLY )
endif()
endforeach()

add_subdirectory(testing)
add_subdirectory(autotest)
else()
message(STATUS "NOT building tests")
endif(BUILD_TEST_TOOLS)
endif()


#======================= INSTALL STUFF ========================================================
Expand Down Expand Up @@ -308,20 +367,12 @@ if(${BORLAND})
endforeach()
endif()

if(WIN32)
#One day these may be statically linked
set(RUNTIMES libxml2.DLL iconv.dll zlib1.dll)
foreach(runtime ${RUNTIMES})
install( FILES ${THIRD_PARTY_FOLDER}/dependencies/libsbml/bin/${runtime}
DESTINATION bin
COMPONENT rr_core)
endforeach()
endif()
configure_file(VERSION.txt.in VERSION.txt @ONLY)

install(
FILES
FILES
NOTICE.txt
VERSION.txt
${CMAKE_CURRENT_BINARY_DIR}/VERSION.txt
NEWS.txt
DESTINATION .
)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Copyright 2013-2015

E. T. Somogyi <sup>1</sup>, M. T. Karlsson <sup>2</sup>, M. Swat <sup>1</sup>, M. Galdzicki <sup>3</sup>, J. K. Medley <sup>3</sup> and H. M. Sauro <sup>3</sup>
E. T. Somogyi <sup>1</sup>, M. T. Karlsson <sup>2</sup>, M. Swat <sup>1</sup>, M. Galdzicki <sup>3</sup>, J. K. Medley <sup>3</sup>, K. Choi <sup>3</sup>, W. Copeland <sup>3</sup> and H. M. Sauro <sup>3</sup>

1. Biocomplexity Institute, Indiana University, Simon Hall MSB1, Bloomington, IN 47405
2. Dune Scientific, 10522 Lake City Way NE, #302 Seattle WA
Expand Down
1 change: 0 additions & 1 deletion VERSION.txt

This file was deleted.

1 change: 1 addition & 0 deletions VERSION.txt.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@ROADRUNNER_VERSION@
Loading

0 comments on commit 0248105

Please sign in to comment.