Git Product home page Git Product logo

Comments (2)

compnerd avatar compnerd commented on August 23, 2024 1

These are examples, there are no references to aux_source_directory. The place to report CMake issues is https://gitlab.kitware.com/cmake/cmake

from swift-cmake-examples.

cntrump avatar cntrump commented on August 23, 2024

https://github.com/Kitware/CMake/blob/90d5d4285b544cd8d93cfa883051c66787e4d543/Source/cmAuxSourceDirectoryCommand.cxx#L55

  std::vector<std::string> files;

  // Load all the files in the directory
  cmsys::Directory dir;
  if (dir.Load(tdir)) {
    size_t numfiles = dir.GetNumberOfFiles();
    for (size_t i = 0; i < numfiles; ++i) {
      std::string file = dir.GetFile(static_cast<unsigned long>(i));
      // Split the filename into base and extension
      std::string::size_type dotpos = file.rfind('.');
      if (dotpos != std::string::npos) {
        auto ext = cm::string_view(file).substr(dotpos + 1);
        // Process only source files
        auto* cm = mf.GetCMakeInstance();
        if (dotpos > 0 && cm->IsACLikeSourceExtension(ext)) {
          std::string fullname = cmStrCat(templateDirectory, '/', file);
          // add the file as a class file so
          // depends can be done
          cmSourceFile* sf = mf.GetOrCreateSource(fullname);
          sf->SetProperty("ABSTRACT", "0");
          files.push_back(std::move(fullname));
        }
      }
    }
  }

https://github.com/Kitware/CMake/blob/90d5d4285b544cd8d93cfa883051c66787e4d543/Source/cmake.cxx#L215

    // The "c" extension MUST precede the "C" extension.
    setupExts(this->CLikeSourceFileExtensions,
              { "c", "C", "c++", "cc", "cpp", "cxx", "cu", "mpp", "m", "M",
                "mm", "ixx", "cppm" });

from swift-cmake-examples.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.