From cac4291261e3364bcf27a6595c5038311180446e Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 30 Jun 2025 10:40:37 +0200 Subject: [PATCH 1/4] clang --- .github/workflows/conda_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda_build.yaml b/.github/workflows/conda_build.yaml index f8b1887..c8e2cbb 100644 --- a/.github/workflows/conda_build.yaml +++ b/.github/workflows/conda_build.yaml @@ -51,7 +51,7 @@ jobs: - name: Build library run: | - conda build conda --output-folder conda_package + conda build conda --output-folder conda_package --variant-config-files conda/variants/macOS.yaml - name: Upload artifact uses: actions/upload-artifact@v4 From 4f2eefe9f44cc7165051903dd6d81522e0962936 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 30 Jun 2025 10:40:48 +0200 Subject: [PATCH 2/4] set clang --- .github/workflows/test_library.yaml | 64 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test_library.yaml b/.github/workflows/test_library.yaml index 605211b..54db265 100644 --- a/.github/workflows/test_library.yaml +++ b/.github/workflows/test_library.yaml @@ -7,9 +7,6 @@ concurrency: on: [push, pull_request] -env: - COMPILER: c++ - jobs: Tests-Viewshed-library: @@ -60,15 +57,16 @@ jobs: -S . \ -B build \ -G Ninja \ - -DCMAKE_CXX_COMPILER=${COMPILER} \ - -DCMAKE_BUILD_TYPE=Release \ - -DPACK_DEB:bool=off \ - -DBUILD_DOCUMENTATION:bool=off \ - -DBUILD_TESTS:bool=on \ - -DCELL_EVENT_DATA_FLOAT:bool=on \ - -DOUTPUT_RASTER_DATA_FLOAT:bool=on \ - -DNEEDS_QT:bool=off \ - -DBUILD_GUI_APP:bool=off + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D CMAKE_BUILD_TYPE=Release \ + -D PACK_DEB:bool=off \ + -D BUILD_DOCUMENTATION:bool=off \ + -D BUILD_TESTS:bool=on \ + -D CELL_EVENT_DATA_FLOAT:bool=on \ + -D OUTPUT_RASTER_DATA_FLOAT:bool=on \ + -D NEEDS_QT:bool=off \ + -D BUILD_GUI_APP:bool=off - name: Build run: | @@ -92,15 +90,16 @@ jobs: -S . \ -B build \ -G Ninja \ - -DCMAKE_CXX_COMPILER=${COMPILER} \ - -DCMAKE_BUILD_TYPE=Release \ - -DPACK_DEB:bool=off \ - -DBUILD_DOCUMENTATION:bool=off \ - -DBUILD_TESTS:bool=on \ - -DCELL_EVENT_DATA_FLOAT:bool=off \ - -DOUTPUT_RASTER_DATA_FLOAT:bool=off \ - -DNEEDS_QT:bool=off \ - -DBUILD_GUI_APP:bool=off + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D CMAKE_BUILD_TYPE=Release \ + -D PACK_DEB:bool=off \ + -D BUILD_DOCUMENTATION:bool=off \ + -D BUILD_TESTS:bool=on \ + -D CELL_EVENT_DATA_FLOAT:bool=off \ + -D OUTPUT_RASTER_DATA_FLOAT:bool=off \ + -D NEEDS_QT:bool=off \ + -D BUILD_GUI_APP:bool=off cmake --build build --config Release --target build_tests cmake --build build --config Release --target run_tests @@ -153,18 +152,19 @@ jobs: run: | cmake \ -S . \ - -Bbuild \ + -B build \ -G Ninja \ - -DCMAKE_CXX_COMPILER=${COMPILER} \ - -DCMAKE_BUILD_TYPE=Release \ - -DPACK_DEB:bool=off \ - -DBUILD_DOCUMENTATION:bool=off \ - -DBUILD_TESTS:bool=on \ - -DCELL_EVENT_DATA_FLOAT:bool=on \ - -DOUTPUT_RASTER_DATA_FLOAT:bool=on \ - -DNEEDS_QT:bool=on \ - -DBUILD_GUI_APP:bool=on \ - -DCMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_C_COMPILER=clang \ + -D CMAKE_CXX_COMPILER=clang++ \ + -D CMAKE_BUILD_TYPE=Release \ + -D PACK_DEB:bool=off \ + -D BUILD_DOCUMENTATION:bool=off \ + -D BUILD_TESTS:bool=on \ + -D CELL_EVENT_DATA_FLOAT:bool=on \ + -D OUTPUT_RASTER_DATA_FLOAT:bool=on \ + -D NEEDS_QT:bool=on \ + -D BUILD_GUI_APP:bool=on \ + -D CMAKE_INSTALL_PREFIX=/usr \ - name: Run Tests even with Qt id: unittestsqt From 3662f307a3242ae5a4de6634150518f588082ad6 Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 30 Jun 2025 10:40:55 +0200 Subject: [PATCH 3/4] clang --- scripts/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install.sh b/scripts/install.sh index 89ec24f..27382ed 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,6 +4,7 @@ cmake \ -S . \ -B build \ -G Ninja \ + -D CMAKE_C_COMPILER=clang \ -D CMAKE_CXX_COMPILER=clang++ \ -D CMAKE_BUILD_TYPE=Release \ -D PACK_DEB:bool=ON \ From f9b623a7ff9ac851035bb7c1e7667afd9e8b69df Mon Sep 17 00:00:00 2001 From: Jan Caha Date: Mon, 30 Jun 2025 11:42:59 +0200 Subject: [PATCH 4/4] use clang on all unix systems --- .github/workflows/conda_build.yaml | 4 ++-- conda/variants/{macOS.yaml => unix.yaml} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename conda/variants/{macOS.yaml => unix.yaml} (100%) diff --git a/.github/workflows/conda_build.yaml b/.github/workflows/conda_build.yaml index c8e2cbb..842d98b 100644 --- a/.github/workflows/conda_build.yaml +++ b/.github/workflows/conda_build.yaml @@ -51,7 +51,7 @@ jobs: - name: Build library run: | - conda build conda --output-folder conda_package --variant-config-files conda/variants/macOS.yaml + conda build conda --output-folder conda_package --variant-config-files conda/variants/unix.yaml - name: Upload artifact uses: actions/upload-artifact@v4 @@ -145,7 +145,7 @@ jobs: - name: Build library run: | - conda build conda --output-folder conda_package --variant-config-files conda/variants/macOS.yaml + conda build conda --output-folder conda_package --variant-config-files conda/variants/unix.yaml - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/conda/variants/macOS.yaml b/conda/variants/unix.yaml similarity index 100% rename from conda/variants/macOS.yaml rename to conda/variants/unix.yaml