From 43215e69ce4f095ff88157465a1c14d4e11e38a6 Mon Sep 17 00:00:00 2001 From: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Sun, 20 Oct 2024 12:47:38 -0700 Subject: [PATCH] Always check for __attribute__() in CMake (#4980) The CMake compiler checks skip checking for things like __attribute__() on Windows. Now that Visual Studio can use clang, we should be checking for this, even on non-MinGW Windows. --- config/cmake/ConfigureChecks.cmake | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index e0b02618658..5f8f7514b0a 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -437,16 +437,14 @@ endif () #----------------------------------------------------------------------------- # Check a bunch of other functions #----------------------------------------------------------------------------- -if (MINGW OR NOT WINDOWS) - foreach (other_test - HAVE_ATTRIBUTE - HAVE_BUILTIN_EXPECT - PTHREAD_BARRIER - HAVE_SOCKLEN_T +foreach (other_test + HAVE_ATTRIBUTE + HAVE_BUILTIN_EXPECT + PTHREAD_BARRIER + HAVE_SOCKLEN_T ) - HDF_FUNCTION_TEST (${other_test}) - endforeach () -endif () + HDF_FUNCTION_TEST (${other_test}) +endforeach () # ---------------------------------------------------------------------- # Set the flag to indicate that the machine can handle converting