summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.h')
-rw-r--r--Source/cmFindPackageCommand.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index d8c7ab3..48f17ef 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -7,6 +7,7 @@
#include "cm_kwiml.h"
#include <cstddef>
+#include <functional>
#include <map>
#include <set>
#include <string>
@@ -15,14 +16,12 @@
// IWYU insists we should forward-declare instead of including <functional>,
// but we cannot forward-declare reliably because some C++ standard libraries
// put the template in an inline namespace.
-#ifdef CMAKE_IWYU
+#ifdef CMAKE_IWYU_FORWARD_STD_HASH
/* clang-format off */
namespace std {
template <class T> struct hash;
}
/* clang-format on */
-#else
-# include <functional>
#endif
#include "cmFindCommon.h"