Fixes by cmake-format (#6874)

This commit is contained in:
github-actions[bot] authored and GitHub committed 2020-10-30 12:31:16 +01:00
1 parent 787dae4044
commit 223fe756fe
33 files changed
+1870 -2069

No files matched your search

File diff suppressed because it is too large. Load diff
+33 -42
View File
@@ -1,14 +1,14 @@
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required(VERSION 3.12)
project (Commands)
project(Commands)
# Unity Build
if (RESINSIGHT_ENABLE_UNITY_BUILD)
if(RESINSIGHT_ENABLE_UNITY_BUILD)
message("Cmake Unity build is enabled on : ${PROJECT_NAME}")
set(CMAKE_UNITY_BUILD true)
endif()
set( COMMAND_REFERENCED_CMAKE_FILES
set(COMMAND_REFERENCED_CMAKE_FILES
CMakeLists_files.cmake
AnalysisPlotCommands/CMakeLists_files.cmake
ApplicationCommands/CMakeLists_files.cmake
@@ -37,55 +37,46 @@ set( COMMAND_REFERENCED_CMAKE_FILES
WellLogCommands/CMakeLists_files.cmake
WellPathCommands/CMakeLists_files.cmake
PlotTemplateCommands/CMakeLists_files.cmake
FractureCommands/CMakeLists_files.cmake
)
FractureCommands/CMakeLists_files.cmake)
# Include source file lists from *.cmake files
foreach (referencedfile ${COMMAND_REFERENCED_CMAKE_FILES})
include (${referencedfile})
endforeach (referencedfile)
foreach(referencedfile ${COMMAND_REFERENCED_CMAKE_FILES})
include(${referencedfile})
endforeach(referencedfile)
find_package(Eigen3 REQUIRED)
# Prefix files with COMMAND_ to avoid clash with application global lists
qt5_wrap_cpp(COMMAND_MOC_SOURCE_FILES ${COMMAND_QT_MOC_HEADERS} )
qt5_wrap_cpp(COMMAND_MOC_SOURCE_FILES ${COMMAND_QT_MOC_HEADERS})
add_library( ${PROJECT_NAME} OBJECT
${COMMAND_CODE_SOURCE_FILES}
${COMMAND_CODE_HEADER_FILES}
${COMMAND_MOC_SOURCE_FILES}
)
add_library(
${PROJECT_NAME} OBJECT
${COMMAND_CODE_SOURCE_FILES} ${COMMAND_CODE_HEADER_FILES}
${COMMAND_MOC_SOURCE_FILES})
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/ThirdParty
)
target_include_directories(
${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/ThirdParty)
# Before cmake 3.12 OBJECT libraries could not use the target_link_libraries command,
# So we need to set the POSITION_INDEPENDENT_CODE option manually
# Before cmake 3.12 OBJECT libraries could not use the target_link_libraries
# command, So we need to set the POSITION_INDEPENDENT_CODE option manually
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
# Use this code when 3.12 can be used as minimum version of cmake
set( LINK_LIBRARIES
LibCore
cafCommand
cafPdmCvf
cafPdmScripting
cafTensor
cafViewer
cafVizExtensions
ecl
nightcharts
qwt
# Use this code when 3.12 can be used as minimum version of cmake
set(LINK_LIBRARIES
LibCore
cafCommand
cafPdmCvf
cafPdmScripting
cafTensor
cafViewer
cafVizExtensions
ecl
nightcharts
qwt
${QT_LIBRARIES}
Eigen3::Eigen)
${QT_LIBRARIES}
Eigen3::Eigen
)
target_link_libraries( ${PROJECT_NAME}
${LINK_LIBRARIES}
)
target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARIES})
source_group("" FILES ${PROJECT_FILES})
@@ -1,129 +1,116 @@
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required(VERSION 3.12)
project (RigGeoMechDataModel)
project(RigGeoMechDataModel)
# Unity Build
if (RESINSIGHT_ENABLE_UNITY_BUILD)
if(RESINSIGHT_ENABLE_UNITY_BUILD)
message("Cmake Unity build is enabled on : ${PROJECT_NAME}")
set(CMAKE_UNITY_BUILD true)
endif()
add_library( ${PROJECT_NAME}
RigFemPart.h
RigFemPart.cpp
RigFemTypes.h
RigFemTypes.cpp
RigGeoMechCaseData.cpp
RigGeoMechCaseData.h
RigFemPartCollection.cpp
RigFemPartCollection.h
RigFemPartResults.h
RigFemPartResults.cpp
RigFemPartResultsCollection.h
RigFemPartResultsCollection.cpp
RigFemScalarResultFrames.h
RigFemScalarResultFrames.cpp
RigFemClosestResultIndexCalculator.h
RigFemClosestResultIndexCalculator.cpp
RigFemNativeStatCalc.h
RigFemNativeStatCalc.cpp
RigFemNativeVisibleCellsStatCalc.h
RigFemNativeVisibleCellsStatCalc.cpp
RigFemFaceComparator.h
RigFemPartGrid.h
RigFemPartGrid.cpp
RigFemResultAddress.h
RigFemResultPosEnum.h
RimFemResultObserver.h
RimFemResultObserver.cpp
RigHexGradientTools.h
RigHexGradientTools.cpp
RigFemPartResultCalculator.h
RigFemPartResultCalculator.cpp
RigFemPartResultCalculatorNormalSE.h
RigFemPartResultCalculatorNormalSE.cpp
RigFemPartResultCalculatorShearSE.h
RigFemPartResultCalculatorShearSE.cpp
RigFemPartResultCalculatorNormalST.h
RigFemPartResultCalculatorNormalST.cpp
RigFemPartResultCalculatorShearST.h
RigFemPartResultCalculatorShearST.cpp
RigFemPartResultCalculatorTimeLapse.h
RigFemPartResultCalculatorTimeLapse.cpp
RigFemPartResultCalculatorGamma.h
RigFemPartResultCalculatorGamma.cpp
RigFemPartResultCalculatorNormalized.h
RigFemPartResultCalculatorNormalized.cpp
RigFemPartResultCalculatorSurfaceAngles.h
RigFemPartResultCalculatorSurfaceAngles.cpp
RigFemPartResultCalculatorSurfaceAlignedStress.h
RigFemPartResultCalculatorSurfaceAlignedStress.cpp
RigFemPartResultCalculatorPrincipalStrain.h
RigFemPartResultCalculatorPrincipalStrain.cpp
RigFemPartResultCalculatorPrincipalStress.h
RigFemPartResultCalculatorPrincipalStress.cpp
RigFemPartResultCalculatorSFI.h
RigFemPartResultCalculatorSFI.cpp
RigFemPartResultCalculatorDSM.h
RigFemPartResultCalculatorDSM.cpp
RigFemPartResultCalculatorFOS.h
RigFemPartResultCalculatorFOS.cpp
RigFemPartResultCalculatorED.h
RigFemPartResultCalculatorED.cpp
RigFemPartResultCalculatorEV.h
RigFemPartResultCalculatorEV.cpp
RigFemPartResultCalculatorQ.h
RigFemPartResultCalculatorQ.cpp
RigFemPartResultCalculatorSM.h
RigFemPartResultCalculatorSM.cpp
RigFemPartResultCalculatorCompaction.h
RigFemPartResultCalculatorCompaction.cpp
RigFemPartResultCalculatorStressGradients.h
RigFemPartResultCalculatorStressGradients.cpp
RigFemPartResultCalculatorNE.h
RigFemPartResultCalculatorNE.cpp
RigFemPartResultCalculatorFormationIndices.h
RigFemPartResultCalculatorFormationIndices.cpp
RigFemPartResultCalculatorBarConverted.h
RigFemPartResultCalculatorBarConverted.cpp
RigFemPartResultCalculatorEnIpPorBar.h
RigFemPartResultCalculatorEnIpPorBar.cpp
RigFemPartResultCalculatorNodalGradients.h
RigFemPartResultCalculatorNodalGradients.cpp
RigFemPartResultCalculatorStressAnisotropy.h
RigFemPartResultCalculatorStressAnisotropy.cpp
RigFemPartResultCalculatorPoreCompressibility.h
RigFemPartResultCalculatorPoreCompressibility.cpp
RigFemPartResultCalculatorPorosityPermeability.h
RigFemPartResultCalculatorPorosityPermeability.cpp
RigFemPartResultCalculatorInitialPorosity.h
RigFemPartResultCalculatorInitialPorosity.cpp
RigFemPartResultCalculatorMudWeightWindow.h
RigFemPartResultCalculatorMudWeightWindow.cpp
RigFemPartResultCalculatorShearSlipIndicator.h
RigFemPartResultCalculatorShearSlipIndicator.cpp
RimGeoMechGeometrySelectionItem.h
RimGeoMechGeometrySelectionItem.cpp
)
add_library(
${PROJECT_NAME}
RigFemPart.h
RigFemPart.cpp
RigFemTypes.h
RigFemTypes.cpp
RigGeoMechCaseData.cpp
RigGeoMechCaseData.h
RigFemPartCollection.cpp
RigFemPartCollection.h
RigFemPartResults.h
RigFemPartResults.cpp
RigFemPartResultsCollection.h
RigFemPartResultsCollection.cpp
RigFemScalarResultFrames.h
RigFemScalarResultFrames.cpp
RigFemClosestResultIndexCalculator.h
RigFemClosestResultIndexCalculator.cpp
RigFemNativeStatCalc.h
RigFemNativeStatCalc.cpp
RigFemNativeVisibleCellsStatCalc.h
RigFemNativeVisibleCellsStatCalc.cpp
RigFemFaceComparator.h
RigFemPartGrid.h
RigFemPartGrid.cpp
RigFemResultAddress.h
RigFemResultPosEnum.h
RimFemResultObserver.h
RimFemResultObserver.cpp
RigHexGradientTools.h
RigHexGradientTools.cpp
RigFemPartResultCalculator.h
RigFemPartResultCalculator.cpp
RigFemPartResultCalculatorNormalSE.h
RigFemPartResultCalculatorNormalSE.cpp
RigFemPartResultCalculatorShearSE.h
RigFemPartResultCalculatorShearSE.cpp
RigFemPartResultCalculatorNormalST.h
RigFemPartResultCalculatorNormalST.cpp
RigFemPartResultCalculatorShearST.h
RigFemPartResultCalculatorShearST.cpp
RigFemPartResultCalculatorTimeLapse.h
RigFemPartResultCalculatorTimeLapse.cpp
RigFemPartResultCalculatorGamma.h
RigFemPartResultCalculatorGamma.cpp
RigFemPartResultCalculatorNormalized.h
RigFemPartResultCalculatorNormalized.cpp
RigFemPartResultCalculatorSurfaceAngles.h
RigFemPartResultCalculatorSurfaceAngles.cpp
RigFemPartResultCalculatorSurfaceAlignedStress.h
RigFemPartResultCalculatorSurfaceAlignedStress.cpp
RigFemPartResultCalculatorPrincipalStrain.h
RigFemPartResultCalculatorPrincipalStrain.cpp
RigFemPartResultCalculatorPrincipalStress.h
RigFemPartResultCalculatorPrincipalStress.cpp
RigFemPartResultCalculatorSFI.h
RigFemPartResultCalculatorSFI.cpp
RigFemPartResultCalculatorDSM.h
RigFemPartResultCalculatorDSM.cpp
RigFemPartResultCalculatorFOS.h
RigFemPartResultCalculatorFOS.cpp
RigFemPartResultCalculatorED.h
RigFemPartResultCalculatorED.cpp
RigFemPartResultCalculatorEV.h
RigFemPartResultCalculatorEV.cpp
RigFemPartResultCalculatorQ.h
RigFemPartResultCalculatorQ.cpp
RigFemPartResultCalculatorSM.h
RigFemPartResultCalculatorSM.cpp
RigFemPartResultCalculatorCompaction.h
RigFemPartResultCalculatorCompaction.cpp
RigFemPartResultCalculatorStressGradients.h
RigFemPartResultCalculatorStressGradients.cpp
RigFemPartResultCalculatorNE.h
RigFemPartResultCalculatorNE.cpp
RigFemPartResultCalculatorFormationIndices.h
RigFemPartResultCalculatorFormationIndices.cpp
RigFemPartResultCalculatorBarConverted.h
RigFemPartResultCalculatorBarConverted.cpp
RigFemPartResultCalculatorEnIpPorBar.h
RigFemPartResultCalculatorEnIpPorBar.cpp
RigFemPartResultCalculatorNodalGradients.h
RigFemPartResultCalculatorNodalGradients.cpp
RigFemPartResultCalculatorStressAnisotropy.h
RigFemPartResultCalculatorStressAnisotropy.cpp
RigFemPartResultCalculatorPoreCompressibility.h
RigFemPartResultCalculatorPoreCompressibility.cpp
RigFemPartResultCalculatorPorosityPermeability.h
RigFemPartResultCalculatorPorosityPermeability.cpp
RigFemPartResultCalculatorInitialPorosity.h
RigFemPartResultCalculatorInitialPorosity.cpp
RigFemPartResultCalculatorMudWeightWindow.h
RigFemPartResultCalculatorMudWeightWindow.cpp
RigFemPartResultCalculatorShearSlipIndicator.h
RigFemPartResultCalculatorShearSlipIndicator.cpp
RimGeoMechGeometrySelectionItem.h
RimGeoMechGeometrySelectionItem.cpp)
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set( LINK_LIBRARIES
LibCore
cafPdmCvf
cafTensor
cafUserInterface
CommonCode
set(LINK_LIBRARIES LibCore cafPdmCvf cafTensor cafUserInterface CommonCode
ResultStatisticsCache)
ResultStatisticsCache
)
target_link_libraries( ${PROJECT_NAME}
${LINK_LIBRARIES}
)
target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARIES})
source_group("" FILES ${PROJECT_FILES})
@@ -1,100 +1,94 @@
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required(VERSION 3.12)
project (RifOdbReader)
project(RifOdbReader)
# Unity Build
if (RESINSIGHT_ENABLE_UNITY_BUILD)
if(RESINSIGHT_ENABLE_UNITY_BUILD)
message("Cmake Unity build is enabled on : ${PROJECT_NAME}")
set(CMAKE_UNITY_BUILD true)
endif()
if (MSVC)
add_definitions(-DHKS_NT)
add_definitions(-DABQ_WIN86_64)
if(MSVC)
add_definitions(-DHKS_NT)
add_definitions(-DABQ_WIN86_64)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -w -Wno-deprecated")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -w -Wno-deprecated")
add_definitions(-DTYPENAME=typename)
add_definitions(-D_LINUX_SOURCE)
add_definitions(-DABQ_LINUX)
add_definitions(-DABQ_LNX86_64)
add_definitions(-DSMA_GNUC)
add_definitions(-DFOR_TRAIL)
add_definitions(-DHAS_BOOL)
add_definitions(-DASSERT_ENABLED)
add_definitions(-D_BSD_TYPES)
add_definitions(-D_BSD_SOURCE)
add_definitions(-D_GNU_SOURCE)
add_definitions(-D_POSIX_SOURCE)
add_definitions(-D_XOPEN_SOURCE_EXTENDED)
add_definitions(-D_XOPEN_SOURCE)
add_definitions(-DHAVE_OPENGL)
add_definitions(-DHKS_OPEN_GL)
add_definitions(-DGL_GLEXT_PROTOTYPES)
add_definitions(-DMULTI_THREADING_ENABLED)
add_definitions(-D_REENTRANT)
add_definitions(-DABQ_MPI_SUPPORT)
add_definitions(-DBIT64)
add_definitions(-D_LARGEFILE64_SOURCE)
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-DABQ_MPI_PMPI)
add_definitions(-DTYPENAME=typename)
add_definitions(-D_LINUX_SOURCE)
add_definitions(-DABQ_LINUX)
add_definitions(-DABQ_LNX86_64)
add_definitions(-DSMA_GNUC)
add_definitions(-DFOR_TRAIL)
add_definitions(-DHAS_BOOL)
add_definitions(-DASSERT_ENABLED)
add_definitions(-D_BSD_TYPES)
add_definitions(-D_BSD_SOURCE)
add_definitions(-D_GNU_SOURCE)
add_definitions(-D_POSIX_SOURCE)
add_definitions(-D_XOPEN_SOURCE_EXTENDED)
add_definitions(-D_XOPEN_SOURCE)
add_definitions(-DHAVE_OPENGL)
add_definitions(-DHKS_OPEN_GL)
add_definitions(-DGL_GLEXT_PROTOTYPES)
add_definitions(-DMULTI_THREADING_ENABLED)
add_definitions(-D_REENTRANT)
add_definitions(-DABQ_MPI_SUPPORT)
add_definitions(-DBIT64)
add_definitions(-D_LARGEFILE64_SOURCE)
add_definitions(-D_FILE_OFFSET_BITS=64)
add_definitions(-DABQ_MPI_PMPI)
endif(MSVC)
include_directories(
${RESINSIGHT_ODB_API_DIR}/include
)
include_directories(${RESINSIGHT_ODB_API_DIR}/include)
add_library( ${PROJECT_NAME}
RifOdbReader.h
RifOdbReader.cpp
RifGeoMechReaderInterface.h
RifGeoMechReaderInterface.cpp
OdbSetup.cmake
)
add_library(
${PROJECT_NAME} RifOdbReader.h RifOdbReader.cpp RifGeoMechReaderInterface.h
RifGeoMechReaderInterface.cpp OdbSetup.cmake)
if (MSVC)
list(APPEND RI_ODB_LIBS
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbDdbOdb.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbApi.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbCore.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbCoreGeom.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbAttrEO.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAAbuBasicUtils.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMABasShared.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMABasCoreUtils.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAStiCAE_StableTime.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMABasMem.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAAbuGeom.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMARomDiagEx.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMASspUmaCore.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMASimInterface.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAMtxCoreModule.lib
)
if(MSVC)
list(
APPEND
RI_ODB_LIBS
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbDdbOdb.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbApi.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbCore.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbCoreGeom.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAOdbAttrEO.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAAbuBasicUtils.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMABasShared.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMABasCoreUtils.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAStiCAE_StableTime.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMABasMem.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAAbuGeom.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMARomDiagEx.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMASspUmaCore.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMASimInterface.lib
${RESINSIGHT_ODB_API_DIR}/lib/ABQSMAMtxCoreModule.lib)
else()
list(APPEND RI_ODB_LIBS
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbDdbOdb.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbApi.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbCore.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbCoreGeom.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbAttrEO.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAAbuBasicUtils.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMABasShared.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMABasCoreUtils.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAStiCAE_StableTime.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMABasMem.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAAbuGeom.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMARomDiagEx.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMASspUmaCore.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMASimInterface.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAMtxCoreModule.so
)
list(
APPEND
RI_ODB_LIBS
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbDdbOdb.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbApi.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbCore.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbCoreGeom.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAOdbAttrEO.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAAbuBasicUtils.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMABasShared.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMABasCoreUtils.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAStiCAE_StableTime.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMABasMem.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAAbuGeom.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMARomDiagEx.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMASspUmaCore.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMASimInterface.so
${RESINSIGHT_ODB_API_DIR}/lib/libABQSMAMtxCoreModule.so)
endif(MSVC)
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} ${RI_ODB_LIBS} RigGeoMechDataModel LibCore)
target_link_libraries(${PROJECT_NAME} ${RI_ODB_LIBS} RigGeoMechDataModel
LibCore)
source_group("" FILES ${PROJECT_FILES})
@@ -1,10 +1,16 @@
cmake_minimum_required (VERSION 2.8)
cmake_minimum_required(VERSION 2.8)
project ( OdbReader_UnitTests )
project(OdbReader_UnitTests)
set(RI_VIZ_FWK_ROOT ../../../Fwk/VizFwk CACHE PATH "Path to VizFwk")
set(RI_GTEST_ROOT ../../../ThirdParty CACHE PATH "Path to folder containing gtest folder")
set(RI_TEST_FILE "" CACHE FILEPATH "Path to test file")
set(RI_VIZ_FWK_ROOT
../../../Fwk/VizFwk
CACHE PATH "Path to VizFwk")
set(RI_GTEST_ROOT
../../../ThirdParty
CACHE PATH "Path to folder containing gtest folder")
set(RI_TEST_FILE
""
CACHE FILEPATH "Path to test file")
include(${RI_VIZ_FWK_ROOT}/CMake/Utils/ceeDetermineCompilerFlags.cmake)
@@ -13,7 +19,7 @@ add_subdirectory(../../ResultStatisticsCache buildResultStatisticsCache)
add_subdirectory(../OdbReader buildOdbReader)
add_subdirectory(../GeoMechDataModel buildGeoMechDataModel)
add_definitions( -DTEST_FILE="${RI_TEST_FILE}")
add_definitions(-DTEST_FILE="${RI_TEST_FILE}")
include_directories(${RI_VIZ_FWK_ROOT}/LibCore)
include_directories(../../ResultStatisticsCache)
@@ -22,13 +28,10 @@ include_directories(../OdbReader)
include_directories(../GeoMechDataModel)
include_directories(${RI_GTEST_ROOT})
set( UNIT_TEST_CPP_SOURCES
main.cpp
RifOdbReader-Test.cpp
${RI_GTEST_ROOT}/gtest/gtest-all.cc
)
set(UNIT_TEST_CPP_SOURCES main.cpp RifOdbReader-Test.cpp
${RI_GTEST_ROOT}/gtest/gtest-all.cc)
add_executable( ${PROJECT_NAME} ${UNIT_TEST_CPP_SOURCES} )
target_link_libraries( ${PROJECT_NAME} RifOdbReader)
add_executable(${PROJECT_NAME} ${UNIT_TEST_CPP_SOURCES})
target_link_libraries(${PROJECT_NAME} RifOdbReader)
include(../OdbReader/OdbSetup.cmake)
include(../OdbReader/OdbSetup.cmake)
+189 -182
View File
@@ -1,24 +1,29 @@
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required(VERSION 3.12)
project (GrpcInterface)
project(GrpcInterface)
message(STATUS "GRPC enabled")
add_definitions(-DENABLE_GRPC)
if (VCPKG_AUTO_INSTALL)
vcpkg_install(grpc)
if(VCPKG_AUTO_INSTALL)
vcpkg_install(grpc)
endif()
set(CMAKE_UNITY_BUILD false)
set(RESINSIGHT_GRPC_PYTHON_EXECUTABLE "" CACHE FILEPATH "gRPC : Path to Python 3 executable, required to build the Python client library")
set(RESINSIGHT_GRPC_PYTHON_EXECUTABLE
""
CACHE
FILEPATH
"gRPC : Path to Python 3 executable, required to build the Python client library"
)
if (MSVC)
add_definitions(-D_WIN32_WINNT=0x600)
if(MSVC)
add_definitions(-D_WIN32_WINNT=0x600)
endif()
add_definitions(-D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING)
set ( SOURCE_GROUP_HEADER_FILES
set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcServer.h
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcHelper.h
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcCallbacks.h
@@ -32,10 +37,9 @@ set ( SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcAppService.h
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcPropertiesService.h
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcNNCPropertiesService.h
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcPdmObjectService.h
)
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcPdmObjectService.h)
set ( SOURCE_GROUP_SOURCE_FILES
set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcServer.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcHelper.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcServiceInterface.cpp
@@ -47,21 +51,22 @@ set ( SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcAppService.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcPropertiesService.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcNNCPropertiesService.cpp
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcPdmObjectService.cpp
)
${CMAKE_CURRENT_LIST_DIR}/RiaGrpcPdmObjectService.cpp)
# Find Protobuf installation
# Looks for protobuf-config.cmake file installed by Protobuf's cmake installation.
# Find Protobuf installation Looks for protobuf-config.cmake file installed by
# Protobuf's cmake installation.
set(protobuf_MODULE_COMPATIBLE ON)
find_package(Protobuf CONFIG 3.0 QUIET)
if (Protobuf_FOUND)
message(STATUS "Using protobuf ${protobuf_VERSION}")
if(Protobuf_FOUND)
message(STATUS "Using protobuf ${protobuf_VERSION}")
else()
message(FATAL_ERROR "Protocol Buffers not found. This is required to build with gRPC")
message(
FATAL_ERROR
"Protocol Buffers not found. This is required to build with gRPC")
endif()
# Find gRPC installation
# Looks for gRPCConfig.cmake file installed by gRPC's cmake installation.
# Find gRPC installation Looks for gRPCConfig.cmake file installed by gRPC's
# cmake installation.
find_package(gRPC CONFIG REQUIRED)
message(STATUS "Using gRPC ${gRPC_VERSION}")
@@ -72,25 +77,23 @@ set(_GRPC_GRPCPP_UNSECURE gRPC::grpc++_unsecure gRPC::grpc_unsecure gRPC::gpr)
set(_GRPC_CPP_PLUGIN_EXECUTABLE $<TARGET_FILE:gRPC::grpc_cpp_plugin>)
set(GRPC_LIBRARIES ${_GRPC_GRPCPP_UNSECURE} ${_PROTOBUF_LIBPROTOBUF})
set_target_properties(${GRPC_LIBRARIES} PROPERTIES
MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE
MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE
)
set_target_properties(
${GRPC_LIBRARIES} PROPERTIES MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE
MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
set( LINK_LIBRARIES
${QT_LIBRARIES}
${GRPC_LIBRARIES}
LibCore
cafCommand
cafPdmCvf
cafPdmScripting
cafTensor
cafViewer
cafVizExtensions
ecl
nightcharts
qwt
)
set(LINK_LIBRARIES
${QT_LIBRARIES}
${GRPC_LIBRARIES}
LibCore
cafCommand
cafPdmCvf
cafPdmScripting
cafTensor
cafViewer
cafVizExtensions
ecl
nightcharts
qwt)
# Proto files
set(PROTO_FILES
@@ -103,194 +106,198 @@ set(PROTO_FILES
"NNCProperties"
"App"
"Properties"
"Grid"
)
"Grid")
set(GRPC_PYTHON_SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/Python")
add_custom_target(PipInstall)
foreach(proto_file ${PROTO_FILES})
get_filename_component(rips_proto "${CMAKE_CURRENT_LIST_DIR}/GrpcProtos/${proto_file}.proto" ABSOLUTE)
get_filename_component(rips_proto_path "${rips_proto}" PATH)
get_filename_component(
rips_proto "${CMAKE_CURRENT_LIST_DIR}/GrpcProtos/${proto_file}.proto"
ABSOLUTE)
get_filename_component(rips_proto_path "${rips_proto}" PATH)
list(APPEND GRPC_PROTO_FILES_FULL_PATH ${rips_proto})
list(APPEND GRPC_PROTO_FILES_FULL_PATH ${rips_proto})
set(rips_proto_srcs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.pb.cc")
set(rips_proto_hdrs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.pb.h")
set(rips_grpc_srcs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.grpc.pb.cc")
set(rips_grpc_hdrs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.grpc.pb.h")
set(rips_proto_srcs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.pb.cc")
set(rips_proto_hdrs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.pb.h")
set(rips_grpc_srcs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.grpc.pb.cc")
set(rips_grpc_hdrs "${CMAKE_BINARY_DIR}/Generated/${proto_file}.grpc.pb.h")
add_custom_command(
OUTPUT "${rips_proto_srcs}" "${rips_proto_hdrs}" "${rips_grpc_srcs}"
"${rips_grpc_hdrs}"
COMMAND
${_PROTOBUF_PROTOC} ARGS --grpc_out "${CMAKE_BINARY_DIR}/Generated"
--cpp_out "${CMAKE_BINARY_DIR}/Generated" -I "${rips_proto_path}"
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}" "${rips_proto}"
DEPENDS "${rips_proto}")
set(rips_proto_python "rips/generated/${proto_file}_pb2.py")
set(rips_grpc_python "rips/generated/${proto_file}_pb2_grpc.py")
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
message(
STATUS "Using Python Executable: ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE}")
add_custom_command(
OUTPUT "${rips_proto_srcs}" "${rips_proto_hdrs}" "${rips_grpc_srcs}" "${rips_grpc_hdrs}"
COMMAND ${_PROTOBUF_PROTOC}
ARGS --grpc_out "${CMAKE_BINARY_DIR}/Generated"
--cpp_out "${CMAKE_BINARY_DIR}/Generated"
-I "${rips_proto_path}"
--plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}"
"${rips_proto}"
DEPENDS "${rips_proto}"
OUTPUT "${GRPC_PYTHON_SOURCE_PATH}/${rips_proto_python}"
"${GRPC_PYTHON_SOURCE_PATH}/${rips_grpc_python}"
COMMAND
${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m grpc_tools.protoc -I
"${rips_proto_path}" --python_out
"${GRPC_PYTHON_SOURCE_PATH}/rips/generated" --grpc_python_out
"${GRPC_PYTHON_SOURCE_PATH}/rips/generated" "${rips_proto}"
DEPENDS "${rips_proto}"
COMMENT "Generating ${rips_proto_python} and ${rips_grpc_python}"
VERBATIM)
list(APPEND GRPC_PYTHON_GENERATED_SOURCES ${rips_proto_python}
${rips_grpc_python})
else()
message(
STATUS
"RESINSIGHT_GRPC_PYTHON_EXECUTABLE not specified. Will not install Python client code"
)
set(rips_proto_python "rips/generated/${proto_file}_pb2.py")
set(rips_grpc_python "rips/generated/${proto_file}_pb2_grpc.py")
endif()
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
message(STATUS "Using Python Executable: ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE}")
add_custom_command(
OUTPUT "${GRPC_PYTHON_SOURCE_PATH}/${rips_proto_python}" "${GRPC_PYTHON_SOURCE_PATH}/${rips_grpc_python}"
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE}
ARGS -m grpc_tools.protoc
-I "${rips_proto_path}"
--python_out "${GRPC_PYTHON_SOURCE_PATH}/rips/generated"
--grpc_python_out "${GRPC_PYTHON_SOURCE_PATH}/rips/generated"
"${rips_proto}"
DEPENDS "${rips_proto}"
COMMENT "Generating ${rips_proto_python} and ${rips_grpc_python}"
VERBATIM
)
list (APPEND GRPC_PYTHON_GENERATED_SOURCES
${rips_proto_python}
${rips_grpc_python}
)
else()
message(STATUS "RESINSIGHT_GRPC_PYTHON_EXECUTABLE not specified. Will not install Python client code")
endif()
list(APPEND GRPC_HEADER_FILES ${rips_proto_hdrs} ${rips_grpc_hdrs})
list( APPEND GRPC_HEADER_FILES
${rips_proto_hdrs}
${rips_grpc_hdrs}
)
list( APPEND GRPC_CPP_SOURCES
${rips_proto_srcs}
${rips_grpc_srcs}
)
list(APPEND GRPC_CPP_SOURCES ${rips_proto_srcs} ${rips_grpc_srcs})
endforeach(proto_file)
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/ApplicationCode/Adm/RiaVersionInfo.py.cmake
${GRPC_PYTHON_SOURCE_PATH}/rips/generated/RiaVersionInfo.py)
CONFIGURE_FILE( ${GRPC_PYTHON_SOURCE_PATH}/setup.py.cmake
${GRPC_PYTHON_SOURCE_PATH}/setup.py)
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
configure_file(${CMAKE_SOURCE_DIR}/ApplicationCode/Adm/RiaVersionInfo.py.cmake
${GRPC_PYTHON_SOURCE_PATH}/rips/generated/RiaVersionInfo.py)
configure_file(${GRPC_PYTHON_SOURCE_PATH}/setup.py.cmake
${GRPC_PYTHON_SOURCE_PATH}/setup.py)
endif()
list(APPEND GRPC_PYTHON_SOURCES
"rips/generated/RiaVersionInfo.py"
"rips/__init__.py"
"rips/case.py"
"rips/contour_map.py"
"rips/grid.py"
"rips/gridcasegroup.py"
"rips/instance.py"
"rips/pdmobject.py"
"rips/plot.py"
"rips/project.py"
"rips/simulation_well.py"
"rips/view.py"
"rips/well_log_plot.py"
"rips/PythonExamples/instance_example.py"
"rips/PythonExamples/command_example.py"
"rips/PythonExamples/case_grid_group.py"
"rips/PythonExamples/case_info_streaming_example.py"
"rips/PythonExamples/create_wbs_plot.py"
"rips/PythonExamples/export_plots.py"
"rips/PythonExamples/export_snapshots.py"
"rips/PythonExamples/error_handling.py"
"rips/PythonExamples/import_well_paths_and_logs.py"
"rips/PythonExamples/soil_porv_async.py"
"rips/PythonExamples/soil_porv_sync.py"
"rips/PythonExamples/selected_cases.py"
"rips/PythonExamples/all_cases.py"
"rips/PythonExamples/replace_case.py"
"rips/PythonExamples/set_grid_properties.py"
"rips/PythonExamples/set_cell_result.py"
"rips/PythonExamples/set_flow_diagnostics_result.py"
"rips/PythonExamples/grid_information.py"
"rips/PythonExamples/input_prop_test_sync.py"
"rips/PythonExamples/input_prop_test_async.py"
"rips/PythonExamples/soil_average_async.py"
"rips/PythonExamples/soil_average_sync.py"
"rips/PythonExamples/view_example.py"
"rips/tests/test_cases.py"
"rips/tests/test_grids.py"
"rips/tests/test_properties.py"
"rips/tests/test_project.py"
"rips/tests/conftest.py"
"rips/tests/dataroot.py"
"rips/tests/test_nnc_properties.py"
"rips/tests/test_simulation_wells.py"
"rips/tests/test_summary_cases.py"
"rips/tests/test_wells.py"
"requirements.txt"
"setup.py"
"README.md"
"LICENSE"
)
list(
APPEND
GRPC_PYTHON_SOURCES
"rips/generated/RiaVersionInfo.py"
"rips/__init__.py"
"rips/case.py"
"rips/contour_map.py"
"rips/grid.py"
"rips/gridcasegroup.py"
"rips/instance.py"
"rips/pdmobject.py"
"rips/plot.py"
"rips/project.py"
"rips/simulation_well.py"
"rips/view.py"
"rips/well_log_plot.py"
"rips/PythonExamples/instance_example.py"
"rips/PythonExamples/command_example.py"
"rips/PythonExamples/case_grid_group.py"
"rips/PythonExamples/case_info_streaming_example.py"
"rips/PythonExamples/create_wbs_plot.py"
"rips/PythonExamples/export_plots.py"
"rips/PythonExamples/export_snapshots.py"
"rips/PythonExamples/error_handling.py"
"rips/PythonExamples/import_well_paths_and_logs.py"
"rips/PythonExamples/soil_porv_async.py"
"rips/PythonExamples/soil_porv_sync.py"
"rips/PythonExamples/selected_cases.py"
"rips/PythonExamples/all_cases.py"
"rips/PythonExamples/replace_case.py"
"rips/PythonExamples/set_grid_properties.py"
"rips/PythonExamples/set_cell_result.py"
"rips/PythonExamples/set_flow_diagnostics_result.py"
"rips/PythonExamples/grid_information.py"
"rips/PythonExamples/input_prop_test_sync.py"
"rips/PythonExamples/input_prop_test_async.py"
"rips/PythonExamples/soil_average_async.py"
"rips/PythonExamples/soil_average_sync.py"
"rips/PythonExamples/view_example.py"
"rips/tests/test_cases.py"
"rips/tests/test_grids.py"
"rips/tests/test_properties.py"
"rips/tests/test_project.py"
"rips/tests/conftest.py"
"rips/tests/dataroot.py"
"rips/tests/test_nnc_properties.py"
"rips/tests/test_simulation_wells.py"
"rips/tests/test_summary_cases.py"
"rips/tests/test_wells.py"
"requirements.txt"
"setup.py"
"README.md"
"LICENSE")
list(APPEND GRPC_PYTHON_SOURCES ${GRPC_PYTHON_GENERATED_SOURCES})
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
foreach(PYTHON_SCRIPT ${GRPC_PYTHON_SOURCES})
list(APPEND GRPC_PYTHON_SOURCES_FULL_PATH "${GRPC_PYTHON_SOURCE_PATH}/${PYTHON_SCRIPT}")
endforeach()
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
foreach(PYTHON_SCRIPT ${GRPC_PYTHON_SOURCES})
list(APPEND GRPC_PYTHON_SOURCES_FULL_PATH
"${GRPC_PYTHON_SOURCE_PATH}/${PYTHON_SCRIPT}")
endforeach()
endif()
add_library( ${PROJECT_NAME} OBJECT
${SOURCE_GROUP_HEADER_FILES}
${SOURCE_GROUP_SOURCE_FILES}
${GRPC_HEADER_FILES}
${GRPC_CPP_SOURCES}
)
add_library(
${PROJECT_NAME} OBJECT
${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES}
${GRPC_HEADER_FILES} ${GRPC_CPP_SOURCES})
target_link_libraries( ${PROJECT_NAME}
${LINK_LIBRARIES}
)
target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARIES})
if (MSVC)
if(MSVC)
# GRPC generates a lot of harmless warnings on MSVC
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4251 /wd4702 /wd4005 /wd4244 /wd4125 /wd4267")
set_target_properties(
${PROJECT_NAME}
PROPERTIES COMPILE_FLAGS "/wd4251 /wd4702 /wd4005 /wd4244 /wd4125 /wd4267")
else()
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-Wno-overloaded-virtual")
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
"-Wno-overloaded-virtual")
endif()
# install gRPC Python files
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE)
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE)
message(STATUS "Installing Python modules")
add_custom_command(
TARGET PipInstall
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --upgrade pip
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --user wheel setuptools pytest
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --user grpcio-tools
)
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --upgrade
pip
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --user
wheel setuptools pytest
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --user
grpcio-tools)
endif()
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND RESINSIGHT_GRPC_BUNDLE_PYTHON_MODULE)
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE AND RESINSIGHT_GRPC_BUNDLE_PYTHON_MODULE)
message(STATUS "Bundling Python GRPC modules")
add_custom_command(
TARGET PipInstall
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --user --target=${GRPC_PYTHON_SOURCE_PATH} grpcio-tools
)
COMMAND ${RESINSIGHT_GRPC_PYTHON_EXECUTABLE} ARGS -m pip install --user
--target=${GRPC_PYTHON_SOURCE_PATH} grpcio-tools)
endif()
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
add_custom_target(GeneratedPythonSources ALL DEPENDS ${GRPC_PYTHON_SOURCES_FULL_PATH})
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
add_custom_target(GeneratedPythonSources ALL
DEPENDS ${GRPC_PYTHON_SOURCES_FULL_PATH})
add_dependencies(${PROJECT_NAME} GeneratedPythonSources)
if (RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE)
if(RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE)
add_dependencies(${PROJECT_NAME} PipInstall)
add_dependencies(GeneratedPythonSources PipInstall)
endif()
endif()
endif()
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
install(DIRECTORY ${GRPC_PYTHON_SOURCE_PATH}/ DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/Python)
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
install(DIRECTORY ${GRPC_PYTHON_SOURCE_PATH}/
DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/Python)
endif()
source_group( "GrpcInterface" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.cmake )
source_group( "GrpcInterface\\GrpcProtos" FILES ${GRPC_PROTO_FILES_FULL_PATH} )
if (RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
source_group(TREE ${GRPC_PYTHON_SOURCE_PATH} FILES ${GRPC_PYTHON_SOURCES_FULL_PATH} PREFIX "GrpcInterface\\Python")
source_group(
"GrpcInterface"
FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES}
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.cmake)
source_group("GrpcInterface\\GrpcProtos" FILES ${GRPC_PROTO_FILES_FULL_PATH})
if(RESINSIGHT_GRPC_PYTHON_EXECUTABLE)
source_group(
TREE ${GRPC_PYTHON_SOURCE_PATH}
FILES ${GRPC_PYTHON_SOURCES_FULL_PATH}
PREFIX "GrpcInterface\\Python")
endif()
@@ -1,24 +1,16 @@
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required(VERSION 3.12)
project (ResultStatisticsCache)
project(ResultStatisticsCache)
include_directories(
${LibCore_SOURCE_DIR}
)
include_directories(${LibCore_SOURCE_DIR})
add_library( ${PROJECT_NAME}
RigStatisticsCalculator.h
RigStatisticsCalculator.cpp
RigStatisticsDataCache.h
RigStatisticsDataCache.cpp
RigStatisticsMath.h
RigStatisticsMath.cpp
)
add_library(
${PROJECT_NAME}
RigStatisticsCalculator.h RigStatisticsCalculator.cpp
RigStatisticsDataCache.h RigStatisticsDataCache.cpp RigStatisticsMath.h
RigStatisticsMath.cpp)
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} LibCore)