Skip to content

Commit

Permalink
Merge pull request equinor#69 from markusdregi/cmake_statoil
Browse files Browse the repository at this point in the history
Minor changes to make CMAKE friendly towards statoil-data again
  • Loading branch information
markusdregi authored May 18, 2017
2 parents 02f3211 + 312e5ac commit 70c944e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ if (EXISTS ${STATOIL_TESTDATA_ROOT})

EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E create_symlink "${STATOIL_TESTDATA_ROOT}" "${LINK}")
message(STATUS "Linking testdata: ${LINK} -> ${STATOIL_TESTDATA_ROOT}")

set(_statoil_test_data ${CMAKE_SOURCE_DIR}/test-data/Statoil)
set(_eclpath ${_statoil_test_data}/ECLIPSE)
set(_geopath ${_statoil_test_data}/Geometry)
endif()


Expand Down
18 changes: 8 additions & 10 deletions libecl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,24 +128,22 @@ endif()
add_executable(ecl_coarse_test tests/ecl_coarse_test.c)
target_link_libraries(ecl_coarse_test ecl)
add_test(NAME ecl_coarse_test COMMAND ecl_coarse_test
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/LGCcase/LGC_TESTCASE2)
${_eclpath}/LGCcase/LGC_TESTCASE2)

add_executable(ecl_grid_layer_contains tests/ecl_grid_layer_contains.c)
target_link_libraries(ecl_grid_layer_contains ecl)
add_test(NAME ecl_grid_layer_contains1 COMMAND ecl_grid_layer_contains
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.EGRID)
add_test(ecl_grid_layer_contains2
ecl_grid_layer_contains
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Mariner/MARINER.EGRID)
${_eclpath}/Gurbat/ECLIPSE.EGRID)
add_test(NAME ecl_grid_layer_contains2 COMMAND ecl_grid_layer_contains
${_eclpath}/Mariner/MARINER.EGRID)

add_executable(ecl_restart_test tests/ecl_restart_test.c)
target_link_libraries(ecl_restart_test ecl)
add_test(NAME ecl_restart_test COMMAND ecl_restart_test
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Gurbat/ECLIPSE.UNRST)
${_eclpath}/Gurbat/ECLIPSE.UNRST)

add_executable(ecl_nnc_export tests/ecl_nnc_export.c)
target_link_libraries(ecl_nnc_export ecl)
set(_eclpath ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE)
add_test(NAME ecl_nnc_export1 COMMAND ecl_nnc_export ${_eclpath}/Gurbat/ECLIPSE TRUE)
add_test(NAME ecl_nnc_export2 COMMAND ecl_nnc_export ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC TRUE)
add_test(NAME ecl_nnc_export3 COMMAND ecl_nnc_export ${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3 TRUE)
Expand All @@ -157,13 +155,13 @@ add_test(NAME ecl_nnc_export7 COMMAND ecl_nnc_export ${_eclpath}/TYRIHANS/BASE20
add_executable(ecl_nnc_export_get_tran tests/ecl_nnc_export_get_tran.c)
target_link_libraries(ecl_nnc_export_get_tran ecl)
add_test(NAME ecl_nnc_export_get_tran COMMAND ecl_nnc_export_get_tran
${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3)
${_eclpath}/Troll/MSW_LGR/2BRANCHES-CCEWELLPATH-NEW-SCH-TUNED-AR3)

add_executable(ecl_util_make_date_shift tests/ecl_util_make_date_shift.c)
target_link_libraries(ecl_util_make_date_shift ecl)
add_test(NAME ecl_util_make_date_shift COMMAND ecl_util_make_date_shift)

add_executable(ecl_sum_case_exists ecl_sum_case_exists.c)
add_executable(ecl_sum_case_exists tests/ecl_sum_case_exists.c)
target_link_libraries(ecl_sum_case_exists ecl)
add_test(NAME ecl_sum_case_exists COMMAND ecl_sum_case_exists
${_eclpath}/Gurbat/ECLIPSE
Expand Down Expand Up @@ -237,7 +235,7 @@ add_test(NAME ecl_grid_volume4 COMMAND ecl_grid_volume ${_eclpath}/Norne/reservo
# has been different in this file - i.e. that the absolute value of the individual
# tetrahedron parts have been taken during the sum, and not at the end. At least the ert
# algorithm gets volumes ~ 0 whereas ECLIPSE reports ~10^9 for the same cell.
# add_test( ecl_grid_volume5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE/Heidrun/Summary/FF12_2013B3_CLEAN_RS)
# add_test( ecl_grid_volume5 ${EXECUTABLE_OUTPUT_PATH}/ecl_grid_volume ${_eclpath}/Heidrun/Summary/FF12_2013B3_CLEAN_RS)

add_executable(ecl_grid_dims tests/ecl_grid_dims.c)
target_link_libraries(ecl_grid_dims ecl)
Expand Down
16 changes: 7 additions & 9 deletions libecl_well/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ target_link_libraries( well_state_load ecl_well)
add_executable(well_state_load_missing_RSEG tests/well_state_load_missing_RSEG.c)
target_link_libraries(well_state_load_missing_RSEG ecl_well)

set(_eclpath ${PROJECT_SOURCE_DIR}/test-data/Statoil/ECLIPSE)

add_test(NAME well_state_load1 COMMAND well_state_load ${_eclpath}/Gurbat/ECLIPSE.EGRID
${_eclpath}/Gurbat/ECLIPSE.X0030)
add_test(NAME well_state_load2 COMMAND well_state_load ${_eclpath}/MSWcase/MSW_CASE.EGRID
Expand All @@ -79,7 +77,7 @@ add_test(NAME well_state_load_missing_RSEG2
add_executable(well_segment_load tests/well_segment_load.c)
target_link_libraries(well_segment_load ecl_well)
add_test(NAME well_segment_load
COMMAND well_segment_load ${_eclpath}/ECLIPSE/MSWcase/MSW_CASE.X0021)
COMMAND well_segment_load ${_eclpath}/MSWcase/MSW_CASE.X0021)

add_executable(well_segment_branch_conn_load tests/well_segment_branch_conn_load.c)
target_link_libraries(well_segment_branch_conn_load ecl_well)
Expand All @@ -96,12 +94,12 @@ add_test(NAME well_conn_CF COMMAND well_conn_CF ${_eclpath}/Gurbat/ECLIPSE.X0060

add_executable(well_conn_load tests/well_conn_load.c)
target_link_libraries(well_conn_load ecl_well)
add_test(NAME well_conn_load1 COMMADN well_conn_load ${_eclpath}/Gurbat/ECLIPSE.X0030 F)
add_test(NAME well_conn_load2 COMMADN well_conn_load ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.X0021 F)
add_test(NAME well_conn_load3 COMMADN well_conn_load ${_eclpath}/MSWcase/MSW_CASE.X0021 T)
add_test(NAME well_conn_load4 COMMADN well_conn_load ${_eclpath}/AmalgLGRcase/TESTCASE_AMALG_LGR.X0021 F)
add_test(NAME well_conn_load5 COMMADN well_conn_load ${_eclpath}/DualPoro/DUALPORO.X0009 F)
add_test(NAME well_conn_load6 COMMADN well_conn_load ${_eclpath}/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003 F)
add_test(NAME well_conn_load1 COMMAND well_conn_load ${_eclpath}/Gurbat/ECLIPSE.X0030 F)
add_test(NAME well_conn_load2 COMMAND well_conn_load ${_eclpath}/10kcase/TEST10K_FLT_LGR_NNC.X0021 F)
add_test(NAME well_conn_load3 COMMAND well_conn_load ${_eclpath}/MSWcase/MSW_CASE.X0021 T)
add_test(NAME well_conn_load4 COMMAND well_conn_load ${_eclpath}/AmalgLGRcase/TESTCASE_AMALG_LGR.X0021 F)
add_test(NAME well_conn_load5 COMMAND well_conn_load ${_eclpath}/DualPoro/DUALPORO.X0009 F)
add_test(NAME well_conn_load6 COMMAND well_conn_load ${_eclpath}/0.9.2_LGR/BASE_REF_XY3Z1_T30_WI.X0003 F)

add_executable(well_ts tests/well_ts.c)
target_link_libraries(well_ts ecl_well)
Expand Down
4 changes: 2 additions & 2 deletions libgeometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ endif ()
add_executable(geo_surface tests/geo_surface.c)
target_link_libraries(geo_surface ert_geometry)
add_test(NAME geo_surface COMMAND geo_surface
${PROJECT_SOURCE_DIR}/test-data/Statoil/Geometry/Surface.irap
${PROJECT_SOURCE_DIR}/test-data/Statoil/Geometry/Surface_incompatible.irap)
${_geopath}/Surface.irap
${_geopath}/Surface_incompatible.irap)

0 comments on commit 70c944e

Please sign in to comment.