diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Conf.hpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/include/Conf.hpp b/include/Conf.hpp index 950b25a..3dd409d 100644 --- a/include/Conf.hpp +++ b/include/Conf.hpp @@ -110,6 +110,20 @@ namespace sibs PLATFORM_WIN64 }; + enum class CVersion + { + C89, // aka ansi + C99, + C11 + }; + + enum class CPPVersion + { + CPP11, + CPP14, + CPP17 + }; + const StringView CONFIGS[] = { "config.win32", "config.win32.static.debug", @@ -180,7 +194,9 @@ namespace sibs optimizationLevel(_optimizationLevel), finishedProcessing(false), useCmake(false), - buildTests(_buildTests) + buildTests(_buildTests), + cVersion(CVersion::C11), + cppVersion(CPPVersion::CPP11) { cmakeDirGlobal = projectPath; cmakeDirStatic = cmakeDirGlobal; @@ -313,6 +329,16 @@ namespace sibs return result; } + CVersion getCversion() const + { + return cVersion; + } + + CPPVersion getCppVersion() const + { + return cppVersion; + } + bool shouldUseCmake() const { return useCmake; @@ -342,6 +368,8 @@ namespace sibs 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); void parsePlatformConfigs(const StringView &fieldName, const ConfigValue &fieldValue); void parsePlatformConfig(const StringView &fieldName, const ConfigValue &fieldValue); void parsePlatformConfigStaticDebug(const StringView &fieldName, const ConfigValue &fieldValue); @@ -370,6 +398,8 @@ namespace sibs std::string cmakeArgsGlobal; std::string cmakeArgsStatic; std::string cmakeArgsDynamic; + CVersion cVersion; + CPPVersion cppVersion; bool useCmake; bool buildTests; bool finishedProcessing; |