summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceFileLocationKind.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2018-01-09 13:40:48 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2018-01-10 16:21:11 (GMT)
commitb0716fbcc5be83ecd082e8b6d101f1137d6f16f8 (patch)
treef93425efeb3e11cb4cd2af9c771e1b5632571fa9 /Source/cmSourceFileLocationKind.h
parentddc4f9a3c05fa24240fde1ba6c0ab28b7d2e91ea (diff)
downloadCMake-b0716fbcc5be83ecd082e8b6d101f1137d6f16f8.zip
CMake-b0716fbcc5be83ecd082e8b6d101f1137d6f16f8.tar.gz
CMake-b0716fbcc5be83ecd082e8b6d101f1137d6f16f8.tar.bz2
cmSourceFileLocation: allow skipping ambiguous extensions
The ambiguous extension logic is an old behavior that ends up taking lots of extra compute cycles to execute. This is triggered by various CMake codepaths which pass extension-less paths down when CMake actually knows that they are not ambiguous. These codepaths will be indicated in upcoming changes. Various APIs have gained a cmSourceFileLocationKind parameter, but they are all optional and default to the existing behavior.
Diffstat (limited to 'Source/cmSourceFileLocationKind.h')
-rw-r--r--Source/cmSourceFileLocationKind.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmSourceFileLocationKind.h b/Source/cmSourceFileLocationKind.h
new file mode 100644
index 0000000..dd4c6dd
--- /dev/null
+++ b/Source/cmSourceFileLocationKind.h
@@ -0,0 +1,15 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+ file Copyright.txt or https://cmake.org/licensing for details. */
+#ifndef cmSourceFileLocationKind_h
+#define cmSourceFileLocationKind_h
+
+enum class cmSourceFileLocationKind
+{
+ // The location is user-specified and may be ambiguous.
+ Ambiguous,
+ // The location is known to be at the given location; do not try to guess at
+ // extensions or absolute path.
+ Known
+};
+
+#endif