From d38c2c74df5e29cb2aed566130f532d859c1e73c Mon Sep 17 00:00:00 2001 From: Hyo-Kyung Lee Date: Tue, 29 Oct 2024 14:49:18 -0500 Subject: [PATCH] Enable threads for Windows --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d10f0402d5f..f5574059c76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,4 @@ cmake_minimum_required (VERSION 3.18) -# set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) -set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) project (HDF5 C) if (POLICY CMP0074) @@ -560,6 +558,14 @@ endif () set (CMAKE_POSITION_INDEPENDENT_CODE ON) +#----------------------------------------------------------------------------- +# perl is used in some optional src and tests, check availability +find_package (Perl) +if (PERL_FOUND) + set (H5_PERL_FOUND YES) +endif () +#----------------------------------------------------------------------------- + #----------------------------------------------------------------------------- # Option to Build Static executables #----------------------------------------------------------------------------- @@ -797,7 +803,7 @@ if (Threads_FOUND) # Comment out check for C11 threads for now, since it conflicts with the # current --std=c99 compile flags at configuration time. When we switch to # --std=c11, this can be uncommented. - #CHECK_INCLUDE_FILE("threads.h" HAVE_THREADS_H) + CHECK_INCLUDE_FILE("threads.h" HAVE_THREADS_H) if (WIN32) # When Win32 is available, we use those threads set (H5_HAVE_WIN_THREADS 1)