[Cmake-commits] CMake branch, master, updated. v3.10.1-743-ge44c582

Kitware Robot kwrobot at kitware.com
Tue Jan 9 16:25:09 EST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  e44c5828d368c81a1f478bf9c12ad4ff1bb87772 (commit)
       via  81868e6badbb36947a6e89b0e97f2f0526d59a67 (commit)
      from  e40541339ae8a780bc410f0ef8b22d01e594c1ba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e44c5828d368c81a1f478bf9c12ad4ff1bb87772
commit e44c5828d368c81a1f478bf9c12ad4ff1bb87772
Merge: e405413 81868e6
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Tue Jan 9 21:15:00 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jan 9 16:15:11 2018 -0500

    Merge topic 'add_cuda_to_source_regex'
    
    81868e6b CUDA: Add cu as default source file extension
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Acked-by: Brad King <brad.king at kitware.com>
    Merge-request: !1629


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81868e6badbb36947a6e89b0e97f2f0526d59a67
commit 81868e6badbb36947a6e89b0e97f2f0526d59a67
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Wed Jan 3 09:22:47 2018 -0500
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Mon Jan 8 16:16:52 2018 -0500

    CUDA: Add cu as default source file extension

diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index edce330..31c8bca 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -371,10 +371,10 @@ void cmExtraCodeBlocksGenerator::CreateNewProjectFile(
               continue;
             }
 
-            // check whether it is a C/C++ implementation file
+            // check whether it is a C/C++/CUDA implementation file
             bool isCFile = false;
             std::string lang = s->GetLanguage();
-            if (lang == "C" || lang == "CXX") {
+            if (lang == "C" || lang == "CXX" || lang == "CUDA") {
               std::string const& srcext = s->GetExtension();
               isCFile = cm->IsSourceExtension(srcext);
             }
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 383942b..4958007 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -227,10 +227,10 @@ std::string cmExtraCodeLiteGenerator::CollectSourceFiles(
       gt->GetSourceFiles(sources,
                          makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
       for (cmSourceFile* s : sources) {
-        // check whether it is a C/C++ implementation file
+        // check whether it is a C/C++/CUDA implementation file
         bool isCFile = false;
         std::string lang = s->GetLanguage();
-        if (lang == "C" || lang == "CXX") {
+        if (lang == "C" || lang == "CXX" || lang == "CUDA") {
           std::string const& srcext = s->GetExtension();
           isCFile = cm->IsSourceExtension(srcext);
         }
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a1e2f63..9fb8001 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -967,7 +967,7 @@ void cmMakefile::AddCustomCommandOldStyle(
   }
 
   // Each output must get its own copy of this rule.
-  cmsys::RegularExpression sourceFiles("\\.(C|M|c|c\\+\\+|cc|cpp|cxx|m|mm|"
+  cmsys::RegularExpression sourceFiles("\\.(C|M|c|c\\+\\+|cc|cpp|cxx|cu|m|mm|"
                                        "rc|def|r|odl|idl|hpj|bat|h|h\\+\\+|"
                                        "hm|hpp|hxx|in|txx|inl)$");
   for (std::string const& oi : outputs) {
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index c2105d2..da722ea 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -120,7 +120,8 @@ private:
 #define CM_HEADER_REGEX "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"
 
 #define CM_SOURCE_REGEX                                                       \
-  "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj"  \
+  "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|cu|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|"  \
+  "hpj"                                                                       \
   "|bat)$"
 
 #define CM_RESOURCE_REGEX "\\.(pdf|plist|png|jpeg|jpg|storyboard|xcassets)$"
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5d1f5f7..c321236 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1308,6 +1308,9 @@ cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
   if (ext == "java" || ext == ".java") {
     return cmSystemTools::JAVA_FILE_FORMAT;
   }
+  if (ext == "cu" || ext == ".cu") {
+    return cmSystemTools::CUDA_FILE_FORMAT;
+  }
   if (ext == "H" || ext == ".H" || ext == "h" || ext == ".h" || ext == "h++" ||
       ext == ".h++" || ext == "hm" || ext == ".hm" || ext == "hpp" ||
       ext == ".hpp" || ext == "hxx" || ext == ".hxx" || ext == "in" ||
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 2646df9..26696de 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -285,6 +285,7 @@ public:
     CXX_FILE_FORMAT,
     FORTRAN_FILE_FORMAT,
     JAVA_FILE_FORMAT,
+    CUDA_FILE_FORMAT,
     HEADER_FILE_FORMAT,
     RESOURCE_FILE_FORMAT,
     DEFINITION_FILE_FORMAT,
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2a5bb6c..2341dd6 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -196,6 +196,7 @@ cmake::cmake(Role role)
   this->SourceFileExtensions.push_back("cc");
   this->SourceFileExtensions.push_back("cpp");
   this->SourceFileExtensions.push_back("cxx");
+  this->SourceFileExtensions.push_back("cu");
   this->SourceFileExtensions.push_back("m");
   this->SourceFileExtensions.push_back("M");
   this->SourceFileExtensions.push_back("mm");
diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/interface_library/global-interface-stderr.txt
index 24edd0f..23b45d9 100644
--- a/Tests/RunCMake/interface_library/global-interface-stderr.txt
+++ b/Tests/RunCMake/interface_library/global-interface-stderr.txt
@@ -3,7 +3,7 @@ CMake Error at global-interface.cmake:2 \(add_library\):
 
     GLOBAL
 
-  Tried extensions \.c \.C \.c\+\+ \.cc \.cpp \.cxx \.m \.M \.mm \.h \.hh \.h\+\+ \.hm \.hpp
-  \.hxx \.in \.txx
+  Tried extensions( \.[A-Za-z+]+|
+ )*
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)

-----------------------------------------------------------------------

Summary of changes:
 Source/cmExtraCodeBlocksGenerator.cxx                        |    4 ++--
 Source/cmExtraCodeLiteGenerator.cxx                          |    4 ++--
 Source/cmMakefile.cxx                                        |    2 +-
 Source/cmSourceFile.h                                        |    3 ++-
 Source/cmSystemTools.cxx                                     |    3 +++
 Source/cmSystemTools.h                                       |    1 +
 Source/cmake.cxx                                             |    1 +
 Tests/RunCMake/interface_library/global-interface-stderr.txt |    4 ++--
 8 files changed, 14 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list