Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,16 @@ jobs:
with:
arch: x64

- name: Compile and Install GMT (Windows)
- name: Compile GMT (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
mkdir build
cd build
setlocal enabledelayedexpansion
set "INSTALLDIR=%INSTALLDIR:\=/%"
set "WINVCPKGROOT=%VCPKG_INSTALLATION_ROOT:/=\%"
cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=!WINVCPKGROOT!\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake --build . --target install
set "WININSTALLDIR=!INSTALLDIR:/=\!"
echo !WININSTALLDIR!\bin>> %GITHUB_PATH%
endlocal

- name: Install GMT (Linux/macOS)
if: runner.os != 'Windows'
- name: Install GMT
run: |
cd build
cmake --build . --target install
Expand All @@ -145,9 +137,7 @@ jobs:

- name: Check a few simple commands
shell: bash
run: |
export PATH="$INSTALLDIR/bin:$PATH"
bash ci/simple-gmt-tests.sh
run: bash ci/simple-gmt-tests.sh

- name: Check a few simple commands (Windows)
shell: cmd
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,14 @@ jobs:
with:
arch: x64

- name: Compile and Install GMT (Windows)
- name: Compile GMT (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
mkdir build
cd build
setlocal enabledelayedexpansion
set "INSTALLDIR=%INSTALLDIR:\=/%"
set "WINVCPKGROOT=%VCPKG_INSTALLATION_ROOT:/=\%"
cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=!WINVCPKGROOT!\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake --build . --target install
set "WININSTALLDIR=!INSTALLDIR:/=\!"
echo !WININSTALLDIR!\bin>> %GITHUB_PATH%
endlocal

- name: Build documentation
run: |
Expand All @@ -154,8 +147,7 @@ jobs:
# See https://github.com/GenericMappingTools/gmt/issues/7253
grep -v 'WARNING: duplicate label -' doc/rst/html.log

- name: Install GMT (Linux/macOS)
if: runner.os != 'Windows'
- name: Install GMT
run: |
cd build
cmake --build . --target install
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,14 @@ jobs:
with:
arch: x64

- name: Compile and Install GMT (Windows)
- name: Compile GMT (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
mkdir build
cd build
setlocal enabledelayedexpansion
set "INSTALLDIR=%INSTALLDIR:\=/%"
set "WINVCPKGROOT=%VCPKG_INSTALLATION_ROOT:/=\%"
cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=!WINVCPKGROOT!\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
cmake --build . --target install
set "WININSTALLDIR=!INSTALLDIR:/=\!"
echo !WININSTALLDIR!\bin>> %GITHUB_PATH%
endlocal

- name: Pull baseline image data from dvc remote
id: dvc-pull
Expand All @@ -152,8 +145,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

- name: Install GMT (Linux/macOS)
if: runner.os != 'Windows'
- name: Install GMT
run: |
cd build
cmake --build . --target install
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/ConfigCMake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ endif (EXISTS "${CMAKE_BINARY_DIR}/cmake/ConfigUserAdvanced.cmake")
# Do any needed processing of the configuration variables #
###########################################################

# Normalize the installation prefix on Windows (avoid mixing slashes and backslashes).
if (WIN32)
file (TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)
endif (WIN32)

# Set default build type to 'Release'
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release)
Expand Down
Loading