summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2023-10-10 14:18:00 (GMT)
committerGitHub <noreply@github.com>2023-10-10 14:18:00 (GMT)
commit0ffde9da19c4cef79824fafba87e347f25f01606 (patch)
treef766c506b31c994dcff1b24ec52536535189e002 /CMakeLists.txt
parente4cea3509a09eda7bac73962e96e3eb96b310c49 (diff)
downloadhdf5-0ffde9da19c4cef79824fafba87e347f25f01606.zip
hdf5-0ffde9da19c4cef79824fafba87e347f25f01606.tar.gz
hdf5-0ffde9da19c4cef79824fafba87e347f25f01606.tar.bz2
Fixes GH#1027 compilation error (#3654)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c466487..6aa467d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -451,6 +451,12 @@ include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake)
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
#-----------------------------------------------------------------------------
+# Include directories in the source or build tree should come before other
+# directories to prioritize headers in the sources over installed ones.
+#-----------------------------------------------------------------------------
+set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+
+#-----------------------------------------------------------------------------
# Mac OS X Options
#-----------------------------------------------------------------------------
if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)