diff --git a/CMakeLists.txt b/CMakeLists.txt
index d0b116b5b59..ef829c2a07a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -157,27 +157,51 @@ endif()
# Build the compare utilities
if(ENABLE_ECL_INPUT)
- add_library(testutil STATIC
- examples/test_util/EclFile.cpp
- examples/test_util/EclFilesComparator.cpp
- examples/test_util/EclOutput.cpp
- examples/test_util/EclRegressionTest.cpp
- examples/test_util/EclUtil.cpp
- examples/test_util/EGrid.cpp
- examples/test_util/ERft.cpp
- examples/test_util/ERst.cpp
- examples/test_util/ESmry.cpp)
+ add_executable(compareECL
+ test_util/EclFilesComparator.cpp
+ test_util/EclRegressionTest.cpp
+ test_util/compareECL.cpp
+ )
+
+ add_executable(convertECL
+ test_util/convertECL.cpp
+ )
+
foreach(target compareECL convertECL)
- add_executable(${target} examples/test_util/${target}.cpp)
- target_link_libraries(${target} testutil opmcommon)
+ target_link_libraries(${target} opmcommon)
install(TARGETS ${target} DESTINATION bin)
endforeach()
# Add the tests
- set(_libs testutil opmcommon
+ set(_libs opmcommon
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
- foreach(test test_EclFilesComparator test_EclIO test_EclRegressionTest
- test_EGrid test_ERft test_ERst test_ESmry)
+
+ opm_add_test(test_EclFilesComparator
+ CONDITION
+ ENABLE_ECL_INPUT
+ SOURCES
+ tests/test_EclFilesComparator.cpp
+ test_util/EclFilesComparator.cpp
+ LIBRARIES
+ ${_libs}
+ WORKING_DIRECTORY
+ ${PROJECT_BINARY_DIR}/tests
+ )
+
+ opm_add_test(test_EclRegressionTest
+ CONDITION
+ ENABLE_ECL_INPUT
+ SOURCES
+ tests/test_EclRegressionTest.cpp
+ test_util/EclFilesComparator.cpp
+ test_util/EclRegressionTest.cpp
+ LIBRARIES
+ ${_libs}
+ WORKING_DIRECTORY
+ ${PROJECT_BINARY_DIR}/tests
+ )
+
+ foreach(test test_EclIO test_EGrid test_ERft test_ERst test_ESmry)
opm_add_test(${test} CONDITION ENABLE_ECL_INPUT
LIBRARIES ${_libs}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake
index e9fb36d5bb7..18a44f1b7ad 100644
--- a/CMakeLists_files.cmake
+++ b/CMakeLists_files.cmake
@@ -164,6 +164,13 @@ if(ENABLE_ECL_INPUT)
endif()
if(ENABLE_ECL_OUTPUT)
list( APPEND MAIN_SOURCE_FILES
+ src/opm/io/eclipse/EclFile.cpp
+ src/opm/io/eclipse/EclOutput.cpp
+ src/opm/io/eclipse/EclUtil.cpp
+ src/opm/io/eclipse/EGrid.cpp
+ src/opm/io/eclipse/ERft.cpp
+ src/opm/io/eclipse/ERst.cpp
+ src/opm/io/eclipse/ESmry.cpp
src/opm/output/eclipse/AggregateConnectionData.cpp
src/opm/output/eclipse/AggregateGroupData.cpp
src/opm/output/eclipse/AggregateMSWData.cpp
@@ -562,6 +569,14 @@ if(ENABLE_ECL_INPUT)
endif()
if(ENABLE_ECL_OUTPUT)
list(APPEND PUBLIC_HEADER_FILES
+ opm/io/eclipse/EclFile.hpp
+ opm/io/eclipse/EclIOdata.hpp
+ opm/io/eclipse/EclOutput.hpp
+ opm/io/eclipse/EclUtil.hpp
+ opm/io/eclipse/EGrid.hpp
+ opm/io/eclipse/ERft.hpp
+ opm/io/eclipse/ERst.hpp
+ opm/io/eclipse/ESmry.hpp
opm/output/data/Cells.hpp
opm/output/data/Solution.hpp
opm/output/data/Wells.hpp
diff --git a/examples/test_util/EGrid.hpp b/opm/io/eclipse/EGrid.hpp
similarity index 91%
rename from examples/test_util/EGrid.hpp
rename to opm/io/eclipse/EGrid.hpp
index 7cb570565ed..cada6c31c44 100644
--- a/examples/test_util/EGrid.hpp
+++ b/opm/io/eclipse/EGrid.hpp
@@ -16,10 +16,10 @@
along with OPM. If not, see .
*/
-#ifndef EGRID_HPP
-#define EGRID_HPP
+#ifndef OPM_IO_EGRID_HPP
+#define OPM_IO_EGRID_HPP
-#include "EclFile.hpp"
+#include
#include
#include
@@ -29,6 +29,7 @@
#include
#include