aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-14 18:36:20 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-26 09:13:15 +0100
commit91ab79f1475371e6e57d00f24f98bccb7749d15a (patch)
tree40fa847c783ecdc165ad1fc6b7c5cd2a026d25b9 /src/main.cpp
parentb7b7b3d359765e3ffb011dc34ff928e614766666 (diff)
Add git dependencies
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 16 insertions, 1 deletions
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 <cstdio>\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 <cstdio>\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;