From 91ab79f1475371e6e57d00f24f98bccb7749d15a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 14 Jan 2018 18:36:20 +0100 Subject: Add git dependencies --- src/main.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index a2e6565..dcc38d1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -59,6 +59,20 @@ using namespace std::chrono; // TODO: Make dependency/project names case insensitive. This means we can't use pkgconfig +// TODO: Fail build if dependency requires newer language version than dependant package. +// To make it work properly, should language version be required in project.conf? + +// TODO: Remove duplicate compiler options (include flags, linker flags etc...) to improve compilation speed. +// The compiler ignores duplicate symbols but it's faster to just remove duplicate options because we only have +// to compare strings. Duplicate options can happen if for example a project has two dependencies and both dependencies +// have dependency on the same package (would be common for example with boost libraries or libraries that dpepend on boost) + +// TODO: Create symlink to dependencies, for example if we have dependency on xxhash which has xxhash.h in its root directory, +// then you should be able to include it from dependant project by typing #include "xxhash/xxhash.h" +// that means we create a symlink with the dependency name to the dependency version directory. +// This will make it easier to prevent clashes in header file names and it's easier to see from the include statement +// what exactly we are including + #if OS_FAMILY == OS_FAMILY_POSIX #define ferr std::cerr #else @@ -503,7 +517,8 @@ int newProject(int argc, const _tinydir_char_t **argv) newProjectCreateConf(projectName, projectTypeConf, projectPath); createProjectSubDir(projectPath + TINYDIR_STRING("/src")); createProjectSubDir(projectPath + TINYDIR_STRING("/include")); - createProjectFile(projectPath + TINYDIR_STRING("/src/main.cpp"), "#include \n\nint main()\n{\n printf(\"hello, world!\\n\");\n return 0;\n}\n"); + createProjectSubDir(projectPath + TINYDIR_STRING("/tests")); + createProjectFile(projectPath + TINYDIR_STRING("/src/main.cpp"), "#include \n\nint main(int argc, char **argv)\n{\n printf(\"hello, world!\\n\");\n return 0;\n}\n"); // We are ignoring git init result on purpose. If it fails, just ignore it; not important gitInitProject(projectPath); return 0; -- cgit v1.2.3