aboutsummaryrefslogtreecommitdiff
path: root/src/Conf.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-03 20:57:16 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-03 20:58:01 +0100
commit469a67628f3eb18236ee44e948d1ae0f0e6b1a4a (patch)
tree438b19627e5d3ea1ab6324e1a3275c34800079bd /src/Conf.cpp
parentadd60913a0ff5cd13be18ed594eab6102e78640c (diff)
Validate cmake.dir is provided in conf
Diffstat (limited to 'src/Conf.cpp')
-rw-r--r--src/Conf.cpp26
1 files changed, 26 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