1
2
3
4
5
6 #ifndef CMAJOR_BUILD_BUILD_INCLUDED
7 #define CMAJOR_BUILD_BUILD_INCLUDED
8 #include <cmajor/build/BuildApi.hpp>
9 #include <cmajor/build/MessageBody.hpp>
10 #include <cmajor/symbols/Module.hpp>
11 #include <sngcm/ast/Project.hpp>
12 #include <soulng/util/LogFileWriter.hpp>
13 #include <set>
14
15 namespace cmajor { namespace build {
16
17 using namespace sngcm::ast;
18 using namespace cmajor::symbols;
19 using namespace soulng::util;
20
21 void BuildProject(const std::string& projectFilePath, std::std::unique_ptr<Module>&rootModule, std::std::set<std::string>&builtProjects);
22 void BuildProject(Project* project, std::std::unique_ptr<Module>&rootModule, bool&stop, boolresetRootModule, std::std::set<std::string>&builtProjects);
23 void BuildSolution(const std::string& solutionFilePath, std::std::vector<std::std::unique_ptr<Module>>&rootModules);
24 void BuildSolution(const std::string& solutionFilePath, std::std::vector<std::std::unique_ptr<Module>>&rootModules, std::u32string&solutionName, std::std::vector<std::u32string>&moduleNames);
25 void BuildMsBuildProject(const std::string& projectName, const std::string& projectDirectory, const std::string& target,
26 const std::std::vector<std::string>&sourceFiles, conststd::std::vector<std::string>&resourceFiles, conststd::std::vector<std::string>&referenceFiles,
27 std::std::unique_ptr<Module>&rootModule);
28 void GenerateLibrary(Module* module, const std::std::vector<std::string>&objectFilePaths, conststd::string&libraryFilePath);
29 void Link(Target target, conststd::string& executableFilePath, const std::string& libraryFilePath, const std::std::vector<std::string>&libraryFilePaths,
30 const std::string& mainObjectFilePath, cmajor::symbols::Module& module);
31 void StopBuild();
32 void ResetStopBuild();
33 std::unique_ptr<Project> ReadProject(const std::string& projectFilePath);
34 ProjectInfo ReadPojectInfo(Project* project, const std::string& projectInfoFilePath);
35 bool SolutionContainsSystemModule(const std::string& solutionFilePath);
36 void SetBuildLogWriter(LogFileWriter* buildLogWriter_);
37
38 } }
39
40 #endif // CMAJOR_BUILD_BUILD_INCLUDED