diff options
author | iphydf <iphydf@users.noreply.github.com> | 2017-01-04 21:15:48 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2017-01-05 12:34:52 +0000 |
commit | 0a61d1108547513211560e66809479cab5082ede (patch) | |
tree | 44f436d06e036283f8624d202d7abf3cfd8d7842 /cmake | |
parent | 69e1b99b1d29f6089334a8af8e7f87666fe8bb9e (diff) |
Test a few cmake option combinations before the build.
This takes a few seconds but allows us to cover cases that aren't checked
often.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ModulePackage.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake index 26c6c39a..613633ba 100644 --- a/cmake/ModulePackage.cmake +++ b/cmake/ModulePackage.cmake | |||
@@ -2,6 +2,14 @@ option(ENABLE_SHARED "Build shared (dynamic) libraries for all modules" ON) | |||
2 | option(ENABLE_STATIC "Build static libraries for all modules" ON) | 2 | option(ENABLE_STATIC "Build static libraries for all modules" ON) |
3 | option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) | 3 | option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) |
4 | 4 | ||
5 | if(NOT ENABLE_SHARED AND NOT ENABLE_STATIC) | ||
6 | message(WARNING | ||
7 | "Both static and shared libraries are disabled; " | ||
8 | "enabling only shared libraries. Use -DENABLE_SHARED or -DENABLE_STATIC to " | ||
9 | "select one manually.") | ||
10 | set(ENABLE_SHARED ON) | ||
11 | endif() | ||
12 | |||
5 | find_package(PkgConfig REQUIRED) | 13 | find_package(PkgConfig REQUIRED) |
6 | 14 | ||
7 | if(COMPILE_AS_CXX) | 15 | if(COMPILE_AS_CXX) |