add imported parser/output sources to build system

use -DENABLE_ECL_INPUT=0 to disable input (and output) support
use -DENABLE_ECL_OUTPUT=0 to disable output support

both default to on
This commit is contained in:
Arne Morten Kvarving 2018-03-05 12:46:51 +01:00
parent dbba64e5c3
commit 932cece7d3
9 changed files with 521 additions and 58 deletions

View File

@ -5,6 +5,19 @@ option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
set(OPM_MACROS_ROOT ${PROJECT_SOURCE_DIR})
option(ENABLE_ECL_INPUT "Enable eclipse input support?" ON)
option(ENABLE_ECL_OUTPUT "Enable eclipse output support?" ON)
# Output implies input
if(ENABLE_ECL_OUTPUT)
set(ENABLE_ECL_INPUT ON)
endif()
# And likewise, no input means no output
if(NOT ENABLE_ECL_INPUT)
set(ENABLE_ECL_OUTPUT OFF)
endif()
# not the same location as most of the other projects; this hook overrides
macro (dir_hook)
endmacro (dir_hook)
@ -15,12 +28,25 @@ set(OPM_PROJECT_EXTRA_CODE_INSTALLED "set(OPM_MACROS_ROOT ${CMAKE_INSTALL_PREFI
set(OPM_PROJECT_EXTRA_CODE_INTREE "set(OPM_MACROS_ROOT ${OPM_MACROS_ROOT})
list(APPEND CMAKE_MODULE_PATH \${OPM_MACROS_ROOT}/cmake/Modules)")
if(ENABLE_ECL_OUTPUT)
set(OPM_PROJECT_EXTRA_CODE_INSTALLED "${OPM_PROJECT_EXTRA_CODE_INSTALLED}
set(COMPARE_SUMMARY_COMMAND ${CMAKE_INSTALL_PREFIX}/bin${${name}_VER_DIR}/compareSummary)
set(COMPARE_ECL_COMMAND ${CMAKE_INSTALL_PREFIX}/bin${${name}_VER_DIR}/compareECL)")
set(OPM_PROJECT_EXTRA_CODE_INTREE "${OPM_PROJECT_EXTRA_CODE_INTREE}
set(COMPARE_SUMMARY_COMMAND ${PROJECT_BINARY_DIR}/bin/compareSummary)
set(COMPARE_ECL_COMMAND ${PROJECT_BINARY_DIR}/bin/compareECL)")
endif()
# project information is in dune.module. Read this file and set variables.
# we cannot generate dune.module since it is read by dunecontrol before
# the build starts, so it makes sense to keep the data there then.
include (OpmInit)
# Look for the opm-data repository; if found the variable
# HAVE_OPM_DATA will be set to true.
include(Findopm-data)
# list of prerequisites for this particular project; this is in a
# separate file (in cmake/Modules sub-directory) because it is shared
# with the find module
@ -31,12 +57,50 @@ include (${project}-prereqs)
include (CMakeLists_files.cmake)
macro (config_hook)
if(ENABLE_ECL_INPUT)
if(NOT cjson_FOUND)
list(APPEND EXTRA_INCLUDES ${PROJECT_SOURCE_DIR}/external/cjson)
endif()
# For this project
include_directories(${EXTRA_INCLUDES} ${PROJECT_BINARY_DIR}/include)
# For downstreams
list(APPEND EXTRA_INCLUDES ${PROJECT_BINARY_DIR}/include)
set(OPM_PROJECT_EXTRA_CODE_INTREE "${OPM_PROJECT_EXTRA_CODE_INTREE}
list(APPEND opm-common_INCLUDE_DIRS ${EXTRA_INCLUDES})")
if(ENABLE_ECL_INPUT)
set(OPM_PROJECT_EXTRA_CODE_INTREE "${OPM_PROJECT_EXTRA_CODE_INTREE}
set(HAVE_ECL_INPUT 1)")
set(OPM_PROJECT_EXTRA_CODE_INSTALLED "${OPM_PROJECT_EXTRA_CODE_INSTALLED}
set(HAVE_ECL_INPUT 1)")
endif()
if(ENABLE_ECL_OUTPUT)
set(OPM_PROJECT_EXTRA_CODE_INTREE "${OPM_PROJECT_EXTRA_CODE_INTREE}
set(HAVE_ECL_OUTPUT 1)")
set(OPM_PROJECT_EXTRA_CODE_INSTALLED "${OPM_PROJECT_EXTRA_CODE_INSTALLED}
set(HAVE_ECL_OUTPUT 1)")
endif()
# Configure boost targets for old cmake
include(cmake/Modules/BoostTargets.cmake)
if (HAVE_DYNAMIC_BOOST_TEST)
set_target_properties(Boost::unit_test_framework PROPERTIES INTERFACE_COMPILE_DEFINITIONS BOOST_TEST_DYN_LINK=1)
endif()
endif()
endmacro (config_hook)
macro (prereqs_hook)
endmacro (prereqs_hook)
macro (sources_hook)
if(ENABLE_ECL_INPUT)
# Keyword generation
include(GenerateKeywords.cmake)
# Append generated sources
list(APPEND opm-common_SOURCES ${PROJECT_BINARY_DIR}/ParserKeywords.cpp)
endif()
endmacro (sources_hook)
macro (fortran_hook)
@ -46,8 +110,17 @@ macro (files_hook)
endmacro (files_hook)
macro (tests_hook)
if(ENABLE_ECL_INPUT)
include(ExtraTests.cmake)
endif()
endmacro (tests_hook)
macro (install_hook)
install(DIRECTORY ${PROJECT_BINARY_DIR}/include/
DESTINATION include
PATTERN *.hpp)
endmacro (install_hook)
# all setup common to the OPM library modules is done here
include (OpmLibMain)

View File

@ -35,6 +35,114 @@ list (APPEND MAIN_SOURCE_FILES
src/opm/common/utility/parameters/ParameterGroup.cpp
src/opm/common/utility/parameters/ParameterTools.cpp
)
if(ENABLE_ECL_INPUT)
list(APPEND MAIN_SOURCE_FILES
src/opm/json/JsonObject.cpp
src/opm/parser/eclipse/Deck/Deck.cpp
src/opm/parser/eclipse/Deck/DeckItem.cpp
src/opm/parser/eclipse/Deck/DeckKeyword.cpp
src/opm/parser/eclipse/Deck/DeckRecord.cpp
src/opm/parser/eclipse/Deck/DeckOutput.cpp
src/opm/parser/eclipse/Deck/Section.cpp
src/opm/parser/eclipse/EclipseState/AquiferCT.cpp
src/opm/parser/eclipse/EclipseState/Aquancon.cpp
src/opm/parser/eclipse/EclipseState/checkDeck.cpp
src/opm/parser/eclipse/EclipseState/Eclipse3DProperties.cpp
src/opm/parser/eclipse/EclipseState/EclipseConfig.cpp
src/opm/parser/eclipse/EclipseState/EclipseState.cpp
src/opm/parser/eclipse/EclipseState/EndpointScaling.cpp
src/opm/parser/eclipse/EclipseState/Grid/Box.cpp
src/opm/parser/eclipse/EclipseState/Grid/BoxManager.cpp
src/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp
src/opm/parser/eclipse/EclipseState/Grid/FaceDir.cpp
src/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp
src/opm/parser/eclipse/EclipseState/Grid/Fault.cpp
src/opm/parser/eclipse/EclipseState/Grid/FaultFace.cpp
src/opm/parser/eclipse/EclipseState/Grid/GridDims.cpp
src/opm/parser/eclipse/EclipseState/Grid/GridProperties.cpp
src/opm/parser/eclipse/EclipseState/Grid/GridProperty.cpp
src/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.cpp
src/opm/parser/eclipse/EclipseState/Grid/NNC.cpp
src/opm/parser/eclipse/EclipseState/Grid/PinchMode.cpp
src/opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.cpp
src/opm/parser/eclipse/EclipseState/Grid/setKeywordBox.cpp
src/opm/parser/eclipse/EclipseState/Grid/TransMult.cpp
src/opm/parser/eclipse/EclipseState/InitConfig/Equil.cpp
src/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp
src/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp
src/opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.cpp
src/opm/parser/eclipse/EclipseState/Runspec.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp
src/opm/parser/eclipse/EclipseState/Schedule/CompletionSet.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Events.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Group.cpp
src/opm/parser/eclipse/EclipseState/Schedule/GroupTree.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MessageLimits.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp
src/opm/parser/eclipse/EclipseState/Schedule/MSW/updatingCompletionsWithSegments.cpp
src/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp
src/opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.cpp
src/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Tuning.cpp
src/opm/parser/eclipse/EclipseState/Schedule/Well.cpp
src/opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.cpp
src/opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.cpp
src/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp
src/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp
src/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp
src/opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.cpp
src/opm/parser/eclipse/EclipseState/Tables/ColumnSchema.cpp
src/opm/parser/eclipse/EclipseState/Tables/JFunc.cpp
src/opm/parser/eclipse/EclipseState/Tables/PvtxTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/SimpleTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableColumn.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableContainer.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableIndex.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableManager.cpp
src/opm/parser/eclipse/EclipseState/Tables/TableSchema.cpp
src/opm/parser/eclipse/EclipseState/Tables/Tables.cpp
src/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp
src/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp
src/opm/parser/eclipse/Parser/MessageContainer.cpp
src/opm/parser/eclipse/Parser/ParseContext.cpp
src/opm/parser/eclipse/Parser/Parser.cpp
src/opm/parser/eclipse/Parser/ParserEnums.cpp
src/opm/parser/eclipse/Parser/ParserItem.cpp
src/opm/parser/eclipse/Parser/ParserKeyword.cpp
src/opm/parser/eclipse/Parser/ParserRecord.cpp
src/opm/parser/eclipse/RawDeck/RawKeyword.cpp
src/opm/parser/eclipse/RawDeck/RawRecord.cpp
src/opm/parser/eclipse/RawDeck/StarToken.cpp
src/opm/parser/eclipse/Units/Dimension.cpp
src/opm/parser/eclipse/Units/UnitSystem.cpp
src/opm/parser/eclipse/Utility/Functional.cpp
src/opm/parser/eclipse/Utility/Stringview.cpp
)
if(NOT cjson_FOUND)
list(APPEND MAIN_SOURCE_FILES external/cjson/cJSON.c)
endif()
endif()
if(ENABLE_ECL_OUTPUT)
list( APPEND MAIN_SOURCE_FILES
src/opm/test_util/summaryIntegrationTest.cpp
src/opm/test_util/summaryRegressionTest.cpp
src/opm/test_util/summaryComparator.cpp
src/opm/test_util/EclFilesComparator.cpp
src/opm/output/eclipse/EclipseGridInspector.cpp
src/opm/output/eclipse/EclipseIO.cpp
src/opm/output/eclipse/LinearisedOutputTable.cpp
src/opm/output/eclipse/RestartIO.cpp
src/opm/output/eclipse/Summary.cpp
src/opm/output/eclipse/Tables.cpp
src/opm/output/eclipse/RegionCache.cpp
src/opm/output/data/Solution.cpp
)
endif()
list (APPEND TEST_SOURCE_FILES
tests/test_cmp.cpp
@ -47,19 +155,127 @@ list (APPEND TEST_SOURCE_FILES
tests/test_sparsevector.cpp
tests/test_uniformtablelinear.cpp
)
if(ENABLE_ECL_INPUT)
list(APPEND TEST_SOURCE_FILES
tests/parser/ADDREGTests.cpp
tests/parser/AquiferCTTests.cpp
tests/parser/AqudimsTests.cpp
tests/parser/AquanconTests.cpp
tests/parser/BoxTests.cpp
tests/parser/ColumnSchemaTests.cpp
tests/parser/CompletionTests.cpp
tests/parser/COMPSEGUnits.cpp
tests/parser/CopyRegTests.cpp
tests/parser/DeckTests.cpp
tests/parser/DynamicStateTests.cpp
tests/parser/DynamicVectorTests.cpp
tests/parser/Eclipse3DPropertiesTests.cpp
tests/parser/EclipseGridTests.cpp
tests/parser/EqualRegTests.cpp
tests/parser/EventTests.cpp
tests/parser/FaceDirTests.cpp
tests/parser/FaultTests.cpp
tests/parser/FunctionalTests.cpp
tests/parser/GeomodifierTests.cpp
tests/parser/GridPropertyTests.cpp
tests/parser/GroupTests.cpp
tests/parser/InitConfigTest.cpp
tests/parser/IOConfigTests.cpp
tests/parser/MessageContainerTest.cpp
tests/parser/MessageLimitTests.cpp
tests/parser/MultiRegTests.cpp
tests/parser/MultisegmentWellTests.cpp
tests/parser/MULTREGTScannerTests.cpp
tests/parser/OrderedMapTests.cpp
tests/parser/ParseContextTests.cpp
tests/parser/PORVTests.cpp
tests/parser/RawKeywordTests.cpp
tests/parser/RestartConfigTests.cpp
tests/parser/RunspecTests.cpp
tests/parser/SatfuncPropertyInitializersTests.cpp
tests/parser/ScheduleTests.cpp
tests/parser/SectionTests.cpp
tests/parser/SimpleTableTests.cpp
tests/parser/SimulationConfigTest.cpp
tests/parser/StarTokenTests.cpp
tests/parser/StringTests.cpp
tests/parser/SummaryConfigTests.cpp
tests/parser/TabdimsTests.cpp
tests/parser/TableColumnTests.cpp
tests/parser/TableContainerTests.cpp
tests/parser/TableManagerTests.cpp
tests/parser/TableSchemaTests.cpp
tests/parser/ThresholdPressureTest.cpp
tests/parser/TimeMapTest.cpp
tests/parser/TransMultTests.cpp
tests/parser/TuningTests.cpp
tests/parser/UnitTests.cpp
tests/parser/ValueTests.cpp
tests/parser/WellSolventTests.cpp
tests/parser/WellTests.cpp)
endif()
if(ENABLE_ECL_OUTPUT)
list (APPEND TEST_SOURCE_FILES
tests/test_compareSummary.cpp
tests/test_EclFilesComparator.cpp
tests/test_EclipseIO.cpp
tests/test_LinearisedOutputTable.cpp
tests/test_Restart.cpp
tests/test_RFT.cpp
tests/test_Summary.cpp
tests/test_Tables.cpp
tests/test_Wells.cpp
tests/test_writenumwells.cpp
tests/test_Solution.cpp
tests/test_regionCache.cpp
)
endif()
list (APPEND TEST_DATA_FILES
tests/testdata.param
)
if(ENABLE_ECL_OUTPUT)
list (APPEND TEST_DATA_FILES
tests/FIRST_SIM.DATA
tests/summary_deck.DATA
tests/group_group.DATA
tests/testblackoilstate3.DATA
tests/testrft.DATA
tests/table_deck.DATA
tests/summary_deck_non_constant_porosity.DATA
tests/SUMMARY_EFF_FAC.DATA
)
endif()
list (APPEND EXAMPLE_SOURCE_FILES
)
if(ENABLE_ECL_INPUT)
list (APPEND EXAMPLE_SOURCE_FILES
examples/opmi.cpp
)
endif()
if(ENABLE_ECL_OUTPUT)
list(APPEND EXAMPLE_SOURCE_FILES
examples/test_util/compareECL.cpp
examples/test_util/compareSummary.cpp
)
endif()
# programs listed here will not only be compiled, but also marked for
# installation
list (APPEND PROGRAM_SOURCE_FILES
)
if(ENABLE_ECL_INPUT)
list (APPEND PROGRAM_SOURCE_FILES
examples/opmi.cpp
)
endif()
if(ENABLE_ECL_OUTPUT)
list(APPEND PROGRAM_SOURCE_FILES
examples/test_util/compareECL.cpp
examples/test_util/compareSummary.cpp
)
endif()
list( APPEND PUBLIC_HEADER_FILES
opm/common/ErrorMacros.hpp
@ -94,3 +310,171 @@ list( APPEND PUBLIC_HEADER_FILES
opm/common/utility/parameters/ParameterStrings.hpp
opm/common/utility/parameters/ParameterTools.hpp
)
if(ENABLE_ECL_INPUT)
list(APPEND PUBLIC_HEADER_FILES
opm/json/JsonObject.hpp
opm/parser/eclipse/Utility/Stringview.hpp
opm/parser/eclipse/Utility/Functional.hpp
opm/parser/eclipse/Utility/Typetools.hpp
opm/parser/eclipse/Utility/String.hpp
opm/parser/eclipse/Generator/KeywordGenerator.hpp
opm/parser/eclipse/Generator/KeywordLoader.hpp
opm/parser/eclipse/Units/UnitSystem.hpp
opm/parser/eclipse/Units/Units.hpp
opm/parser/eclipse/Units/Dimension.hpp
opm/parser/eclipse/Parser/ParserItem.hpp
opm/parser/eclipse/Parser/Parser.hpp
opm/parser/eclipse/Parser/ParserRecord.hpp
opm/parser/eclipse/Parser/MessageContainer.hpp
opm/parser/eclipse/Parser/ParserKeyword.hpp
opm/parser/eclipse/Parser/InputErrorAction.hpp
opm/parser/eclipse/Parser/ParserEnums.hpp
opm/parser/eclipse/Parser/ParseContext.hpp
opm/parser/eclipse/Parser/ParserConst.hpp
opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp
opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp
opm/parser/eclipse/EclipseState/Util/Value.hpp
opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp
opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp
opm/parser/eclipse/EclipseState/Grid/GridDims.hpp
opm/parser/eclipse/EclipseState/Grid/TransMult.hpp
opm/parser/eclipse/EclipseState/Grid/GridProperties.hpp
opm/parser/eclipse/EclipseState/Grid/PinchMode.hpp
opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp
opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp
opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp
opm/parser/eclipse/EclipseState/Grid/Fault.hpp
opm/parser/eclipse/EclipseState/Grid/Box.hpp
opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp
opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp
opm/parser/eclipse/EclipseState/Grid/NNC.hpp
opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp
opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp
opm/parser/eclipse/EclipseState/Grid/FaceDir.hpp
opm/parser/eclipse/EclipseState/Grid/MinpvMode.hpp
opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp
opm/parser/eclipse/EclipseState/EndpointScaling.hpp
opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp
opm/parser/eclipse/EclipseState/Tables/PdvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/TlpmixpaTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp
opm/parser/eclipse/EclipseState/Tables/VFPProdTable.hpp
opm/parser/eclipse/EclipseState/Tables/MsfnTable.hpp
opm/parser/eclipse/EclipseState/Tables/GasvisctTable.hpp
opm/parser/eclipse/EclipseState/Tables/Regdims.hpp
opm/parser/eclipse/EclipseState/Tables/Eqldims.hpp
opm/parser/eclipse/EclipseState/Tables/SpecrockTable.hpp
opm/parser/eclipse/EclipseState/Tables/PlydhflfTable.hpp
opm/parser/eclipse/EclipseState/Tables/PlyshlogTable.hpp
opm/parser/eclipse/EclipseState/Tables/RsvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/VFPInjTable.hpp
opm/parser/eclipse/EclipseState/Tables/SpecheatTable.hpp
opm/parser/eclipse/EclipseState/Tables/SgcwmisTable.hpp
opm/parser/eclipse/EclipseState/Tables/Sof2Table.hpp
opm/parser/eclipse/EclipseState/Tables/TableManager.hpp
opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp
opm/parser/eclipse/EclipseState/Tables/EnptvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp
opm/parser/eclipse/EclipseState/Tables/FlatTable.hpp
opm/parser/eclipse/EclipseState/Tables/Aqudims.hpp
opm/parser/eclipse/EclipseState/Tables/JFunc.hpp
opm/parser/eclipse/EclipseState/Tables/TableIndex.hpp
opm/parser/eclipse/EclipseState/Tables/PvtgTable.hpp
opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp
opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp
opm/parser/eclipse/EclipseState/Tables/RocktabTable.hpp
opm/parser/eclipse/EclipseState/Tables/EnkrvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/PlyrockTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvtxTable.hpp
opm/parser/eclipse/EclipseState/Tables/WatvisctTable.hpp
opm/parser/eclipse/EclipseState/Tables/TableEnums.hpp
opm/parser/eclipse/EclipseState/Tables/RvvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp
opm/parser/eclipse/EclipseState/Tables/AqutabTable.hpp
opm/parser/eclipse/EclipseState/Tables/PlyadsTable.hpp
opm/parser/eclipse/EclipseState/Tables/PbvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/SorwmisTable.hpp
opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp
opm/parser/eclipse/EclipseState/Tables/PlyviscTable.hpp
opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp
opm/parser/eclipse/EclipseState/Tables/SsfnTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp
opm/parser/eclipse/EclipseState/Tables/OilvisctTable.hpp
opm/parser/eclipse/EclipseState/Tables/SgfnTable.hpp
opm/parser/eclipse/EclipseState/Tables/MiscTable.hpp
opm/parser/eclipse/EclipseState/Tables/SgwfnTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvdsTable.hpp
opm/parser/eclipse/EclipseState/Tables/PvtoTable.hpp
opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp
opm/parser/eclipse/EclipseState/Tables/PmiscTable.hpp
opm/parser/eclipse/EclipseState/Tables/RtempvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/SlgofTable.hpp
opm/parser/eclipse/EclipseState/Tables/ImptvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/ImkrvdTable.hpp
opm/parser/eclipse/EclipseState/Tables/Sof3Table.hpp
opm/parser/eclipse/EclipseState/Tables/SgofTable.hpp
opm/parser/eclipse/EclipseState/EclipseState.hpp
opm/parser/eclipse/EclipseState/EclipseConfig.hpp
opm/parser/eclipse/EclipseState/Aquancon.hpp
opm/parser/eclipse/EclipseState/AquiferCT.hpp
opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp
opm/parser/eclipse/EclipseState/Schedule/Well.hpp
opm/parser/eclipse/EclipseState/Schedule/WellInjectionProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/DynamicVector.hpp
opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
opm/parser/eclipse/EclipseState/Schedule/WellEconProductionLimits.hpp
opm/parser/eclipse/EclipseState/Schedule/WellPolymerProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp
opm/parser/eclipse/EclipseState/Schedule/Group.hpp
opm/parser/eclipse/EclipseState/Schedule/MessageLimits.hpp
opm/parser/eclipse/EclipseState/Schedule/Events.hpp
opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp
opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp
opm/parser/eclipse/EclipseState/Schedule/Completion.hpp
opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp
opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp
opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp
opm/parser/eclipse/EclipseState/Schedule/MSW/updatingCompletionsWithSegments.hpp
opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp
opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp
opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp
opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp
opm/parser/eclipse/EclipseState/IOConfig/RestartConfig.hpp
opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp
opm/parser/eclipse/EclipseState/checkDeck.hpp
opm/parser/eclipse/EclipseState/Runspec.hpp
opm/parser/eclipse/Deck/DeckItem.hpp
opm/parser/eclipse/Deck/Deck.hpp
opm/parser/eclipse/Deck/Section.hpp
opm/parser/eclipse/Deck/DeckOutput.hpp
opm/parser/eclipse/Deck/DeckKeyword.hpp
opm/parser/eclipse/Deck/DeckRecord.hpp
opm/parser/eclipse/RawDeck/StarToken.hpp
opm/parser/eclipse/RawDeck/RawEnums.hpp
opm/parser/eclipse/RawDeck/RawRecord.hpp
opm/parser/eclipse/RawDeck/RawKeyword.hpp
opm/parser/eclipse/RawDeck/RawConsts.hpp)
endif()
if(ENABLE_ECL_OUTPUT)
list(APPEND PUBLIC_HEADER_FILES
opm/output/OutputWriter.hpp
opm/output/data/Wells.hpp
opm/output/data/Cells.hpp
opm/test_util/summaryRegressionTest.hpp
opm/test_util/summaryIntegrationTest.hpp
opm/test_util/summaryComparator.hpp
opm/output/eclipse/EclipseGridInspector.hpp
opm/output/eclipse/EclipseIOUtil.hpp
opm/output/eclipse/EclipseIO.hpp
opm/output/eclipse/LinearisedOutputTable.hpp
opm/output/eclipse/RestartIO.hpp
opm/output/eclipse/RestartValue.hpp
opm/output/eclipse/Summary.hpp
opm/output/eclipse/Tables.hpp
opm/output/eclipse/RegionCache.hpp
opm/output/data/Solution.hpp
opm/test_util/EclFilesComparator.hpp
opm/test_util/summaryRegressionTest.hpp
opm/test_util/summaryComparator.hpp)
endif()

View File

@ -1,5 +1,5 @@
# Libs to link tests against
set(TEST_LIBS opmparser ecl Boost::unit_test_framework)
set(TEST_LIBS opmcommon ecl Boost::unit_test_framework)
set(EXTRA_TESTS)
# Generated source, needs to be here
@ -11,23 +11,23 @@ list(APPEND EXTRA_TESTS inlinekw)
# Extra compile definitions and extra parameters
include(cmake/Modules/CheckCaseSensitiveFileSystem.cmake)
set(_testdir ${PROJECT_SOURCE_DIR}/lib/eclipse/tests/data)
set(_testdir ${PROJECT_SOURCE_DIR}/tests/parser/data)
opm_add_test(LoaderTest
SOURCES lib/eclipse/tests/KeywordLoaderTests.cpp
lib/eclipse/Generator/KeywordLoader.cpp
SOURCES tests/parser/KeywordLoaderTests.cpp
src/opm/parser/eclipse/Generator/KeywordLoader.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/parser/keyword-generator/)
list(APPEND EXTRA_TESTS LoaderTest)
opm_add_test(ParserTests
SOURCES lib/eclipse/tests/ParserTests.cpp
SOURCES tests/parser/ParserTests.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/)
list(APPEND EXTRA_TESTS ParserTests)
opm_add_test(ParserIncludeTests
SOURCES lib/eclipse/tests/ParserIncludeTests.cpp
SOURCES tests/parser/ParserIncludeTests.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/parser/)
target_compile_definitions(ParserIncludeTests PRIVATE
@ -35,13 +35,13 @@ target_compile_definitions(ParserIncludeTests PRIVATE
list(APPEND EXTRA_TESTS ParserIncludeTests)
opm_add_test(PvtxTableTests
SOURCES lib/eclipse/tests/PvtxTableTests.cpp
SOURCES tests/parser/PvtxTableTests.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/integration_tests/)
list(APPEND EXTRA_TESTS PvtxTableTests)
opm_add_test(EclipseStateTests
SOURCES lib/eclipse/tests/EclipseStateTests.cpp
SOURCES tests/parser/EclipseStateTests.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/integration_tests/)
list(APPEND EXTRA_TESTS EclipseStateTests)
@ -62,7 +62,7 @@ foreach (test BoxTest
TransMultIntegrationTests)
opm_add_test(${test}
SOURCES lib/eclipse/tests/integration/${test}.cpp
SOURCES tests/parser/integration/${test}.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${_testdir}/integration_tests/)
list(APPEND EXTRA_TESTS ${test})
@ -71,7 +71,7 @@ endforeach ()
# opm-data dependent tests
if(HAVE_OPM_DATA)
opm_add_test(parse_write ONLY_COMPILE
SOURCES lib/eclipse/tests/integration/parse_write.cpp
SOURCES tests/parser/integration/parse_write.cpp
LIBRARIES ${TEST_LIBS})
list(APPEND EXTRA_TESTS parse_write)
foreach (deck ${OPM_DATA_ROOT}/norne/NORNE_ATW2013.DATA
@ -102,7 +102,7 @@ endif()
# JSON tests
opm_add_test(jsonTests
SOURCES lib/json/tests/jsonTests.cpp
SOURCES tests/json/jsonTests.cpp
LIBRARIES ${TEST_LIBS}
TEST_ARGS ${PROJECT_SOURCE_DIR}/lib/json/tests/example1.json)
TEST_ARGS ${PROJECT_SOURCE_DIR}/tests/json/example1.json)
list(APPEND EXTRA_TESTS jsonTests)

View File

@ -1,24 +1,24 @@
set(genkw_SOURCES lib/json/JsonObject.cpp
lib/eclipse/Parser/createDefaultKeywordList.cpp
lib/eclipse/Deck/Deck.cpp
lib/eclipse/Deck/DeckItem.cpp
lib/eclipse/Deck/DeckKeyword.cpp
lib/eclipse/Deck/DeckRecord.cpp
lib/eclipse/Deck/DeckOutput.cpp
lib/eclipse/Generator/KeywordGenerator.cpp
lib/eclipse/Generator/KeywordLoader.cpp
lib/eclipse/Parser/MessageContainer.cpp
lib/eclipse/Parser/ParseContext.cpp
lib/eclipse/Parser/ParserEnums.cpp
lib/eclipse/Parser/ParserItem.cpp
lib/eclipse/Parser/ParserKeyword.cpp
lib/eclipse/Parser/ParserRecord.cpp
lib/eclipse/RawDeck/RawKeyword.cpp
lib/eclipse/RawDeck/RawRecord.cpp
lib/eclipse/RawDeck/StarToken.cpp
lib/eclipse/Units/Dimension.cpp
lib/eclipse/Units/UnitSystem.cpp
lib/eclipse/Utility/Stringview.cpp
set(genkw_SOURCES src/opm/json/JsonObject.cpp
src/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp
src/opm/parser/eclipse/Deck/Deck.cpp
src/opm/parser/eclipse/Deck/DeckItem.cpp
src/opm/parser/eclipse/Deck/DeckKeyword.cpp
src/opm/parser/eclipse/Deck/DeckRecord.cpp
src/opm/parser/eclipse/Deck/DeckOutput.cpp
src/opm/parser/eclipse/Generator/KeywordGenerator.cpp
src/opm/parser/eclipse/Generator/KeywordLoader.cpp
src/opm/parser/eclipse/Parser/MessageContainer.cpp
src/opm/parser/eclipse/Parser/ParseContext.cpp
src/opm/parser/eclipse/Parser/ParserEnums.cpp
src/opm/parser/eclipse/Parser/ParserItem.cpp
src/opm/parser/eclipse/Parser/ParserKeyword.cpp
src/opm/parser/eclipse/Parser/ParserRecord.cpp
src/opm/parser/eclipse/RawDeck/RawKeyword.cpp
src/opm/parser/eclipse/RawDeck/RawRecord.cpp
src/opm/parser/eclipse/RawDeck/StarToken.cpp
src/opm/parser/eclipse/Units/Dimension.cpp
src/opm/parser/eclipse/Units/UnitSystem.cpp
src/opm/parser/eclipse/Utility/Stringview.cpp
)
if(NOT cjson_FOUND)
list(APPEND genkw_SOURCES external/cjson/cJSON.c)
@ -26,13 +26,11 @@ endif()
add_executable(genkw ${genkw_SOURCES})
target_link_libraries(genkw ecl Boost::regex Boost::filesystem Boost::system)
target_include_directories(genkw PRIVATE lib/eclipse/include
lib/json/include)
# Generate keyword list
include(lib/eclipse/share/keywords/keyword_list.cmake)
string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/lib/eclipse/share/keywords/\\1" keyword_files "${keywords}")
configure_file(lib/eclipse/keyword_list.argv.in keyword_list.argv)
include(src/opm/parser/eclipse/share/keywords/keyword_list.cmake)
string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/src/opm/parser/eclipse/share/keywords/\\1" keyword_files "${keywords}")
configure_file(src/opm/parser/eclipse/keyword_list.argv.in keyword_list.argv)
# Generate keyword source
add_custom_command(
@ -42,5 +40,5 @@ add_custom_command(
${PROJECT_BINARY_DIR}/include/
opm/parser/eclipse/Parser/ParserKeywords
${PROJECT_BINARY_DIR}/inlinekw.cpp
DEPENDS genkw ${keyword_files} lib/eclipse/share/keywords/keyword_list.cmake
DEPENDS genkw ${keyword_files} src/opm/parser/eclipse/share/keywords/keyword_list.cmake
)

3
debian/control vendored
View File

@ -4,7 +4,8 @@ Maintainer: Arne Morten Kvarving <arne.morten.kvarving@sintef.no>
Build-Depends: build-essential, debhelper (>= 9),
pkg-config, cmake, git, libtool, doxygen,
texlive-latex-extra, texlive-latex-recommended,
ghostscript, libboost-system-dev, libboost-test-dev
ghostscript, libboost-system-dev, libboost-test-dev,
libecl-dev, libboost-regex-dev, libboost-filesystem-dev
Standards-Version: 3.9.2
Section: libs
Homepage: http://opm-project.org

View File

@ -6,12 +6,15 @@ source `dirname $0`/build-opm-module.sh
mkdir deps
ln -sf $WORKSPACE deps/opm-common
declare -a upstreams
upstreams=(libecl)
declare -A upstreamRev
upstreamRev[libecl]=master
# Downstreams and revisions
declare -a downstreams
downstreams=(libecl
opm-parser
opm-output
opm-material
downstreams=(opm-material
opm-grid
ewoms
opm-simulators
@ -19,11 +22,8 @@ downstreams=(libecl
)
declare -A downstreamRev
downstreamRev[libecl]=master
downstreamRev[opm-parser]=master
downstreamRev[opm-material]=master
downstreamRev[opm-grid]=master
downstreamRev[opm-output]=master
downstreamRev[ewoms]=master
downstreamRev[opm-simulators]=master
downstreamRev[opm-upscaling]=master
@ -31,10 +31,7 @@ downstreamRev[opm-upscaling]=master
parseRevisions
printHeader opm-common
# Setup opm-data if necessary
if grep -q "with downstreams" <<< $ghprbCommentBody
then
# Setup opm-data
source $WORKSPACE/deps/opm-common/jenkins/setup-opm-data.sh
fi
build_module_full opm-common

View File

@ -11,7 +11,17 @@ set (opm-common_DEPS
"C99"
# compile with C++0x/11 support if available
"CXX11Features REQUIRED"
)
if(ENABLE_ECL_INPUT)
list(APPEND opm-common_DEPS
"ecl REQUIRED"
# various runtime library enhancements
"Boost 1.44.0
COMPONENTS system unit_test_framework REQUIRED"
)
COMPONENTS system filesystem unit_test_framework regex REQUIRED")
else()
list(APPEND opm-common_DEPS
# various runtime library enhancements
"Boost 1.44.0
COMPONENTS system unit_test_framework REQUIRED")
endif()

View File

@ -12,7 +12,7 @@ License: GPL-3.0
Group: Development/Libraries/C and C++
Url: http://www.opm-project.org/
Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: git doxygen bc devtoolset-6-toolchain
BuildRequires: git doxygen bc devtoolset-6-toolchain ecl-devel
%{?el6:BuildRequires: cmake3 boost148-devel}
%{!?el6:BuildRequires: cmake boost-devel}
BuildRoot: %{_tmppath}/%{name}-%{version}-build

View File

@ -24,7 +24,7 @@
#include "config.h"
#include "EclipseIO.hpp"
#include <opm/output/eclipse/EclipseIO.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Units/Dimension.hpp>