From 0230af4b5ab78b1fbaededcc42562f6b574c820f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 14 Jan 2022 16:17:20 +0100 Subject: Add lang.c and lang.cpp to tests --- TODO | 1 + include/Conf.hpp | 2 +- src/Conf.cpp | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index b34786d..a34a75c 100644 --- a/TODO +++ b/TODO @@ -1,2 +1,3 @@ [dependencies] should automatically download dependency from vcpkg if available. This is useful for windows. Static libraries with dependencies should propagate their dependencies upwards to the first non-static library. +If a dependency uses a c/c++ version newer than our project then give a compile error, or automatically upgrade our package version to the max version of the dependencies (and our project version). \ No newline at end of file diff --git a/include/Conf.hpp b/include/Conf.hpp index 574cf94..cbb21ca 100644 --- a/include/Conf.hpp +++ b/include/Conf.hpp @@ -446,9 +446,9 @@ namespace sibs virtual void finished() override; void failInvalidFieldUnderObject(const StringView &fieldName) const; void validatePackageTypeDefined() const; - private: void parseCLang(const StringView &fieldName, const ConfigValue &fieldValue); void parseCppLang(const StringView &fieldName, const ConfigValue &fieldValue); + private: void parsePlatformConfig(const StringView &fieldName, const ConfigValue &fieldValue); std::string parsePlatformConfigStatic(const StringView &fieldName, const ConfigValue &fieldValue); void parsePlatformConfigStaticDebug(const StringView &fieldName, const ConfigValue &fieldValue); diff --git a/src/Conf.cpp b/src/Conf.cpp index c2302e4..964b9db 100644 --- a/src/Conf.cpp +++ b/src/Conf.cpp @@ -1433,6 +1433,14 @@ namespace sibs { parseDependencies(name, value); } + else if(currentObject.equals("lang.c")) + { + parseCLang(name, value); + } + else if(currentObject.equals("lang.cpp")) + { + parseCppLang(name, value); + } else { string errMsg = "project.conf: Expected category to be 'dependencies', was: '"; -- cgit v1.2.3