project.h 727 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. // Because Apple refuses to update libc++ in a timely manner
  3. // In exchange, this in C++11 compatible...
  4. #include <string>
  5. #include <utility>
  6. #include <vector>
  7. #include "command_builder.h"
  8. #include "types.h"
  9. #define CXX "clang++"
  10. namespace build {
  11. class project {
  12. private:
  13. version vers_{version::none};
  14. std::string name_;
  15. std::vector<source_file> source_files_;
  16. public:
  17. project(int argc, char const * const * const argv);
  18. project & set_version(version vers);
  19. project & set_name(std::string const & name);
  20. project & add_source_file(fs::path const & file);
  21. int generate() const;
  22. private:
  23. std::pair<std::vector<object_file>, int> generate_objects() const;
  24. };
  25. }