diff --git a/.github/workflows/root-cmakelists.yaml b/.github/workflows/root-cmakelists.yaml index 6de2c11092..8448f211e8 100644 --- a/.github/workflows/root-cmakelists.yaml +++ b/.github/workflows/root-cmakelists.yaml @@ -305,6 +305,7 @@ jobs: cuda: [without] link: [both] cc: [cl] + cxx: [cl] include: - openmp: without openmp-cmake-flags: "-DSUITESPARSE_USE_OPENMP=OFF" @@ -315,6 +316,7 @@ jobs: -DCMAKE_CUDA_COMPILER_LAUNCHER="ccache" link: both cc: cl + cxx: cl - openmp: with cuda: with cuda-cmake-flags: @@ -325,10 +327,17 @@ jobs: -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON cc: cl + cxx: cl - openmp: with cuda: without link: both cc: clang-cl + cxx: clang-cl + - openmp: with + cuda: without + link: both + cc: clang + cxx: clang++ env: CHERE_INVOKING: 1 @@ -459,15 +468,15 @@ jobs: # Suppress erroneous version check. _extra_config+=(-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler) fi - if [ ${{ matrix.cc }} = 'clang-cl' ]; then - # Move away (old) clang-cl that would be in PATH to make sure that - # we use the one that matches the MSVC runtime. + if [[ ${{ matrix.cc }} == clang* ]]; then + # Move away (old) clang/clang++ and clang-cl that would be in PATH + # to make sure that we use the one that matches the MSVC runtime. mv C:/Program\ Files/LLVM C:/Program\ Files/LLVM_old fi mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build cmake -G"Ninja Multi-Config" \ -DCMAKE_C_COMPILER=${{ matrix.cc }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cc }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_INSTALL_PREFIX=".." \ -DCMAKE_PREFIX_PATH="C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \ @@ -532,7 +541,7 @@ jobs: printf "::group::\033[0;32m==>\033[0m Configuring example\n" cmake -G"Ninja Multi-Config" \ -DCMAKE_C_COMPILER=${{ matrix.cc }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cc }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \ -DBLA_VENDOR="All" \ ${{ matrix.openmp-cmake-flags }} \ @@ -570,7 +579,7 @@ jobs: cd build cmake -G"Ninja Multi-Config" \ -DCMAKE_C_COMPILER=${{ matrix.cc }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cc }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \ .. cmake --build . --config Release diff --git a/CHOLMOD/GPU/cholmod_gpu_kernels.h b/CHOLMOD/GPU/cholmod_gpu_kernels.h index c1708273bb..be7e687998 100644 --- a/CHOLMOD/GPU/cholmod_gpu_kernels.h +++ b/CHOLMOD/GPU/cholmod_gpu_kernels.h @@ -15,13 +15,13 @@ #ifndef CHOLMODGPUKERNELS_H #define CHOLMODGPUKERNELS_H +#include "SuiteSparse_config.h" + /* make it easy for C++ programs to include CHOLMOD */ #ifdef __cplusplus extern "C" { #endif -#include "SuiteSparse_config.h" - int createMapOnDevice ( int64_t *d_Map, int64_t *d_Ls, int64_t psi, int64_t nsrow ); int createRelativeMapOnDevice ( int64_t *d_Map, int64_t *d_Ls, diff --git a/GraphBLAS/Source/omp/include/GB_atomics.h b/GraphBLAS/Source/omp/include/GB_atomics.h index 94535663fb..c59078b459 100644 --- a/GraphBLAS/Source/omp/include/GB_atomics.h +++ b/GraphBLAS/Source/omp/include/GB_atomics.h @@ -410,7 +410,7 @@ #define GB_ATOMIC_COMPARE_EXCHANGE_32(target, expected, desired) \ ( \ GB_PUN (int32_t, expected) == \ - _InterlockedCompareExchange ((int32_t volatile *) (target), \ + _InterlockedCompareExchange ((long volatile *) (target), \ GB_PUN (int32_t, desired), GB_PUN (int32_t, expected)) \ ) diff --git a/ParU/Config/ParU.h.in b/ParU/Config/ParU.h.in index 5bfd634fd7..fca3942057 100644 --- a/ParU/Config/ParU.h.in +++ b/ParU/Config/ParU.h.in @@ -620,14 +620,14 @@ ParU_Info ParU_FreeControl // The following definitions are available in both C and C++: -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct ParU_C_Symbolic_struct *ParU_C_Symbolic ; typedef struct ParU_C_Numeric_struct *ParU_C_Numeric ; typedef struct ParU_C_Control_struct *ParU_C_Control ; diff --git a/ParU/Include/ParU.h b/ParU/Include/ParU.h index 6604878fbe..856721037d 100644 --- a/ParU/Include/ParU.h +++ b/ParU/Include/ParU.h @@ -620,14 +620,14 @@ ParU_Info ParU_FreeControl // The following definitions are available in both C and C++: -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct ParU_C_Symbolic_struct *ParU_C_Symbolic ; typedef struct ParU_C_Numeric_struct *ParU_C_Numeric ; typedef struct ParU_C_Control_struct *ParU_C_Control ; diff --git a/ParU/Tcov/paru_c_test.cpp b/ParU/Tcov/paru_c_test.cpp index d6fec407be..ca3a58e541 100644 --- a/ParU/Tcov/paru_c_test.cpp +++ b/ParU/Tcov/paru_c_test.cpp @@ -45,10 +45,7 @@ } #include "paru_cov.hpp" -extern "C" -{ #include "ParU.h" -} int main(int argc, char **argv) { diff --git a/SPQR/Include/SuiteSparseQR.hpp b/SPQR/Include/SuiteSparseQR.hpp index e4c6f14368..9cd7e8bfbe 100644 --- a/SPQR/Include/SuiteSparseQR.hpp +++ b/SPQR/Include/SuiteSparseQR.hpp @@ -18,12 +18,11 @@ #include #endif #define SUITESPARSE_GPU_EXTERN_ON -extern "C" -{ - #include "SuiteSparse_config.h" - #include "cholmod.h" - #include "SuiteSparseQR_definitions.h" -} + +#include "SuiteSparse_config.h" +#include "cholmod.h" +#include "SuiteSparseQR_definitions.h" + #undef SUITESPARSE_GPU_EXTERN_ON #include