Initial commit. Travis, dune and cmake support.
This commit is contained in:
33
.travis.yml
Normal file
33
.travis.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
language: cpp
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- boost-latest
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- libboost1.55-all-dev
|
||||
- gcc-4.8
|
||||
- g++-4.8
|
||||
- gfortran-4.8
|
||||
- liblapack-dev
|
||||
- libgmp3-dev
|
||||
- libsuitesparse-dev
|
||||
- libeigen3-dev
|
||||
|
||||
install:
|
||||
- export CXX="g++-4.8" CC="gcc-4.8" FC="gfortran-4.8"
|
||||
- cd ..
|
||||
|
||||
- git clone https://github.com/OPM/opm-common.git
|
||||
- git clone https://github.com/OPM/opm-parser.git
|
||||
|
||||
- opm-parser/travis/clone-and-build-ert.sh
|
||||
|
||||
- opm-common/travis/build-opm-common.sh
|
||||
- opm-parser/travis/build-opm-parser.sh
|
||||
|
||||
script: opm-output/travis/build-and-test-opm-core.sh
|
||||
29
cmake/Modules/CheckCaseSensitiveFileSystem.cmake
Normal file
29
cmake/Modules/CheckCaseSensitiveFileSystem.cmake
Normal file
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# Module to check whether the file system is case sensitive or not
|
||||
#
|
||||
# Sets the following variable:
|
||||
#
|
||||
# HAVE_CASE_SENSITIVE_FILESYSTEM True if the file system honors the case of files
|
||||
|
||||
message(STATUS "Checking whether the file system is case-sensitive")
|
||||
# create a file containing uppercase characters
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/UPPER" "Foo")
|
||||
|
||||
# check if the all-lowercase file with the same name can be opened
|
||||
set(FooContents "")
|
||||
if (EXISTS "${CMAKE_BINARY_DIR}/upper")
|
||||
file(READ "${CMAKE_BINARY_DIR}/upper" FooContents)
|
||||
endif()
|
||||
|
||||
# remove the file again in order not to have it dangling around...
|
||||
file(REMOVE "${CMAKE_BINARY_DIR}/UPPER")
|
||||
|
||||
# check the contents of the file opened with lower-case. If it is
|
||||
# empty, the file system is case sensitive.
|
||||
if ("${FooContents}" STREQUAL "Foo")
|
||||
message(STATUS "File system is not case-sensitive")
|
||||
set(HAVE_CASE_SENSITIVE_FILESYSTEM 0)
|
||||
else()
|
||||
message(STATUS "File system is case-sensitive")
|
||||
set(HAVE_CASE_SENSITIVE_FILESYSTEM 1)
|
||||
endif()
|
||||
8
cmake/Modules/install_headers.cmake
Normal file
8
cmake/Modules/install_headers.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
function ( install_headers header-list prefix )
|
||||
foreach (header ${header-list})
|
||||
set( abs_path "${CMAKE_CURRENT_SOURCE_DIR}/${header}")
|
||||
get_filename_component( path ${abs_path} PATH )
|
||||
file( RELATIVE_PATH rel_path "${PROJECT_SOURCE_DIR}" "${path}")
|
||||
install ( FILES ${header} DESTINATION ${prefix}/include/${rel_path} )
|
||||
endforeach()
|
||||
endfunction()
|
||||
16
opm/output/CMakeLists.txt
Normal file
16
opm/output/CMakeLists.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
set( SOURCE_FILES
|
||||
Output.cpp
|
||||
)
|
||||
|
||||
set( HEADER_FILES
|
||||
Output.hpp
|
||||
)
|
||||
|
||||
add_library(opmoutput ${SOURCE_FILES})
|
||||
target_link_libraries(opmoutput ${ERT_LIBRARIES})
|
||||
set_target_properties(opmoutput PROPERTIES VERSION ${opm-output_VERSION_MAJOR}.${opm-output_VERSION_MINOR}
|
||||
SOVERSION ${opm-output_VERSION_MAJOR})
|
||||
|
||||
include(${PROJECT_SOURCE_DIR}/cmake/Modules/install_headers.cmake)
|
||||
install_headers("${HEADER_FILES}" "${CMAKE_INSTALL_PREFIX}")
|
||||
install(TARGETS opmoutput DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
0
opm/output/Output.cpp
Normal file
0
opm/output/Output.cpp
Normal file
0
opm/output/Output.hpp
Normal file
0
opm/output/Output.hpp
Normal file
8
travis/build-and-test-opm-output.sh
Executable file
8
travis/build-and-test-opm-output.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd . > /dev/null
|
||||
opm-output/travis/build-opmoutput-
|
||||
cd opm-core/build
|
||||
ctest --output-on-failure
|
||||
popd > /dev/null
|
||||
10
travis/build-opm-output.sh
Executable file
10
travis/build-opm-output.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd . > /dev/null
|
||||
cd opm-output
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
popd > /dev/null
|
||||
Reference in New Issue
Block a user