aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Conf.cpp26
-rw-r--r--src/main.cpp3
2 files changed, 29 insertions, 0 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index 3b0e246..1697d9f 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -864,6 +864,32 @@ namespace sibs
if(platforms.empty())
throw ParserException("Missing required config package.platforms. If the package supports all platforms, add:\nplatforms = [\"any\"]\nto project.conf under [package]");
+
+ if(useCmake)
+ {
+ switch(getPackageType())
+ {
+ case PackageType::EXECUTABLE:
+ {
+ if(!getCmakeDir().empty())
+ throw ParserException("Missing required config cmake.dir");
+ break;
+ }
+ case PackageType::STATIC:
+ {
+ if(!getCmakeDirStatic().empty())
+ throw ParserException("Missing required config cmake.static");
+ break;
+ }
+ case PackageType::DYNAMIC:
+ case PackageType::LIBRARY:
+ {
+ if(!getCmakeDirDynamic().empty())
+ throw ParserException("Missing required config cmake.dynamic");
+ break;
+ }
+ }
+ }
}
void SibsConfig::validatePackageName() const
diff --git a/src/main.cpp b/src/main.cpp
index 1297456..e2df0fe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -40,6 +40,9 @@ using namespace std::chrono;
// Might need to make it possible to define variables if a dependency exists (or doesn't exist) because the code might have
// preprocessor like: USE_LIBSODIUM or NO_LIBSODIUM.
+// TODO: Set c++ standard to c++11 and c standard to c98 - for consistency across different compilers and compiler version.
+// It should be possible to override language version in project.conf
+
#if OS_FAMILY == OS_FAMILY_POSIX
#define ferr std::cerr
#else