diff --git a/.github/workflows/Ubuntu.yml b/.github/workflows/Ubuntu.yml index 008498b..6d19f1b 100644 --- a/.github/workflows/Ubuntu.yml +++ b/.github/workflows/Ubuntu.yml @@ -24,16 +24,20 @@ jobs: # optional exclude: can be partial, include: must be specific matrix: cudacxx: - - cuda: "11.7" + - cuda: "11.8" cuda_arch: "35" - hostcxx: gcc-8 - os: ubuntu-20.04 + hostcxx: gcc-10 + os: ubuntu-22.04 + - cuda: "11.8" + cuda_arch: "35" + hostcxx: clang-14 + os: ubuntu-22.04 config: - name: "Release" config: "Release" # Name the job based on matrix/env options - name: "build (${{ matrix.cudacxx.cuda }}, ${{ matrix.config.name }}, ${{ matrix.cudacxx.os }})" + name: "build (${{ matrix.cudacxx.cuda }}, ${{ matrix.cudacxx.hostcxx }}, ${{ matrix.config.name }}, ${{ matrix.cudacxx.os }})" # Define job-wide env constants, and promote matrix elements to env constants for portable steps. env: @@ -66,9 +70,23 @@ jobs: echo "CXX=/usr/bin/g++-${gcc_version}" >> $GITHUB_ENV echo "CUDAHOSTCXX=/usr/bin/g++-${gcc_version}" >> $GITHUB_ENV + - name: Install/Select clang and clang++ + if: ${{ startsWith(env.HOSTCXX, 'clang-')}} + run: | + clang=${{ env.HOSTCXX }} + clang_version=${clang/clang-/} + sudo apt-get install -y clang-${clang_version} clang-tools-${clang_version} + echo "CC=/usr/bin/clang-${clang_version}" >> $GITHUB_ENV + echo "CXX=/usr/bin/clang++-${clang_version}" >> $GITHUB_ENV + echo "CUDAHOSTCXX=/usr/bin/clang++-${clang_version}" >> $GITHUB_ENV + - name: Install Visualisation Dependencies if: ${{ startswith(env.OS, 'ubuntu') && env.VISUALISATION == 'ON' }} run: | + # Install ubuntu-22.04 packages + if [ "$OS" == 'ubuntu-22.04' ]; then + sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev + fi # Install ubuntu-20.04 packages if [ "$OS" == 'ubuntu-20.04' ]; then sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev diff --git a/README.md b/README.md index 169eb67..c02379e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It is unlikely to be useful independently. + [CUDA](https://developer.nvidia.com/cuda-downloads) `>= 11.0` and a Compute Capability `>= 3.5` NVIDIA GPU. + C++17 capable C++ compiler (host), compatible with the installed CUDA version + [Microsoft Visual Studio 2019](https://visualstudio.microsoft.com/) (Windows) - + [make](https://www.gnu.org/software/make/) and [GCC](https://gcc.gnu.org/) `>= 8.1` + + [make](https://www.gnu.org/software/make/) and [GCC](https://gcc.gnu.org/) `>= 8.1` or [Clang](https://clang.llvm.org/) `>= 9` (Linux) + [git](https://git-scm.com/) + [SDL](https://www.libsdl.org/) + [GLM](http://glm.g-truc.net/) *(consistent C++/GLSL vector maths functionality)* diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index cc90a2d..7c5bbb0 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -107,8 +107,18 @@ if(NOT COMMAND SuppressSomeCompilerWarnings) if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.6.0) target_compile_definitions(${SSCW_TARGET} PRIVATE "$<$:__CDPRT_SUPPRESS_SYNC_DEPRECATION_WARNING>") endif() - else() - # Linux specific warning suppressions + elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # Suppress unused function warnigns raised by clang on some vis headers + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Xcompiler -Wno-unused-function>") + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:-Wno-unused-function>") + # Suppress unused-private-field warnings on Clang, which are falsely emitted in some cases where a private member is used in device code (i.e. ArrayMessage) + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Xcompiler -Wno-unused-private-field>") + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:-Wno-unused-private-field>") + # Suppress unused-but-set-variable which triggers on some device code, clang 13+ + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:SHELL:-Xcompiler -Wno-unused-but-set-variable>") + target_compile_options(${SSCW_TARGET} PRIVATE "$<$:-Wno-unused-but-set-variable>") + endif() endif() # Generic OS/host compiler warning suppressions # Ensure NVCC outputs warning numbers diff --git a/src/flamegpu/visualiser/texture/Texture2D_Multisample.h b/src/flamegpu/visualiser/texture/Texture2D_Multisample.h index 3830da1..7cf5b27 100644 --- a/src/flamegpu/visualiser/texture/Texture2D_Multisample.h +++ b/src/flamegpu/visualiser/texture/Texture2D_Multisample.h @@ -81,6 +81,8 @@ class Texture2D_Multisample : public Texture, public RenderTarget { glm::uvec2 dimensions; static const char *RAW_TEXTURE_FLAG; unsigned int samples; + // Bring the non-overriden overloaded resize method into the private scope to resolve clang -Woverloaded-virtual + using RenderTarget::resize; }; } // namespace visualiser diff --git a/src/flamegpu/visualiser/ui/Overlay.h b/src/flamegpu/visualiser/ui/Overlay.h index 17d923f..45c2c72 100644 --- a/src/flamegpu/visualiser/ui/Overlay.h +++ b/src/flamegpu/visualiser/ui/Overlay.h @@ -120,6 +120,10 @@ class OverlayGroup { * By default, if any overlay is visible true is returned */ virtual bool getVisible() const; + /** + * Virtual destructor to resolve Wdelete-non-abstract-non-virtual-dtor warning + */ + virtual ~OverlayGroup() { } }; } // namespace visualiser