mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -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",
|
||||
vcpkg-response-file: vcpkg_x64-windows.txt,
|
||||
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",
|
||||
@ -36,7 +38,9 @@ jobs:
|
||||
cc: "gcc", cxx: "g++",
|
||||
vcpkg-response-file: vcpkg_x64-linux.txt,
|
||||
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",
|
||||
@ -44,7 +48,19 @@ jobs:
|
||||
cc: "clang", cxx: "clang++",
|
||||
vcpkg-response-file: vcpkg_x64-linux.txt,
|
||||
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:
|
||||
- name: Checkout
|
||||
@ -67,6 +83,8 @@ jobs:
|
||||
run: |
|
||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||
set(buildcache_suffix "win-msvc.zip")
|
||||
elseif ("${{ runner.os }}" STREQUAL "macOS")
|
||||
set(buildcache_suffix "macos.zip")
|
||||
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
||||
set(buildcache_suffix "linux.tar.gz")
|
||||
endif()
|
||||
@ -128,7 +146,7 @@ jobs:
|
||||
with:
|
||||
VCPKGRESPONSEFILE: ${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}
|
||||
- name: Restore from cache and install vcpkg
|
||||
uses: lukka/run-vcpkg@v5
|
||||
uses: lukka/run-vcpkg@v7
|
||||
id: runvcpkg
|
||||
with:
|
||||
vcpkgArguments: '@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}'
|
||||
@ -181,7 +199,7 @@ jobs:
|
||||
-D RESINSIGHT_BUNDLE_OPENSSL=true
|
||||
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=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_DOWNLOAD_PYTHON_MODULE=true
|
||||
-D CMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }}
|
||||
@ -217,12 +235,13 @@ jobs:
|
||||
|
||||
- name: Stats for buildcache
|
||||
run: ${{ github.workspace }}/buildcache/bin/buildcache -s
|
||||
|
||||
- name: Run Unit Tests
|
||||
if: "matrix.config.execute-unit-tests == true"
|
||||
shell: bash
|
||||
run: |
|
||||
cmakebuild/ApplicationExeCode/ResInsight --unittest
|
||||
- name: Run pytest
|
||||
if: "matrix.config.build-python-module == true"
|
||||
env:
|
||||
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationExeCode/ResInsight
|
||||
run: |
|
||||
|
@ -76,7 +76,8 @@ RiuWellImportWizard::RiuWellImportWizard( const QString& webServiceAddress,
|
||||
SIGNAL( authenticationRequired( QNetworkReply*, QAuthenticator* ) ),
|
||||
this,
|
||||
SLOT( slotAuthenticationRequired( QNetworkReply*, QAuthenticator* ) ) );
|
||||
#ifndef QT_NO_OPENSSL
|
||||
|
||||
#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX )
|
||||
connect( &m_networkAccessManager,
|
||||
SIGNAL( sslErrors( QNetworkReply*, QList<QSslError> ) ),
|
||||
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 )
|
||||
{
|
||||
QString errorString;
|
||||
@ -340,7 +341,7 @@ void RiuWellImportWizard::startRequest( QUrl url )
|
||||
{
|
||||
auto request = QNetworkRequest( url );
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX )
|
||||
bool supportsSsl = QSslSocket::supportsSsl();
|
||||
if ( supportsSsl )
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ public slots:
|
||||
|
||||
int wellSelectionPageId();
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
#if !defined(QT_NO_OPENSSL) && !defined(CVF_OSX)
|
||||
void sslErrors( QNetworkReply*, const QList<QSslError>& errors );
|
||||
#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;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
RigConnection( 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 hasCommonArea() const;
|
||||
|
||||
|
@ -502,7 +502,6 @@ list(APPEND APP_FWK_LIBRARIES
|
||||
|
||||
set_property(TARGET
|
||||
${APP_FWK_LIBRARIES}
|
||||
cafHexInterpolator
|
||||
PROPERTY FOLDER "AppFwk"
|
||||
)
|
||||
|
||||
@ -556,9 +555,18 @@ 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.4
|
||||
)
|
||||
|
||||
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
|
||||
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
|
||||
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)
|
||||
|
||||
|
@ -2,12 +2,6 @@ cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafHexInterpolator)
|
||||
|
||||
set(PROJECT_FILES cafHexInterpolator.h)
|
||||
add_library(${PROJECT_NAME} INTERFACE)
|
||||
|
||||
add_library(${PROJECT_NAME} ${PROJECT_FILES})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} LibCore)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE .)
|
||||
|
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