From 1929798532c5e500140bbbff9345b4c0d6f28253 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 26 May 2016 14:49:13 +0200 Subject: [PATCH] Moved include_directory from main to ApplicationCode. Include of Eclipse hearder files must now be prefixed with ert/ --- ApplicationCode/CMakeLists.txt | 38 ++----- .../RifEclipseInputFileTools.cpp | 6 +- .../RifEclipseOutputFileTools.cpp | 8 +- .../FileInterface/RifEclipseOutputFileTools.h | 2 +- .../RifEclipseRestartDataAccess.h | 2 +- .../FileInterface/RifEclipseSummaryTools.cpp | 2 +- .../RifEclipseUnifiedRestartFileAccess.cpp | 7 +- .../RifEclipseUnifiedRestartFileAccess.h | 2 +- .../FileInterface/RifReaderEclipseInput.cpp | 15 +-- .../FileInterface/RifReaderEclipseOutput.cpp | 6 +- .../FileInterface/RifReaderEclipseSummary.cpp | 2 +- CMakeLists.txt | 99 +++++++++---------- 12 files changed, 66 insertions(+), 123 deletions(-) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index bba86d77ae..edfbd94935 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -23,6 +23,9 @@ include_directories( ${CommonCode_SOURCE_DIR} ${ResInsight_SOURCE_DIR}/ThirdParty + ${ResInsight_SOURCE_DIR}/ThirdParty/NRLib/nrlib/well + ${ResInsight_SOURCE_DIR}/ThirdParty/Qwt/src + ${ERT_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Adm @@ -355,41 +358,12 @@ endif () set( LINK_LIBRARIES WellPathImportSsihub -# cafPdmCvf -# cafUserInterface -# cafProjectDataModel -# cafViewer -# cafAnimControl -# cafTensor -# CommonCode - - #cafPdmCore - #cafPdmUiCore - cafPdmXml - #cafProjectDataModel - - cafUserInterface - cafViewer - cafAnimControl - cafCommand - cafPdmCvf - - cafTensor - CommonCode - - LibGuiQt - LibViewing - LibRender - LibGeometry - LibCore - ResultStatisticsCache RigGeoMechDataModel - ecl - ert_util - ert_geometry - ecl_well + ${APP_FWK_LIBRARIES} + ${VIZ_FWK_LIBRARIES} + ${ERT_LIBRARIES} NRLib diff --git a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp index 7131355278..966ed86e81 100644 --- a/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseInputFileTools.cpp @@ -38,10 +38,8 @@ #include #include -#include "ecl_grid.h" -#include "util.h" -#include "well_state.h" - +#include "ert/ecl/ecl_box.h" +#include "ert/ecl/ecl_kw.h" QString includeKeyword("INCLUDE"); QString faultsKeyword("FAULTS"); diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp index aa5fb95a17..c9f3ba26e5 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp @@ -20,11 +20,9 @@ #include "RifEclipseOutputFileTools.h" -#include "util.h" -#include "ecl_file.h" -#include "ecl_kw_magic.h" -#include "ecl_grid.h" -#include "ecl_rsthead.h" +#include "ert/ecl/ecl_file.h" +#include "ert/ecl/ecl_grid.h" +#include "ert/ecl/ecl_kw_magic.h" #include "cafProgressInfo.h" diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h index 02bff0b477..1e13d5ef89 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.h @@ -29,7 +29,7 @@ #include #include "RifReaderInterface.h" -#include "ecl_util.h" +#include "ert/ecl/ecl_util.h" typedef struct ecl_file_struct ecl_file_type; diff --git a/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h b/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h index 633c7d9c22..17e6669982 100644 --- a/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h +++ b/ApplicationCode/FileInterface/RifEclipseRestartDataAccess.h @@ -29,7 +29,7 @@ #include -#include "well_info.h" +#include "ert/ecl_well/well_info.h" #include "RifReaderInterface.h" diff --git a/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp b/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp index d8944089e7..ebc40f39a5 100644 --- a/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseSummaryTools.cpp @@ -20,7 +20,7 @@ #include "RifReaderEclipseSummary.h" -#include "ecl_util.h" +#include "ert/ecl/ecl_util.h" #include diff --git a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp index 0dbf700e05..6654cd3078 100644 --- a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp +++ b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.cpp @@ -21,11 +21,8 @@ #include "RifEclipseUnifiedRestartFileAccess.h" #include "RifEclipseOutputFileTools.h" -#include "ecl_kw_magic.h" -#include -#include -#include -#include +#include "ert/ecl/ecl_file.h" +#include "ert/ecl/ecl_kw_magic.h" //-------------------------------------------------------------------------------------------------- /// Constructor diff --git a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h index f119c75701..61b9bd694a 100644 --- a/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h +++ b/ApplicationCode/FileInterface/RifEclipseUnifiedRestartFileAccess.h @@ -26,7 +26,7 @@ class RifEclipseOutputFileTools; //typedef struct ecl_file_struct ecl_file_type; -#include "well_info.h" +#include "ert/ecl_well/well_info.h" //================================================================================================== // diff --git a/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp index 2f6ff3f235..ed8ced8a9e 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseInput.cpp @@ -18,23 +18,10 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "cvfBase.h" - -#include "RigMainGrid.h" -#include "RigCaseData.h" -#include "RigCaseCellResultsData.h" - #include "RifReaderEclipseInput.h" -#include "RifReaderEclipseOutput.h" #include "RifEclipseInputFileTools.h" - -#include -#include - -#include "ecl_grid.h" -#include "well_state.h" -#include "util.h" +#include "RigCaseData.h" //================================================================================================== // diff --git a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp index 1d6334e8d5..15d99f6453 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseOutput.cpp @@ -32,10 +32,8 @@ #include "cafProgressInfo.h" -#include "ecl_grid.h" -#include "well_state.h" -#include "ecl_kw_magic.h" -#include "ecl_nnc_export.h" +#include "ert/ecl/ecl_nnc_export.h" +#include "ert/ecl/ecl_kw_magic.h" #include #include diff --git a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp index 7d79fa9e9f..15b39e07bb 100644 --- a/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp +++ b/ApplicationCode/FileInterface/RifReaderEclipseSummary.cpp @@ -18,7 +18,7 @@ #include "RifReaderEclipseSummary.h" -#include "ecl_sum.h" +#include "ert/ecl/ecl_sum.h" #include #include diff --git a/CMakeLists.txt b/CMakeLists.txt index 646fceda6f..0df66bcafe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,48 +65,35 @@ SET(EXT_ERT_ROOT "" CACHE STRING "Path to ERT CMakeList.txt (source path)") if (ERT_EXTERNAL) if (EXT_ERT_ROOT) - set(ERT_SOURCE_PATH "${EXT_ERT_ROOT}") - + set(ERT_INCLUDE_ROOT "${EXT_ERT_ROOT}") add_subdirectory(${ERT_SOURCE_PATH} ${CMAKE_BINARY_DIR}/ThirdParty/Ert) - include_directories( - ${ERT_SOURCE_PATH}/libecl/include/ert/ecl - ${ERT_SOURCE_PATH}/libert_util/include/ert/util - ${ERT_SOURCE_PATH}/libgeometry/include/ert/geometry - ${ERT_SOURCE_PATH}/libecl_well/include/ert/ecl_well - ${ERT_SOURCE_PATH}/libecl/include - ${ERT_SOURCE_PATH}/libert_util/include - ${ERT_SOURCE_PATH}/libgeometry/include - ${ERT_SOURCE_PATH}/libecl_well/include - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/libert_util/include/ert/util - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/libert_util/include - ) - endif(EXT_ERT_ROOT) - -else (ERT_EXTERNAL) + endif() +else() + set(ERT_INCLUDE_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel) add_subdirectory(ThirdParty/Ert/devel) - include_directories( - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl/include/ert/ecl - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libert_util/include/ert/util - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libgeometry/include/ert/geometry - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl_well/include/ert/ecl_well - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl/include - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl/include - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libert_util/include - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libgeometry/include - ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel/libecl_well/include +endif () + +list(APPEND ERT_INCLUDE_DIRS + ${ERT_INCLUDE_ROOT}/libecl/include/ + ${ERT_INCLUDE_ROOT}/libert_util/include/ + ${ERT_INCLUDE_ROOT}/libgeometry/include/ + ${ERT_INCLUDE_ROOT}/libecl_well/include/ + ${ERT_INCLUDE_ROOT}/libeclxx/include + ${ERT_INCLUDE_ROOT}/libert_utilxx/include - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include/ert/util - ${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include/ert/util ${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include - ) -endif (ERT_EXTERNAL) +) + +list(APPEND ERT_LIBRARIES + ecl + ecl_well + ert_geometry + ert_util +) set_property(TARGET - ecl - ecl_well - ert_geometry - ert_util - PROPERTY FOLDER "ERT" + ${ERT_LIBRARIES} + PROPERTY FOLDER "ERT" ) @@ -115,7 +102,6 @@ set_property(TARGET ################################################################################ add_subdirectory(ThirdParty/NRLib) -include_directories(ThirdParty/NRLib/nrlib/well) ################################################################################ @@ -141,7 +127,6 @@ find_package( OpenGL ) ################################################################################ add_subdirectory(ThirdParty/Qwt/src) -include_directories(ThirdParty/Qwt/src) ################################################################################ # Vizualization Framework @@ -182,13 +167,17 @@ include_directories( ${LibGuiQt_SOURCE_DIR} ) +list(APPEND VIZ_FWK_LIBRARIES + LibGuiQt + LibViewing + LibRender + LibGeometry + LibCore +) + set_property(TARGET - LibCore - LibGeometry - LibGuiQt - LibRender - LibViewing - PROPERTY FOLDER "VizFwk" + ${VIZ_FWK_LIBRARIES} + PROPERTY FOLDER "VizFwk" ) @@ -213,23 +202,25 @@ add_subdirectory(Fwk/AppFwk/CommonCode) add_subdirectory(Fwk/AppFwk/cafTensor) -set_property(TARGET - cafAnimControl - cafViewer - +list(APPEND APP_FWK_LIBRARIES cafPdmCore cafPdmUiCore cafPdmXml - cafProjectDataModel - + + cafUserInterface + cafViewer + cafAnimControl cafCommand - cafUserInterface + cafPdmCvf + cafTensor - cafPdmCvf - CommonCode - PROPERTY FOLDER "AppFwk" + CommonCode ) +set_property(TARGET + ${APP_FWK_LIBRARIES} + PROPERTY FOLDER "AppFwk" +) ################################################################################ # Installation settings