mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add MacOS build support
This commit is contained in:
parent
6e45d51e4e
commit
2d9ac615f2
31
.github/workflows/ResInsightWithCache.yml
vendored
31
.github/workflows/ResInsightWithCache.yml
vendored
@ -28,7 +28,9 @@ jobs:
|
|||||||
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
|
||||||
vcpkg-response-file: vcpkg_x64-windows.txt,
|
vcpkg-response-file: vcpkg_x64-windows.txt,
|
||||||
vcpkg-triplet: x64-windows,
|
vcpkg-triplet: x64-windows,
|
||||||
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake'
|
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake',
|
||||||
|
build-python-module: true,
|
||||||
|
execute-unit-tests: true
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu 20.04",
|
name: "Ubuntu 20.04",
|
||||||
@ -36,7 +38,9 @@ jobs:
|
|||||||
cc: "gcc", cxx: "g++",
|
cc: "gcc", cxx: "g++",
|
||||||
vcpkg-response-file: vcpkg_x64-linux.txt,
|
vcpkg-response-file: vcpkg_x64-linux.txt,
|
||||||
vcpkg-triplet: x64-linux,
|
vcpkg-triplet: x64-linux,
|
||||||
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake'
|
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake',
|
||||||
|
build-python-module: true,
|
||||||
|
execute-unit-tests: true
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Ubuntu 20.04 clang",
|
name: "Ubuntu 20.04 clang",
|
||||||
@ -44,7 +48,19 @@ jobs:
|
|||||||
cc: "clang", cxx: "clang++",
|
cc: "clang", cxx: "clang++",
|
||||||
vcpkg-response-file: vcpkg_x64-linux.txt,
|
vcpkg-response-file: vcpkg_x64-linux.txt,
|
||||||
vcpkg-triplet: x64-linux,
|
vcpkg-triplet: x64-linux,
|
||||||
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake'
|
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake',
|
||||||
|
build-python-module: true,
|
||||||
|
execute-unit-tests: true
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Mac OS",
|
||||||
|
os: macos-latest,
|
||||||
|
cc: "clang", cxx: "clang++",
|
||||||
|
vcpkg-response-file: vcpkg_x64-osx.txt,
|
||||||
|
vcpkg-triplet: x64-osx,
|
||||||
|
cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake',
|
||||||
|
build-python-module: false,
|
||||||
|
execute-unit-tests: false
|
||||||
}
|
}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -67,6 +83,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||||
set(buildcache_suffix "win-msvc.zip")
|
set(buildcache_suffix "win-msvc.zip")
|
||||||
|
elseif ("${{ runner.os }}" STREQUAL "macOS")
|
||||||
|
set(buildcache_suffix "macos.zip")
|
||||||
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
||||||
set(buildcache_suffix "linux.tar.gz")
|
set(buildcache_suffix "linux.tar.gz")
|
||||||
endif()
|
endif()
|
||||||
@ -128,7 +146,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
VCPKGRESPONSEFILE: ${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}
|
VCPKGRESPONSEFILE: ${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}
|
||||||
- name: Restore from cache and install vcpkg
|
- name: Restore from cache and install vcpkg
|
||||||
uses: lukka/run-vcpkg@v5
|
uses: lukka/run-vcpkg@v7
|
||||||
id: runvcpkg
|
id: runvcpkg
|
||||||
with:
|
with:
|
||||||
vcpkgArguments: '@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}'
|
vcpkgArguments: '@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}'
|
||||||
@ -181,7 +199,7 @@ jobs:
|
|||||||
-D RESINSIGHT_BUNDLE_OPENSSL=true
|
-D RESINSIGHT_BUNDLE_OPENSSL=true
|
||||||
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true
|
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true
|
||||||
-D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true
|
-D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true
|
||||||
-D RESINSIGHT_ENABLE_GRPC=true
|
-D RESINSIGHT_ENABLE_GRPC=${{ matrix.config.build-python-module }}
|
||||||
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
|
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
|
||||||
-D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
|
-D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true
|
||||||
-D CMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }}
|
-D CMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }}
|
||||||
@ -217,12 +235,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Stats for buildcache
|
- name: Stats for buildcache
|
||||||
run: ${{ github.workspace }}/buildcache/bin/buildcache -s
|
run: ${{ github.workspace }}/buildcache/bin/buildcache -s
|
||||||
|
|
||||||
- name: Run Unit Tests
|
- name: Run Unit Tests
|
||||||
|
if: "matrix.config.execute-unit-tests == true"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cmakebuild/ApplicationExeCode/ResInsight --unittest
|
cmakebuild/ApplicationExeCode/ResInsight --unittest
|
||||||
- name: Run pytest
|
- name: Run pytest
|
||||||
|
if: "matrix.config.build-python-module == true"
|
||||||
env:
|
env:
|
||||||
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationExeCode/ResInsight
|
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationExeCode/ResInsight
|
||||||
run: |
|
run: |
|
||||||
|
@ -76,7 +76,8 @@ RiuWellImportWizard::RiuWellImportWizard( const QString& webServiceAddress,
|
|||||||
SIGNAL( authenticationRequired( QNetworkReply*, QAuthenticator* ) ),
|
SIGNAL( authenticationRequired( QNetworkReply*, QAuthenticator* ) ),
|
||||||
this,
|
this,
|
||||||
SLOT( slotAuthenticationRequired( QNetworkReply*, QAuthenticator* ) ) );
|
SLOT( slotAuthenticationRequired( QNetworkReply*, QAuthenticator* ) ) );
|
||||||
#ifndef QT_NO_OPENSSL
|
|
||||||
|
#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX )
|
||||||
connect( &m_networkAccessManager,
|
connect( &m_networkAccessManager,
|
||||||
SIGNAL( sslErrors( QNetworkReply*, QList<QSslError> ) ),
|
SIGNAL( sslErrors( QNetworkReply*, QList<QSslError> ) ),
|
||||||
this,
|
this,
|
||||||
@ -305,7 +306,7 @@ void RiuWellImportWizard::slotAuthenticationRequired( QNetworkReply* networkRepl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_OPENSSL
|
#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX )
|
||||||
void RiuWellImportWizard::sslErrors( QNetworkReply*, const QList<QSslError>& errors )
|
void RiuWellImportWizard::sslErrors( QNetworkReply*, const QList<QSslError>& errors )
|
||||||
{
|
{
|
||||||
QString errorString;
|
QString errorString;
|
||||||
@ -340,7 +341,7 @@ void RiuWellImportWizard::startRequest( QUrl url )
|
|||||||
{
|
{
|
||||||
auto request = QNetworkRequest( url );
|
auto request = QNetworkRequest( url );
|
||||||
|
|
||||||
#ifndef QT_NO_OPENSSL
|
#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX )
|
||||||
bool supportsSsl = QSslSocket::supportsSsl();
|
bool supportsSsl = QSslSocket::supportsSsl();
|
||||||
if ( supportsSsl )
|
if ( supportsSsl )
|
||||||
{
|
{
|
||||||
|
@ -228,7 +228,7 @@ public slots:
|
|||||||
|
|
||||||
int wellSelectionPageId();
|
int wellSelectionPageId();
|
||||||
|
|
||||||
#ifndef QT_NO_OPENSSL
|
#if !defined(QT_NO_OPENSSL) && !defined(CVF_OSX)
|
||||||
void sslErrors( QNetworkReply*, const QList<QSslError>& errors );
|
void sslErrors( QNetworkReply*, const QList<QSslError>& errors );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ bool RigConnection::hasCommonArea() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigConnection::operator==( const RigConnection& rhs )
|
bool RigConnection::operator==( const RigConnection& rhs ) const
|
||||||
{
|
{
|
||||||
return m_c1GlobIdx == rhs.m_c1GlobIdx && m_c2GlobIdx == rhs.m_c2GlobIdx;
|
return m_c1GlobIdx == rhs.m_c1GlobIdx && m_c2GlobIdx == rhs.m_c2GlobIdx;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public:
|
|||||||
RigConnection( const RigConnection& rhs );
|
RigConnection( const RigConnection& rhs );
|
||||||
|
|
||||||
RigConnection& operator=( const RigConnection& rhs );
|
RigConnection& operator=( const RigConnection& rhs );
|
||||||
bool operator==( const RigConnection& rhs );
|
bool operator==( const RigConnection& rhs ) const;
|
||||||
bool operator<( const RigConnection& other ) const;
|
bool operator<( const RigConnection& other ) const;
|
||||||
bool hasCommonArea() const;
|
bool hasCommonArea() const;
|
||||||
|
|
||||||
|
@ -502,7 +502,6 @@ list(APPEND APP_FWK_LIBRARIES
|
|||||||
|
|
||||||
set_property(TARGET
|
set_property(TARGET
|
||||||
${APP_FWK_LIBRARIES}
|
${APP_FWK_LIBRARIES}
|
||||||
cafHexInterpolator
|
|
||||||
PROPERTY FOLDER "AppFwk"
|
PROPERTY FOLDER "AppFwk"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -556,10 +555,19 @@ if (RESINSIGHT_PRIVATE_INSTALL)
|
|||||||
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2
|
||||||
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.4
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.4
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
|
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
set(ERT_SHARED_LIB_FILES
|
||||||
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.dylib
|
||||||
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.2.dylib
|
||||||
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.2.4.dylib
|
||||||
|
)
|
||||||
|
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/ResInsight.app/Contents/MacOS )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
endif (RESINSIGHT_PRIVATE_INSTALL)
|
endif (RESINSIGHT_PRIVATE_INSTALL)
|
||||||
|
|
||||||
if (RESINSIGHT_HDF5_BUNDLE_LIBRARIES)
|
if (RESINSIGHT_HDF5_BUNDLE_LIBRARIES)
|
||||||
|
@ -2,12 +2,6 @@ cmake_minimum_required(VERSION 3.12)
|
|||||||
|
|
||||||
project(cafHexInterpolator)
|
project(cafHexInterpolator)
|
||||||
|
|
||||||
set(PROJECT_FILES cafHexInterpolator.h)
|
add_library(${PROJECT_NAME} INTERFACE)
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} ${PROJECT_FILES})
|
target_include_directories(${PROJECT_NAME} INTERFACE .)
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME} LibCore)
|
|
||||||
|
|
||||||
source_group("" FILES ${PROJECT_FILES})
|
|
||||||
|
6
vcpkg_x64-osx.txt
Normal file
6
vcpkg_x64-osx.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
grpc
|
||||||
|
boost-filesystem
|
||||||
|
boost-spirit
|
||||||
|
eigen3
|
||||||
|
--triplet
|
||||||
|
x64-osx
|
Loading…
Reference in New Issue
Block a user