--- Begin Message ---
------------------------------------------------------------
revno: 4910
committer: Johannes Ring <johannr@xxxxxxxxx>
branch nick: dolfin
timestamp: Mon 2010-08-09 15:42:19 +0200
message:
Add (initial) files for building DOLFIN with CMake.
added:
CMakeLists.txt
cmake/
cmake/DOLFINFindArmadillo.cmake
cmake/DOLFINFindBoost.cmake
cmake/DOLFINFindCGAL.cmake
cmake/DOLFINFindLibXml2.cmake
cmake/DOLFINFindNumPy.cmake
cmake/DOLFINFindPython.cmake
cmake/DOLFINFindUFC.cmake
cmake/DOLFINFindZLIB.cmake
cmake/config_tests/
cmake/config_tests/armadillo_config_test_version.cpp
cmake/config_tests/cgal_config_test_version.cpp
dolfin/CMakeLists.txt
dolfin/swig/CMakeLists.txt
--
lp:dolfin
https://code.launchpad.net/~dolfin-core/dolfin/main
Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
=== added file 'CMakeLists.txt'
--- CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ CMakeLists.txt 2010-08-09 13:42:19 +0000
@@ -0,0 +1,127 @@
+project(DOLFIN)
+
+cmake_minimum_required(VERSION 2.8)
+
+# --------------------------------------------------------------
+# Indicate CMake 2.7 and above that we don't want to mix relative
+# and absolute paths in linker lib lists.
+# Run "cmake --help-policy CMP0003" for more information.
+# --------------------------------------------------------------
+if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+endif()
+
+set(DOLFIN_CMAKE_DIR "${DOLFIN_SOURCE_DIR}/cmake" CACHE INTERNAL "")
+set(CMAKE_MODULE_PATH
+ "${DOLFIN_CMAKE_DIR}"
+ ${CMAKE_MODULE_PATH}
+ )
+
+# Set DOLFIN version number
+set(DOLFIN_VERSION_MAJOR "0")
+set(DOLFIN_VERSION_MINOR "9")
+set(DOLFIN_VERSION_MICRO "8")
+set(DOLFIN_VERSION "${DOLFIN_VERSION_MAJOR}.${DOLFIN_VERSION_MINOR}.${DOLFIN_VERSION_MICRO}")
+add_definitions(-DPACKAGE_VERSION="${DOLFIN_VERSION}")
+
+# Configurable options for how we want to build
+option(BUILD_SHARED_LIBS "Build DOLFIN with shared libraries." ON)
+option(CMAKE_SKIP_RPATH "Do not add runtime paths when using shared libraries." ON)
+option(CMAKE_USE_RELATIVE_PATHS "use relative paths in makefiles and projects." OFF)
+option(DOLFIN_ENABLE_DEBUG "Build with debug information." ON)
+option(DOLFIN_ENABLE_EXTRADEBUG "Build with extra debug information (no -O2)." OFF)
+option(DOLFIN_ENABLE_DEBUGUBLAS "Add some extra Ublas debug information." OFF)
+option(DOLFIN_ENABLE_OPTIMIZE "Compile with optimization." OFF)
+option(DOLFIN_ENABLE_DOCS "Build documentation." OFF)
+option(DOLFIN_ENABLE_DEMOS "Build demos." OFF)
+option(DOLFIN_ENABLE_TESTS "Build tests." OFF)
+option(DOLFIN_ENABLE_BENCHMARKS "Build benchmark programs." OFF)
+option(DOLFIN_ENABLE_CODECOVERAGE "Enable code coverage.")
+
+# Enable or disable external packages
+option(DOLFIN_ENABLE_MPI "Compile with support for MPI." ON)
+option(DOLFIN_ENABLE_PETSC "Compile with support for PETSc linear algebra." ON)
+option(DOLFIN_ENABLE_SLEPC "Compile with support for SLEPc." ON)
+option(DOLFIN_ENABLE_SCOTCH "Compile with support for SCOTCH graph partitioning." ON)
+option(DOLFIN_ENABLE_UMFPACK "Compile with support for UMFPACK." ON)
+option(DOLFIN_ENABLE_TRILINOS "Compile with support for Trilinos." ON)
+option(DOLFIN_ENABLE_CHOLMOD "Compile with support for CHOLMOD." ON)
+option(DOLFIN_ENABLE_MTL4 "Compile with support for MTL4." ON)
+option(DOLFIN_ENABLE_PARMETIS "Compile with support for ParMETIS." ON)
+option(DOLFIN_ENABLE_GMP "Compile with support for GMP." OFF)
+option(DOLFIN_ENABLE_ZLIB "Compile with support for zlib." ON)
+option(DOLFIN_ENABLE_CGAL "Compile with support for CGAL" ON)
+option(DOLFIN_ENABLE_LAPACK "Compile with support for LAPACK." ON)
+option(DOLFIN_ENABLE_PYTHON "Compile the Python wrappers." ON)
+
+# Run tests to find external packages ...
+if(DOLFIN_ENABLE_PYTHON)
+ include(DOLFINFindPython)
+ find_package(SWIG REQUIRED)
+ include(${SWIG_USE_FILE})
+endif(DOLFIN_ENABLE_PYTHON)
+include(DOLFINFindUFC)
+include(DOLFINFindArmadillo)
+include(DOLFINFindLibXml2)
+if(DOLFIN_ENABLE_MPI)
+ find_package(MPI)
+endif(DOLFIN_ENABLE_MPI)
+#if(DOLFIN_ENABLE_PETSC)
+# include(DOLFINFindPETSc)
+#endif(DOLFIN_ENABLE_PETSC)
+#if(DOLFIN_ENABLE_SLEPC)
+# include(DOLFINFindSLEPc)
+#endif(DOLFIN_ENABLE_SLEPC)
+#if(DOLFIN_ENABLE_SCOTCH)
+# include(DOLFINFindSCOTCH)
+#endif(DOLFIN_ENABLE_SCOTCH)
+#if(DOLFIN_ENABLE_UMFPACK)
+# include(DOLFINFindUFMPACK)
+#endif(DOLFIN_ENABLE_UMFPACK)
+#if(DOLFIN_ENABLE_TRILINOS)
+# include(DOLFINFindTrilinos)
+#endif(DOLFIN_ENABLE_TRILINOS)
+#if(DOLFIN_ENABLE_CHOLMOD)
+# include(DOLFINFindCHOLMOD)
+#endif(DOLFIN_ENABLE_CHOLMOD)
+#if(DOLFIN_ENABLE_MTL4)
+# include(DOLFINFindMTL4)
+#endif(DOLFIN_ENABLE_MTL4)
+#if(DOLFIN_ENABLE_PARMETIS)
+# include(DOLFINFindParMETIS)
+#endif(DOLFIN_ENABLE_PARMETIS)
+#if(DOLFIN_ENABLE_GMP)
+# include(DOLFINFindGMP)
+#endif(DOLFIN_ENABLE_GMP)
+if(DOLFIN_ENABLE_ZLIB)
+ include(DOLFINFindZLIB)
+endif(DOLFIN_ENABLE_ZLIB)
+if(DOLFIN_ENABLE_CGAL)
+ include(DOLFINFindCGAL)
+endif(DOLFIN_ENABLE_CGAL)
+#if(DOLFIN_ENABLE_LAPACK)
+# include(DOLFINFindLAPACK)
+#endif(DOLFIN_ENABLE_LAPACK)
+
+# Find Boost
+set(DOLFIN_BOOST_COMPONENTS filesystem program_options)
+include(DOLFINFindBoost)
+
+# Append the library version information to the library target properties.
+option(DOLFIN_WITH_LIBRARY_VERSION "Build with library version information." ON)
+if(DOLFIN_WITH_LIBRARY_VERSION)
+ set(DOLFIN_LIBRARY_PROPERTIES ${DOLFIN_LIBRARY_PROPERTIES}
+ VERSION ${DOLFIN_VERSION}
+ SOVERSION ${DOLFIN_VERSION_MAJOR}
+ )
+endif(DOLFIN_WITH_LIBRARY_VERSION)
+
+set(DOLFIN_BIN_DIR "bin")
+set(DOLFIN_LIB_DIR "lib")
+set(DOLFIN_INCLUDE_DIR "include")
+set(DOLFIN_SHARE_DIR "share")
+set(DOLFIN_MAN_DIR "share/man")
+set(DOLFIN_INSTALL_PYTHON_MODULE_DIR "lib/python2.6/site-packages")
+set(DOLFIN_INSTALL_PYTHON_EXT_DIR "")
+
+add_subdirectory(dolfin)
=== added directory 'cmake'
=== added file 'cmake/DOLFINFindArmadillo.cmake'
--- cmake/DOLFINFindArmadillo.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindArmadillo.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,60 @@
+if(NOT DOLFIN_ARMADILLO_FOUND)
+ message(STATUS "checking for package 'Armadillo'")
+
+ find_path(DOLFIN_ARMADILLO_INCLUDE_DIR armadillo
+ /usr/include
+ /usr/local/include
+ DOC "Directory where the Armadillo header file is located"
+ )
+ mark_as_advanced(DOLFIN_ARMADILLO_INCLUDE_DIR)
+
+ find_library(DOLFIN_ARMADILLO_LIBRARY armadillo
+ DOC "The Armadillo library"
+ )
+ mark_as_advanced(DOLFIN_ARMADILLO_LIBRARY)
+
+ if(DOLFIN_ARMADILLO_INCLUDE_DIR AND DOLFIN_ARMADILLO_LIBRARY)
+ include(CheckCXXSourceRuns)
+
+ set(CMAKE_REQUIRED_INCLUDES ${DOLFIN_ARMADILLO_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${DOLFIN_ARMADILLO_LIBRARY})
+
+ try_run(
+ ARMADILLO_CONFIG_TEST_VERSION_EXITCODE
+ ARMADILLO_CONFIG_TEST_VERSION_COMPILED
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${DOLFIN_CMAKE_DIR}/config_tests/armadillo_config_test_version.cpp
+ RUN_OUTPUT_VARIABLE OUTPUT
+ )
+
+ if(ARMADILLO_CONFIG_TEST_VERSION_EXITCODE EQUAL 0)
+ set(ARMADILLO_VERSION ${OUTPUT} CACHE TYPE STRING)
+ endif(ARMADILLO_CONFIG_TEST_VERSION_EXITCODE EQUAL 0)
+
+ check_cxx_source_runs("
+#include <armadillo>
+
+int main()
+{
+ arma::mat A = arma::rand(4, 4);
+ arma::vec b = arma::rand(4);
+ arma::vec x = arma::solve(A, b);
+
+ return 0;
+}
+"
+ ARMADILLO_TEST_RUNS)
+
+ if(NOT ARMADILLO_TEST_RUNS)
+ message(FATAL_ERROR "Unable to compile and run Armadillo test program.")
+ endif(NOT ARMADILLO_TEST_RUNS)
+
+ set(DOLFIN_ARMADILLO_FOUND 1 CACHE TYPE BOOL)
+ endif(DOLFIN_ARMADILLO_INCLUDE_DIR AND DOLFIN_ARMADILLO_LIBRARY)
+
+ if(DOLFIN_ARMADILLO_FOUND)
+ message(STATUS " found Armadillo, version ${ARMADILLO_VERSION}")
+ else(DOLFIN_ARMADILLO_FOUND)
+ message(STATUS " package 'Armadillo' not found")
+ endif(DOLFIN_ARMADILLO_FOUND)
+endif(NOT DOLFIN_ARMADILLO_FOUND)
=== added file 'cmake/DOLFINFindBoost.cmake'
--- cmake/DOLFINFindBoost.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindBoost.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,9 @@
+SET(DOLFIN_BOOST_INCLUDE_DIR "" CACHE PATH "Override the default location for Boost header files.")
+SET(DOLFIN_BOOST_LIBRARY_DIR "" CACHE PATH "Override the default location for Boost libraries.")
+SET(DOLFIN_BOOST_USE_MULTITHREADED OFF CACHE BOOL "Use multithreaded Boost libraries.")
+
+SET(BOOST_INCLUDEDIR ${DOLFIN_BOOST_INCLUDE_DIR})
+SET(BOOST_LIBRARYDIR ${DOLFIN_BOOST_LIBRARY_DIR})
+SET(Boost_ADDITIONAL_VERSIONS 1.43 1.43.0)
+SET(Boost_USE_MULTITHREADED ${DOLFIN_BOOST_USE_MULTITHREADED})
+FIND_PACKAGE(Boost 1.34 COMPONENTS ${DOLFIN_BOOST_COMPONENTS} REQUIRED)
=== added file 'cmake/DOLFINFindCGAL.cmake'
--- cmake/DOLFINFindCGAL.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindCGAL.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,35 @@
+set(DOLFIN_CGAL_FOUND 0)
+
+message(STATUS "checking for package 'CGAL'")
+
+find_path(DOLFIN_CGAL_INCLUDE_DIR CGAL
+ /usr/include
+ /usr/local/include
+ DOC "Directory where the CGAL header directory is located"
+ )
+mark_as_advanced(DOLFIN_CGAL_INCLUDE_DIR)
+
+find_library(DOLFIN_CGAL_LIBRARY CGAL
+ DOC "The CGAL library"
+ )
+mark_as_advanced(DOLFIN_CGAL_LIBRARY)
+
+find_library(DOLFIN_MPFR_LIBRARY mpfr
+ DOC "The mpfr library"
+ )
+mark_as_advanced(DOLFIN_MPFR_LIBRARY)
+
+find_library(DOLFIN_GMP_LIBRARY gmp
+ DOC "The GMP library"
+ )
+mark_as_advanced(DOLFIN_GMP_LIBRARY)
+
+if(DOLFIN_CGAL_INCLUDE_DIR AND DOLFIN_CGAL_LIBRARY AND DOLFIN_MPFR_LIBRARY AND DOLFIN_GMP_LIBRARY)
+ set(DOLFIN_CGAL_FOUND 1)
+endif(DOLFIN_CGAL_INCLUDE_DIR AND DOLFIN_CGAL_LIBRARY AND DOLFIN_MPFR_LIBRARY AND DOLFIN_GMP_LIBRARY)
+
+if(DOLFIN_CGAL_FOUND)
+ message(STATUS " found CGAL, version ${CGAL_VERSION}")
+else(DOLFIN_CGAL_FOUND)
+ message(STATUS " package 'CGAL' not found")
+endif(DOLFIN_CGAL_FOUND)
=== added file 'cmake/DOLFINFindLibXml2.cmake'
--- cmake/DOLFINFindLibXml2.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindLibXml2.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,15 @@
+set(DOLFIN_LIBXML2_FOUND 0)
+
+find_package(LibXml2 REQUIRED)
+
+if(LIBXML2_FOUND)
+ set(DOLFIN_LIBXML2_INCLUDE_DIR
+ ${LIBXML2_INCLUDE_DIR}
+ )
+
+ set(DOLFIN_LIBXML2_LIBRARIES
+ ${LIBXML2_LIBRARIES}
+ )
+
+ set(DOLFIN_LIBXML2_FOUND 1)
+endif(LIBXML2_FOUND)
=== added file 'cmake/DOLFINFindNumPy.cmake'
--- cmake/DOLFINFindNumPy.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindNumPy.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,34 @@
+# - Find NumPy
+# Find the native NumPy includes
+# This module defines
+# NUMPY_INCLUDE_DIR, where to find numpy/arrayobject.h, etc.
+# NUMPY_FOUND, If false, do not try to use NumPy headers.
+
+if(NUMPY_INCLUDE_DIR)
+ # in cache already
+ set(NUMPY_FIND_QUIETLY TRUE)
+endif(NUMPY_INCLUDE_DIR)
+
+exec_program("${PYTHON_EXECUTABLE}"
+ ARGS "-c 'import numpy; print numpy.get_include()'"
+ OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
+ RETURN_VALUE NUMPY_NOT_FOUND)
+
+if(NUMPY_INCLUDE_DIR)
+ set(NUMPY_FOUND TRUE)
+ set(NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR} CACHE STRING "NumPy include path")
+else(NUMPY_INCLUDE_DIR)
+ set(NUMPY_FOUND FALSE)
+endif(NUMPY_INCLUDE_DIR)
+
+if(NUMPY_FOUND)
+ if(NOT NUMPY_FIND_QUIETLY)
+ message(STATUS "NumPy headers found")
+ endif(NOT NUMPY_FIND_QUIETLY)
+else(NUMPY_FOUND)
+ if(NUMPY_FIND_REQUIRED)
+ message(FATAL_ERROR "NumPy headers missing")
+ endif(NUMPY_FIND_REQUIRED)
+endif(NUMPY_FOUND)
+
+mark_as_advanced(NUMPY_INCLUDE_DIR)
=== added file 'cmake/DOLFINFindPython.cmake'
--- cmake/DOLFINFindPython.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindPython.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,63 @@
+set(DOLFIN_PYTHON_FOUND 0)
+
+if(APPLE)
+ find_program(PYTHON_EXECUTABLE
+ NAMES python
+ )
+
+ if(PYTHON_EXECUTABLE)
+ execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.prefix + '/include/python' + sys.version[:3])"
+ OUTPUT_VARIABLE PYTHON_INCLUDE_PATH
+ )
+ execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.exec_prefix + '/Python')"
+ OUTPUT_VARIABLE PYTHON_LIBRARY
+ )
+
+ set(DOLFIN_PYTHON_INCLUDE_PATH
+ ${PYTHON_INCLUDE_PATH} CACHE PATH "Path to the directory containg Python header files."
+ )
+
+ set(DOLFIN_PYTHON_LIBRARY
+ ${PYTHON_LIBRARY} CACHE FILEPATH "Path to the Python link library."
+ )
+
+ mark_as_advanced(DOLFIN_PYTHON_INCLUDE_PATH)
+ mark_as_advanced(DOLFIN_PYTHON_LIBRARY)
+ mark_as_advanced(PYTHON_EXECUTABLE)
+
+ if(DOLFIN_PYTHON_INCLUDE_PATH AND DOLFIN_PYTHON_LIBRARY)
+ set(DOLFIN_PYTHON_INCLUDE_DIRS
+ ${DOLFIN_PYTHON_INCLUDE_PATH}
+ )
+
+ set(DOLFIN_PYTHON_LIBS
+ ${DOLFIN_PYTHON_LIBRARY}
+ )
+
+ set(DOLFIN_PYTHON_FOUND 1)
+ endif(DOLFIN_PYTHON_INCLUDE_PATH AND DOLFIN_PYTHON_LIBRARY)
+ endif(PYTHON_EXECUTABLE)
+else(APPLE)
+ include(FindPythonInterp)
+ include(FindPythonLibs)
+
+ if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND)
+ set(DOLFIN_PYTHON_INCLUDE_DIRS
+ ${PYTHON_INCLUDE_PATH}
+ )
+
+ set(DOLFIN_PYTHON_LIBS
+ ${PYTHON_LIBRARY}
+ )
+
+ mark_as_advanced(PYTHON_INCLUDE_PATH)
+ mark_as_advanced(PYTHON_LIBRARY)
+ mark_as_advanced(PYTHON_DEBUG_LIBRARIES)
+ mark_as_advanced(PY_MODULES_LIST)
+ mark_as_advanced(PY_STATIC_MODULES_LIST)
+
+ set(DOLFIN_PYTHON_FOUND 1)
+ endif(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND)
+endif(APPLE)
=== added file 'cmake/DOLFINFindUFC.cmake'
--- cmake/DOLFINFindUFC.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindUFC.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,22 @@
+set(DOLFIN_UFC_FOUND 0)
+
+include(FindPkgConfig)
+pkg_check_modules(UFC REQUIRED ufc-1>=1.4.1)
+
+if(UFC_FOUND)
+ set(DOLFIN_UFC_INCLUDE_DIRS
+ ${UFC_INCLUDE_DIRS}
+ )
+
+ if(DOLFIN_ENABLE_PYTHON)
+ execute_process(
+ COMMAND ${PYTHON_EXECUTABLE} -c "import sys, ufc; sys.stdout.write(ufc.__swigversion__)"
+ OUTPUT_VARIABLE UFC_SWIGVERSION
+ )
+ if(NOT "${SWIG_VERSION}" STREQUAL "${UFC_SWIGVERSION}")
+ message(FATAL_ERROR "UFC compiled with different version of SWIG. Please install SWIG version ${UFC_SWIGVERSION} or recompile UFC with present SWIG.")
+ endif(NOT "${SWIG_VERSION}" STREQUAL "${UFC_SWIGVERSION}")
+ endif(DOLFIN_ENABLE_PYTHON)
+
+ set(DOLFIN_UFC_FOUND 1)
+endif(UFC_FOUND)
=== added file 'cmake/DOLFINFindZLIB.cmake'
--- cmake/DOLFINFindZLIB.cmake 1970-01-01 00:00:00 +0000
+++ cmake/DOLFINFindZLIB.cmake 2010-08-09 13:42:19 +0000
@@ -0,0 +1,19 @@
+set(DOLFIN_ZLIB_FOUND 0)
+
+find_package(ZLIB)
+
+if(ZLIB_FOUND)
+ set(DOLFIN_ZLIB_INCLUDE_DIRS
+ ${ZLIB_INCLUDE_DIRS}
+ )
+
+ set(DOLFIN_ZLIB_LIB_DIRS
+ ${ZLIB_LIBRARY_DIRS}
+ )
+
+ set(DOLFIN_ZLIB_LIBS
+ ${ZLIB_LIBRARIES}
+ )
+
+ set(DOLFIN_ZLIB_FOUND 1)
+endif(ZLIB_FOUND)
=== added directory 'cmake/config_tests'
=== added file 'cmake/config_tests/armadillo_config_test_version.cpp'
--- cmake/config_tests/armadillo_config_test_version.cpp 1970-01-01 00:00:00 +0000
+++ cmake/config_tests/armadillo_config_test_version.cpp 2010-08-09 13:42:19 +0000
@@ -0,0 +1,11 @@
+#include "armadillo"
+#include <iostream>
+
+using namespace arma;
+
+int main() {
+ std::cout << arma_version::major << "."
+ << arma_version::minor << "."
+ << arma_version::patch;
+ return 0;
+}
=== added file 'cmake/config_tests/cgal_config_test_version.cpp'
--- cmake/config_tests/cgal_config_test_version.cpp 1970-01-01 00:00:00 +0000
+++ cmake/config_tests/cgal_config_test_version.cpp 2010-08-09 13:42:19 +0000
@@ -0,0 +1,9 @@
+#include <CGAL/version.h>
+#include <iostream>
+
+int main() {
+ #ifdef CGAL_VERSION_NR
+ std::cout << CGAL_VERSION_NR;
+ #endif
+ return 0;
+}
=== added file 'dolfin/CMakeLists.txt'
--- dolfin/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ dolfin/CMakeLists.txt 2010-08-09 13:42:19 +0000
@@ -0,0 +1,87 @@
+set(DOLFIN_H dolfin.h)
+INSTALL(FILES ${DOLFIN_H} DESTINATION ${DOLFIN_INCLUDE_DIR} COMPONENT Development)
+
+set(DOLFIN_DIRS
+ ale
+ common
+ elements
+ fem
+ function
+ graph
+ io
+ la
+ log
+ main
+ math
+ mesh
+ mf
+ nls
+ ode
+ parameter
+ adaptivity
+ pde
+ plot
+ quadrature
+ )
+
+foreach(DIR ${DOLFIN_DIRS})
+ file(GLOB _HEADERS ${DIR}/*.h)
+ list(APPEND HEADERS ${_HEADERS})
+ INSTALL(FILES ${_HEADERS} DESTINATION ${DOLFIN_INCLUDE_DIR}/dolfin/${DIR} COMPONENT Development)
+
+ file(GLOB _SOURCES ${DIR}/*.cpp)
+ list(APPEND SOURCES ${_SOURCES})
+endforeach()
+
+set(DOLFIN_INCLUDE_DIRECTORIES
+ ${DOLFIN_SOURCE_DIR}
+ ${DOLFIN_UFC_INCLUDE_DIRS}
+ ${Boost_INCLUDE_DIRS}
+ ${DOLFIN_ARMADILLO_INCLUDE_DIR}
+ ${DOLFIN_LIBXML2_INCLUDE_DIR}
+ )
+
+set(DOLFIN_LIBRARY_DIRECTORIES
+ ${DOLFIN_ARMADILLO_LIB_DIR}
+ )
+
+set(DOLFIN_TARGET_LINK_LIBRARIES
+ ${DOLFIN_ARMADILLO_LIBRARY}
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${DOLFIN_LIBXML2_LIBRARIES}
+ )
+
+if(DOLFIN_ENABLE_CGAL AND DOLFIN_CGAL_FOUND)
+ add_definitions(-DHAS_CGAL)
+ list(APPEND DOLFIN_INCLUDE_DIRECTORIES ${DOLFIN_CGAL_INCLUDE_DIR})
+ list(APPEND DOLFIN_LIBRARY_DIRECTORIES ${DOLFIN_CGAL_LIBRARY_DIR})
+ list(APPEND DOLFIN_TARGET_LINK_LIBRARIES
+ ${DOLFIN_CGAL_LIBRARY}
+ ${DOLFIN_MPFR_LIBRARY}
+ ${DOLFIN_GMP_LIBRARY}
+ )
+endif(DOLFIN_ENABLE_CGAL AND DOLFIN_CGAL_FOUND)
+
+if(DOLFIN_ENABLE_ZLIB AND DOLFIN_ZLIB_FOUND)
+ add_definitions(-DHAS_ZLIB)
+ list(APPEND DOLFIN_INCLUDE_DIRECTORIES ${DOLFIN_ZLIB_INCLUDE_DIRS})
+ list(APPEND DOLFIN_LIBRARY_DIRECTORIES ${})
+ list(APPEND DOLFIN_TARGET_LINK_LIBRARIES ${DOLFIN_ZLIB_LIBS})
+endif(DOLFIN_ENABLE_ZLIB AND DOLFIN_ZLIB_FOUND)
+
+include_directories(${DOLFIN_INCLUDE_DIRECTORIES})
+link_directories(${DOLFIN_LIBRARY_DIRECTORIES})
+
+add_library(dolfin SHARED ${DOLFIN_H} ${HEADERS} ${SOURCES})
+set_target_properties(dolfin PROPERTIES ${DOLFIN_LIBRARY_PROPERTIES})
+
+target_link_libraries(dolfin ${DOLFIN_TARGET_LINK_LIBRARIES})
+
+install(TARGETS dolfin
+ RUNTIME DESTINATION ${DOLFIN_BIN_DIR} COMPONENT RuntimeExecutables
+ LIBRARY DESTINATION ${DOLFIN_LIB_DIR} COMPONENT RuntimeLibraries
+ ARCHIVE DESTINATION ${DOLFIN_LIB_DIR} COMPONENT Development
+ )
+
+add_subdirectory(swig)
=== added file 'dolfin/swig/CMakeLists.txt'
--- dolfin/swig/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ dolfin/swig/CMakeLists.txt 2010-08-09 13:42:19 +0000
@@ -0,0 +1,54 @@
+project(cpp)
+
+set(SWIG_MODULE_NAME cpp)
+set(CMAKE_SWIG_FLAGS
+ -module ${SWIG_MODULE_NAME}
+ -shadow
+ -modern
+ -modernargs
+ -fastdispatch
+ -fvirtual
+ -nosafecstrings
+ -noproxydel
+ -fastproxy
+ -fastinit
+ -fastunpack
+ -fastquery
+ -nobuildnone
+ -Iinclude/swig
+ )
+set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR})
+
+set(SWIG_SOURCES dolfin.i)
+set_source_files_properties(${SWIG_SOURCES} PROPERTIES CPLUSPLUS ON)
+
+include_directories(${PYTHON_INCLUDE_PATH})
+
+swig_add_module(${SWIG_MODULE_NAME} python ${SWIG_SOURCES})
+swig_link_libraries(cpp dolfin ${PYTHON_LIBRARIES})
+
+get_target_property(SWIG_MODULE_LOCATION ${SWIG_MODULE_cpp_REAL_NAME} LOCATION)
+install(FILES
+ ${SWIG_MODULE_LOCATION} ${CMAKE_CURRENT_BINARY_DIR}/${SWIG_MODULE_NAME}.py
+ DESTINATION ${DOLFIN_INSTALL_PYTHON_MODULE_DIR}/dolfin
+ COMPONENT RuntimeLibraries
+ )
+
+install(DIRECTORY
+ ${CMAKE_SOURCE_DIR}/site-packages/dolfin
+ DESTINATION ${DOLFIN_INSTALL_PYTHON_MODULE_DIR}
+ USE_SOURCE_PERMISSIONS
+ COMPONENT RuntimeLibraries
+ )
+
+file(GLOB DOLFIN_SWIG_INTERFACE_FILES "*.i")
+install(FILES ${DOLFIN_SWIG_INTERFACE_FILES}
+ DESTINATION ${DOLFIN_INCLUDE_DIR}/dolfin/swig
+ COMPONENT Development
+ )
+
+install(DIRECTORY "import"
+ DESTINATION ${DOLFIN_INCLUDE_DIR}/dolfin/swig
+ USE_SOURCE_PERMISSIONS
+ COMPONENT Development
+ )
--- End Message ---