mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
Treat '.ccm', '.cxxm', and '.c++m' files as C++ sources
These extensions are used by convention for C++ module interface units with Clang. For now, do not add any tests using these extensions. Very few compilers recognize them as C++ sources. Tests can be added later as part of C++ modules support.
This commit is contained in:
@@ -1229,7 +1229,7 @@ void cmMakefile::AddCustomCommandOldStyle(
|
||||
|
||||
// Each output must get its own copy of this rule.
|
||||
cmsys::RegularExpression sourceFiles(
|
||||
"\\.(C|M|c|c\\+\\+|cc|cpp|cxx|mpp|ixx|cppm|cu|m|mm|"
|
||||
"\\.(C|M|c|c\\+\\+|cc|cpp|cxx|mpp|ixx|cppm|ccm|cxxm|c\\+\\+m|cu|m|mm|"
|
||||
"rc|def|r|odl|idl|hpj|bat|h|h\\+\\+|"
|
||||
"hm|hpp|hxx|in|txx|inl)$");
|
||||
|
||||
|
||||
@@ -183,8 +183,8 @@ private:
|
||||
#define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"
|
||||
|
||||
#define CM_SOURCE_REGEX \
|
||||
"\\.(C|F|M|c|c\\+\\+|cc|cpp|mpp|cxx|ixx|cppm|cu|f|f90|for|fpp|ftn|m|mm|" \
|
||||
"rc|def|r|odl|idl|hpj|bat)$"
|
||||
"\\.(C|F|M|c|c\\+\\+|cc|cpp|mpp|cxx|ixx|cppm|ccm|cxxm|c\\+\\+m|cu" \
|
||||
"|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$"
|
||||
|
||||
#define CM_PCH_REGEX "cmake_pch(_[^.]+)?\\.(h|hxx)$"
|
||||
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ cmake::cmake(Role role, cmState::Mode mode, cmState::ProjectKind projectKind)
|
||||
// The "c" extension MUST precede the "C" extension.
|
||||
setupExts(this->CLikeSourceFileExtensions,
|
||||
{ "c", "C", "c++", "cc", "cpp", "cxx", "cu", "mpp", "m", "M",
|
||||
"mm", "ixx", "cppm" });
|
||||
"mm", "ixx", "cppm", "ccm", "cxxm", "c++m" });
|
||||
setupExts(this->HeaderFileExtensions,
|
||||
{ "h", "hh", "h++", "hm", "hpp", "hxx", "in", "txx" });
|
||||
setupExts(this->CudaFileExtensions, { "cu" });
|
||||
|
||||
Reference in New Issue
Block a user