From c2494ad231da4faa6517070023b120101d505edf Mon Sep 17 00:00:00 2001 From: Thomas Conrad Clevenger Date: Thu, 29 Aug 2024 09:31:00 -0600 Subject: [PATCH] Disable empty return for _NVCOMPILER (#356) * disable empty return for _NVCOMPILER * Fix MSVC CI build (drop unsupported argument passed to ctest) ``` Run ctest --output-on-failure -- CMake Error: Unknown argument: -- CMake Error: Run 'ctest --help' for all supported options. --------- Co-authored-by: Damien L-G --- .github/workflows/cmake-windows.yml | 2 +- include/experimental/__p2642_bits/layout_padded.hpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index aacc9e98..51d1f4f1 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -39,7 +39,7 @@ jobs: - name: Test working-directory: ${{github.workspace}}/mdspan-build shell: bash - run: ctest --output-on-failure -- + run: ctest --output-on-failure - name: Install shell: bash diff --git a/include/experimental/__p2642_bits/layout_padded.hpp b/include/experimental/__p2642_bits/layout_padded.hpp index e5f7bee4..ef10e0ed 100644 --- a/include/experimental/__p2642_bits/layout_padded.hpp +++ b/include/experimental/__p2642_bits/layout_padded.hpp @@ -60,7 +60,7 @@ MDSPAN_INLINE_FUNCTION constexpr size_t get_actual_static_padding_value() { return dynamic_extent; } // Missing return statement warning from NVCC and ICC -#if defined(__NVCC__) || defined(__INTEL_COMPILER) +#if (defined(__NVCC__) || defined(__INTEL_COMPILER)) && !defined(__NVCOMPILER) return 0; #endif } @@ -106,7 +106,7 @@ struct padded_extent { return init_padding(exts, padding_value); } // Missing return statement warning from NVCC and ICC -#if defined(__NVCC__) || defined(__INTEL_COMPILER) +#if (defined(__NVCC__) || defined(__INTEL_COMPILER)) && !defined(__NVCOMPILER) return {}; #endif } @@ -121,7 +121,7 @@ struct padded_extent { return {}; } // Missing return statement warning from NVCC and ICC -#if defined(__NVCC__) || defined(__INTEL_COMPILER) +#if (defined(__NVCC__) || defined(__INTEL_COMPILER)) && !defined(__NVCOMPILER) return {}; #endif } @@ -136,7 +136,7 @@ struct padded_extent { return {}; } // Missing return statement warning from NVCC and ICC -#if defined(__NVCC__) || defined(__INTEL_COMPILER) +#if (defined(__NVCC__) || defined(__INTEL_COMPILER)) && !defined(__NVCOMPILER) return {}; #endif }