diff --git a/.github/templates/Readme.md b/.github/templates/Readme.md new file mode 100644 index 0000000000..cec3e0170b --- /dev/null +++ b/.github/templates/Readme.md @@ -0,0 +1,12 @@ +# Preprocessing the GA workflows + +We're using [ytt](https://github.com/vmware-tanzu/carvel-ytt) to generate the github actions workflows. + +## Prerequisites + +1. Download the executable for your platform from the [releases page](https://github.com/vmware-tanzu/carvel-ytt/releases). +1. Rename it to `ytt`. +1. Place it in your PATH. + +## Building the docs +1. In `$SolutionDir/.github/templates` run `./process.sh`. diff --git a/.github/templates/main.yml b/.github/templates/main.yml new file mode 100644 index 0000000000..fba732acd1 --- /dev/null +++ b/.github/templates/main.yml @@ -0,0 +1,187 @@ +#@ load("@ytt:template", "template") +#@ load("@ytt:overlay", "overlay") + +#@ configuration = "Release" +#@ androidABIs = [ 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' ] +#@ windowsArchs = [ 'Win32', 'x64' ] +#@ windowsUWPArchs = [ 'Win32', 'x64', 'ARM' ] +#@ wrappersCacheCondition = "steps.check-cache.outputs.cache-hit != 'true'" + +#@ def checkoutCode(): +name: Checkout code +uses: actions/checkout@v2 +with: + submodules: recursive +#@ end + +#@ def checkCache(key): +name: Check cache +id: check-cache +uses: actions/cache@v2 +with: + path: ./wrappers/build/** + key: #@ key +#@ end + +#@ def cacheVcpkg(): +name: Check Vcpkg cache +id: check-vcpkg-cache +uses: actions/cache@v2 +with: + path: 'C:\src' + key: vcpkg +if: #@ wrappersCacheCondition +#@ end + +#@ def setupVcpkg(): +name: Setup Vcpkg +run: | + Write-Output 'Beginning download...' + Invoke-WebRequest -Uri https://static.realm.io/downloads/vcpkg.zip -OutFile C:\vcpkg.zip + Write-Output ((Get-Item C:\vcpkg.zip).length/1MB) + Expand-Archive -Path C:\vcpkg.zip -DestinationPath C:\ + Write-Output 'Completed!' +shell: powershell +if: #@ wrappersCacheCondition + " && steps.check-vcpkg-cache.outputs.cache-hit != 'true'" +#@ end + +#@ def buildWrappers(cmd, outputVar, intermediateSteps = []): +#@ configurationParam = " --configuration=" + configuration +#@ ltoParam = " -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}" +#@ if cmd.startswith("powershell"): +#@ configurationParam = " -Configuration " + configuration +#@ ltoParam = "${{ github.event_name != 'pull_request' && ' -EnableLTO' || '' }}" +#@ end +#@ cacheKey = outputVar + "-" + configuration + "-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}}" +#@ actualCommand = cmd + configurationParam + ltoParam + +steps: + - #@ checkoutCode() + - #@ checkCache(cacheKey) + #@ for step in intermediateSteps: + - #@ step + #@ end + - name: Build wrappers + run: #@ actualCommand + if: #@ wrappersCacheCondition + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: #@ outputVar + path: wrappers/build/** + retention-days: 1 +#@ end + +--- +name: build and test +"on": + push: + branches: + - main + - master + pull_request: +jobs: + build-wrappers-macos: + runs-on: macos-latest + name: Build macOS wrappers + _: #@ template.replace(buildWrappers("./wrappers/build-macos.sh", "wrappers-macos")) + build-wrappers-ios: + runs-on: macos-latest + name: Build iOS wrappers + _: #@ template.replace(buildWrappers("./wrappers/build-ios.sh", "wrappers-ios")) + build-wrappers-linux: + runs-on: ubuntu-20.04 + name: Build Linux wrappers + _: #@ template.replace(buildWrappers("./wrappers/build.sh", "wrappers-linux")) + build-wrappers-android: + runs-on: ubuntu-20.04 + name: Build Android wrappers + strategy: + matrix: + arch: #@ androidABIs + _: #@ template.replace(buildWrappers("./wrappers/build-android.sh --ARCH=${{ matrix.arch }}", "wrappers-android-${{ matrix.arch }}")) + build-wrappers-windows: + runs-on: windows-latest + name: Build Windows wrappers + strategy: + matrix: + arch: #@ windowsArchs + _: #@ template.replace(buildWrappers("powershell ./wrappers/build.ps1 Windows -Platforms ${{ matrix.arch }}", "wrappers-windows-${{ matrix.arch }}", [ cacheVcpkg(), setupVcpkg() ])) + build-wrappers-windows-uwp: + runs-on: windows-latest + name: Build Windows UWP wrappers + strategy: + matrix: + arch: #@ windowsUWPArchs + _: #@ template.replace(buildWrappers("powershell ./wrappers/build.ps1 WindowsStore -Platforms ${{ matrix.arch }}", "wrappers-windows-uwp-${{ matrix.arch }}", [ cacheVcpkg(), setupVcpkg() ])) + build-package: + runs-on: windows-latest + name: Build packages + needs: + - build-wrappers-windows + - build-wrappers-macos + - build-wrappers-ios + - build-wrappers-android + - build-wrappers-linux + - build-wrappers-windows-uwp + steps: + - name: Fetch Artifacts MacOS + uses: actions/download-artifact@v2 + with: + name: wrappers-macos + path: wrappers/build + - name: Fetch Artifacts iOS + uses: actions/download-artifact@v2 + with: + name: wrappers-ios + path: wrappers/build + - name: Fetch Artifacts Linux + uses: actions/download-artifact@v2 + with: + name: wrappers-linux + path: wrappers/build + - name: Fetch Artifacts Android armeabi-v7a + uses: actions/download-artifact@v2 + with: + name: wrappers-android-armeabi-v7a + path: wrappers/build + - name: Fetch Artifacts Android arm64-v8a + uses: actions/download-artifact@v2 + with: + name: wrappers-android-arm64-v8a + path: wrappers/build + - name: Fetch Artifacts Android x86 + uses: actions/download-artifact@v2 + with: + name: wrappers-android-x86 + path: wrappers/build + - name: Fetch Artifacts Android x86_64 + uses: actions/download-artifact@v2 + with: + name: wrappers-android-x86_64 + path: wrappers/build + - name: Fetch Artifacts Windows 32bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-Win32 + path: wrappers/build + - name: Fetch Artifacts Windows 64bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-x64 + path: wrappers/build + - name: Fetch Artifacts Windows UWP 32bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-uwp-Win32 + path: wrappers/build + - name: Fetch Artifacts Windows UWP 64bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-uwp-x64 + path: wrappers/build + - name: Fetch Artifacts Windows UWP ARM + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-uwp-ARM + path: wrappers/build diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 005077456f..a8bfcb3f18 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: branches: - -master + - master env: # Branch for Github Pages gh-pages-branch: gh-pages diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100755 index 0000000000..e447d7b861 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,267 @@ +name: build and test +"on": + push: + branches: + - main + - master + pull_request: null +jobs: + build-wrappers-macos: + runs-on: macos-latest + name: Build macOS wrappers + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check cache + id: check-cache + uses: actions/cache@v2 + with: + path: ./wrappers/build/** + key: wrappers-macos-Release-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}} + - name: Build wrappers + run: ./wrappers/build-macos.sh --configuration=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }} + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: wrappers-macos + path: wrappers/build/** + retention-days: 1 + build-wrappers-ios: + runs-on: macos-latest + name: Build iOS wrappers + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check cache + id: check-cache + uses: actions/cache@v2 + with: + path: ./wrappers/build/** + key: wrappers-ios-Release-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}} + - name: Build wrappers + run: ./wrappers/build-ios.sh --configuration=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }} + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: wrappers-ios + path: wrappers/build/** + retention-days: 1 + build-wrappers-linux: + runs-on: ubuntu-20.04 + name: Build Linux wrappers + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check cache + id: check-cache + uses: actions/cache@v2 + with: + path: ./wrappers/build/** + key: wrappers-linux-Release-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}} + - name: Build wrappers + run: ./wrappers/build.sh --configuration=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }} + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: wrappers-linux + path: wrappers/build/** + retention-days: 1 + build-wrappers-android: + runs-on: ubuntu-20.04 + name: Build Android wrappers + strategy: + matrix: + arch: + - armeabi-v7a + - arm64-v8a + - x86 + - x86_64 + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check cache + id: check-cache + uses: actions/cache@v2 + with: + path: ./wrappers/build/** + key: wrappers-android-${{ matrix.arch }}-Release-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}} + - name: Build wrappers + run: ./wrappers/build-android.sh --ARCH=${{ matrix.arch }} --configuration=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }} + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: wrappers-android-${{ matrix.arch }} + path: wrappers/build/** + retention-days: 1 + build-wrappers-windows: + runs-on: windows-latest + name: Build Windows wrappers + strategy: + matrix: + arch: + - Win32 + - x64 + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check cache + id: check-cache + uses: actions/cache@v2 + with: + path: ./wrappers/build/** + key: wrappers-windows-${{ matrix.arch }}-Release-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}} + - name: Check Vcpkg cache + id: check-vcpkg-cache + uses: actions/cache@v2 + with: + path: C:\src + key: vcpkg + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Setup Vcpkg + run: | + Write-Output 'Beginning download...' + Invoke-WebRequest -Uri https://static.realm.io/downloads/vcpkg.zip -OutFile C:\vcpkg.zip + Write-Output ((Get-Item C:\vcpkg.zip).length/1MB) + Expand-Archive -Path C:\vcpkg.zip -DestinationPath C:\ + Write-Output 'Completed!' + shell: powershell + if: steps.check-cache.outputs.cache-hit != 'true' && steps.check-vcpkg-cache.outputs.cache-hit != 'true' + - name: Build wrappers + run: powershell ./wrappers/build.ps1 Windows -Platforms ${{ matrix.arch }} -Configuration Release${{ github.event_name != 'pull_request' && ' -EnableLTO' || '' }} + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: wrappers-windows-${{ matrix.arch }} + path: wrappers/build/** + retention-days: 1 + build-wrappers-windows-uwp: + runs-on: windows-latest + name: Build Windows UWP wrappers + strategy: + matrix: + arch: + - Win32 + - x64 + - ARM + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check cache + id: check-cache + uses: actions/cache@v2 + with: + path: ./wrappers/build/** + key: wrappers-windows-uwp-${{ matrix.arch }}-Release-${{ github.event_name != 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}} + - name: Check Vcpkg cache + id: check-vcpkg-cache + uses: actions/cache@v2 + with: + path: C:\src + key: vcpkg + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Setup Vcpkg + run: | + Write-Output 'Beginning download...' + Invoke-WebRequest -Uri https://static.realm.io/downloads/vcpkg.zip -OutFile C:\vcpkg.zip + Write-Output ((Get-Item C:\vcpkg.zip).length/1MB) + Expand-Archive -Path C:\vcpkg.zip -DestinationPath C:\ + Write-Output 'Completed!' + shell: powershell + if: steps.check-cache.outputs.cache-hit != 'true' && steps.check-vcpkg-cache.outputs.cache-hit != 'true' + - name: Build wrappers + run: powershell ./wrappers/build.ps1 WindowsStore -Platforms ${{ matrix.arch }} -Configuration Release${{ github.event_name != 'pull_request' && ' -EnableLTO' || '' }} + if: steps.check-cache.outputs.cache-hit != 'true' + - name: Store artifacts + uses: actions/upload-artifact@v2 + with: + name: wrappers-windows-uwp-${{ matrix.arch }} + path: wrappers/build/** + retention-days: 1 + build-package: + runs-on: windows-latest + name: Build packages + needs: + - build-wrappers-windows + - build-wrappers-macos + - build-wrappers-ios + - build-wrappers-android + - build-wrappers-linux + - build-wrappers-windows-uwp + steps: + - name: Fetch Artifacts MacOS + uses: actions/download-artifact@v2 + with: + name: wrappers-macos + path: wrappers/build + - name: Fetch Artifacts iOS + uses: actions/download-artifact@v2 + with: + name: wrappers-ios + path: wrappers/build + - name: Fetch Artifacts Linux + uses: actions/download-artifact@v2 + with: + name: wrappers-linux + path: wrappers/build + - name: Fetch Artifacts Android armeabi-v7a + uses: actions/download-artifact@v2 + with: + name: wrappers-android-armeabi-v7a + path: wrappers/build + - name: Fetch Artifacts Android arm64-v8a + uses: actions/download-artifact@v2 + with: + name: wrappers-android-arm64-v8a + path: wrappers/build + - name: Fetch Artifacts Android x86 + uses: actions/download-artifact@v2 + with: + name: wrappers-android-x86 + path: wrappers/build + - name: Fetch Artifacts Android x86_64 + uses: actions/download-artifact@v2 + with: + name: wrappers-android-x86_64 + path: wrappers/build + - name: Fetch Artifacts Windows 32bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-Win32 + path: wrappers/build + - name: Fetch Artifacts Windows 64bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-x64 + path: wrappers/build + - name: Fetch Artifacts Windows UWP 32bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-uwp-Win32 + path: wrappers/build + - name: Fetch Artifacts Windows UWP 64bit + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-uwp-x64 + path: wrappers/build + - name: Fetch Artifacts Windows UWP ARM + uses: actions/download-artifact@v2 + with: + name: wrappers-windows-uwp-ARM + path: wrappers/build diff --git a/.gitignore b/.gitignore index f1fe54237a..86eb997637 100644 --- a/.gitignore +++ b/.gitignore @@ -188,7 +188,6 @@ NDependOut *.xam Resource.designer.cs FodyWeavers.xsd -.vscode Realm/Realm.Unity/Runtime/**/*.dll Realm/Realm.Unity/Runtime/**/*.so Realm/Realm.Unity/Runtime/**/*.dylib diff --git a/Jenkinsfile b/Jenkinsfile index d73e6bf522..65e387f669 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -64,7 +64,7 @@ stage('Build wrappers') { rlmNode('osx || macos-catalina') { unstash 'dotnet-wrappers-source' dir('wrappers') { - sh "REALM_CMAKE_CONFIGURATION=${configuration} ./build-macos.sh -GXcode ${bashExtraArgs}" + sh "./build-macos.sh --configuration=${configuration} ${bashExtraArgs}" } stash includes: 'wrappers/build/**', name: 'macos-wrappers' } @@ -73,7 +73,7 @@ stage('Build wrappers') { rlmNode('docker') { unstash 'dotnet-wrappers-source' dir('wrappers') { - buildWrappersInDocker('wrappers', 'centos.Dockerfile', "REALM_CMAKE_CONFIGURATION=${configuration} ./build.sh ${bashExtraArgs}") + buildWrappersInDocker('wrappers', 'centos.Dockerfile', "./build.sh --configuration=${configuration} ${bashExtraArgs}") } stash includes: 'wrappers/build/**', name: 'linux-wrappers' } diff --git a/wrappers/build-android.sh b/wrappers/build-android.sh index 5fa30092da..e93a3cb79b 100755 --- a/wrappers/build-android.sh +++ b/wrappers/build-android.sh @@ -23,7 +23,7 @@ esac done function build() { - REALM_CMAKE_SUBPLATFORM="Android/$1" bash "$SCRIPT_DIRECTORY"/build.sh -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" -DANDROID_ABI=$1 $EXTRA_CMAKE_ARGS + REALM_CMAKE_SUBPLATFORM="Android/$1" bash "$SCRIPT_DIRECTORY"/build.sh -c=$REALM_CMAKE_CONFIGURATION -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DANDROID_ABI=$1 $EXTRA_CMAKE_ARGS } export REALM_CMAKE_CONFIGURATION diff --git a/wrappers/build-ios.sh b/wrappers/build-ios.sh index be946309a6..6c359dfdf3 100755 --- a/wrappers/build-ios.sh +++ b/wrappers/build-ios.sh @@ -10,7 +10,7 @@ for i in "$@" do case $i in -c=*|--configuration=*) - export REALM_CMAKE_CONFIGURATION="${i#*=}" + REALM_CMAKE_CONFIGURATION="${i#*=}" shift ;; *) @@ -20,7 +20,7 @@ esac done function build() { - bash "$SCRIPT_DIRECTORY"/build.sh -GXcode $EXTRA_CMAKE_ARGS \ + bash "$SCRIPT_DIRECTORY"/build.sh -c=$REALM_CMAKE_CONFIGURATION -GXcode $EXTRA_CMAKE_ARGS \ -DCMAKE_SYSTEM_NAME=iOS \ -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \ -DCMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE=YES \ @@ -30,10 +30,10 @@ function build() { # This is a workaround for CMAKE_IOS_INSTALL_COMBINED removing @rpath from LC_DYLIB_ID. # Reported here: https://cmake.org/pipermail/cmake/2018-October/068316.html - rm build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers - xcrun lipo -create cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphoneos/realm-wrappers.framework/realm-wrappers \ - cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphonesimulator/realm-wrappers.framework/realm-wrappers \ - -output build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers + rm "$SCRIPT_DIRECTORY"/build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers + xcrun lipo -create "$SCRIPT_DIRECTORY"/cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphoneos/realm-wrappers.framework/realm-wrappers \ + "$SCRIPT_DIRECTORY"/cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphonesimulator/realm-wrappers.framework/realm-wrappers \ + -output "$SCRIPT_DIRECTORY"/build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers } build \ No newline at end of file diff --git a/wrappers/build-macos.sh b/wrappers/build-macos.sh index ac5b6ce777..ca0013b794 100755 --- a/wrappers/build-macos.sh +++ b/wrappers/build-macos.sh @@ -2,4 +2,4 @@ SCRIPT_DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -bash "$SCRIPT_DIRECTORY"/build.sh -DCMAKE_TOOLCHAIN_FILE="${SCRIPT_DIRECTORY}/realm-core/tools/cmake/macosx.toolchain.cmake" ${@:1} +bash "$SCRIPT_DIRECTORY"/build.sh -GXcode -DCMAKE_TOOLCHAIN_FILE="${SCRIPT_DIRECTORY}/realm-core/tools/cmake/macosx.toolchain.cmake" ${@:1} diff --git a/wrappers/build.sh b/wrappers/build.sh index 3c65c776de..4a979cb252 100755 --- a/wrappers/build.sh +++ b/wrappers/build.sh @@ -1,11 +1,23 @@ #!/bin/bash -config=${1:-Debug} +REALM_CMAKE_CONFIGURATION=Debug + +for i in "$@" +do +case $i in + -c=*|--configuration=*) + REALM_CMAKE_CONFIGURATION="${i#*=}" + shift + ;; + *) + EXTRA_CMAKE_ARGS="$EXTRA_CMAKE_ARGS $i" + ;; +esac +done SCRIPT_DIRECTORY="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REALM_CMAKE_SUBPLATFORM=${REALM_CMAKE_SUBPLATFORM:-$(uname -s)} -REALM_CMAKE_CONFIGURATION=${REALM_CMAKE_CONFIGURATION:-$config} REALM_CMAKE_INSTALL_TARGET=${REALM_CMAKE_INSTALL_TARGET:-install} CMAKE_BINARY_DIR="$SCRIPT_DIRECTORY/cmake/$REALM_CMAKE_SUBPLATFORM" CMAKE_INSTALL_PREFIX="$SCRIPT_DIRECTORY/build" @@ -14,5 +26,5 @@ mkdir -p "$CMAKE_BINARY_DIR" mkdir -p "$CMAKE_INSTALL_PREFIX" cd $CMAKE_BINARY_DIR -cmake "$SCRIPT_DIRECTORY" -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=$REALM_CMAKE_CONFIGURATION ${@:1} +cmake "$SCRIPT_DIRECTORY" -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" -DCMAKE_BUILD_TYPE=$REALM_CMAKE_CONFIGURATION $EXTRA_CMAKE_ARGS cmake --build . --target $REALM_CMAKE_INSTALL_TARGET --config $REALM_CMAKE_CONFIGURATION