Skip to content

Commit

Permalink
first commit contd..
Browse files Browse the repository at this point in the history
  • Loading branch information
dchandran committed Sep 26, 2011
0 parents commit 65937f5
Show file tree
Hide file tree
Showing 14,554 changed files with 3,896,342 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
67 changes: 67 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
PROJECT( LIBCOPASI )
CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )

#--------------------------------------------------------------------------
# just some setup for compilers etc.
#--------------------------------------------------------------------------
#just a few linker frags needed for Linux
IF (UNIX AND NOT APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lrt")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -lrt")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lrt")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
ENDIF(UNIX AND NOT APPLE)

# CMake not supporting Win32 MinGW?

IF( WIN32 AND MINGW)
ADD_DEFINITIONS(-DMINGW)
SET(CMAKE_RC_COMPILER_INIT windres)
ENABLE_LANGUAGE(RC)
SET(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
ENDIF( WIN32 AND MINGW)

#Build type
OPTION( USE_DEBUG_MODE "Release vs Debug mode" OFF)
IF (USE_DEBUG_MODE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type")
SET(CMAKE_RC_COMPILE_OBJECT Debug)
ELSE(USE_DEBUG_MODE)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type")
SET(CMAKE_RC_COMPILE_OBJECT Release)
ENDIF(USE_DEBUG_MODE)
#--------------------------------------------------------------------------

#include folders
INCLUDE_DIRECTORIES( BEFORE
${LIBCOPASI_SOURCE_DIR}
${LIBCOPASI_SOURCE_DIR}/curl/include
${LIBCOPASI_SOURCE_DIR}/expat
${LIBCOPASI_SOURCE_DIR}/expat/lib
${LIBCOPASI_SOURCE_DIR}/muparser
${LIBCOPASI_SOURCE_DIR}/lapack/INCLUDE
)

#output folder for libraries same as exe's
SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})

#build individual subdirectories using CMakeLists.txt in each directory

#if the system already has lapack, then don't build it
OPTION( BUILD_LAPACK "check this if your system does not have lapack library" ON ) #use cmake gui to set this
IF (BUILD_LAPACK)
ADD_SUBDIRECTORY( lapack ) #linear algebra
ENDIF(BUILD_LAPACK)

ADD_SUBDIRECTORY( muparser ) #math parser
ADD_SUBDIRECTORY( curl ) #needed by raptor
ADD_SUBDIRECTORY( raptor ) #RDF parser
ADD_SUBDIRECTORY( libSBML ) #systems biology markup language parser
ADD_SUBDIRECTORY( antimony ) #human-readable test-based reaction networks
ADD_SUBDIRECTORY( boost ) #regular expressions
ADD_SUBDIRECTORY( copasi ) #simulation and analysis package
ADD_SUBDIRECTORY( libstructural ) #network structural analysis based on stoichiometry matrix
ADD_SUBDIRECTORY( galib ) #genetic algorithms library

71 changes: 71 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
==================
ABOUT
==================
This is a simplified C API to the Copasi C++ library. The API uses
a few data structures that wrap Copasi's C++ classes as well as
provide some additional features, such as being able to use simple
names, e.g. "A", instead of Copasi's complete names, e.g. <model1.compartmentX.A>

==================
DEPENDENCIES
==================

lapack -- linear algebra package, used by Copasi C++ code
libSBML -- Systems Biology Markup Language parser, used by Copasi C++ code
expat -- XML parser used by libSBML and Copasi C++
curl -- required by Raptor library
raptor -- RDF parser required by Copasi C++
muparser -- used within the C API for parsing mathematical expressions and getting the tokens
boost -- the boost regex library is used by the C API to substitute strings inside formulas

===============================
GETTING THE SOURCE CODE
===============================
First install Subversion. In Linux and Mac, just use apt-get svn.
In Windows, download TortoiseSVN (graphical version) or SilkSVN (command-line version)

Once Subversion is installed, use the following command to get the source:
svn checkout https://copasi-simple-api.googlecode.com/svn/trunk/ copasi-simple-api

If you are using TortoiseSVN, first create an empty folder called copasi-api. Then
right-click on that newly created folder and select "SVN Checkout". Enter
https://copasi-simple-api.googlecode.com/svn/trunk/ as the source URL

==========================
BUILDING THE LIBRARY
==========================

Lets assume that the source code is located in a folder named "copasi-simple-api"

1) Install Cmake from cmake.org
for Linux, just type 'apt-get cmake cmake-gui'

2) Run cmake-gui
In the Cmake program, find two text boxes labeled, "where is the source code" and "where to build"

3) Type the full copasi-simple-api/ folder path for the line that says "where is the source code"

4) Type copasi-simple-api/BUILD folder path for the line that says "where to build"

5) Click the "Configure" button

6) Cmake will create the BUILD folder and then ask you to select the compiler.
It is recommended that you use standard compilers, e.g. gcc for Unix and
Visual Studio or MinGW for MS Windows.

7) Once configuration is done, click the "Generate" button

8) Go to the copasi-simple-api/BUILD folder.
If you used Visual Studio as the compiler, you will find a project file (.sln) -- open it and build all
If you used GCC, you will find a makefile. cd into this folder and run "make"

==========================
USING THE LIBRARY
==========================

See test_copasi_api.c for example





Loading

0 comments on commit 65937f5

Please sign in to comment.