summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2017-01-04 21:15:48 +0000
committeriphydf <iphydf@users.noreply.github.com>2017-01-05 12:34:52 +0000
commit0a61d1108547513211560e66809479cab5082ede (patch)
tree44f436d06e036283f8624d202d7abf3cfd8d7842 /cmake
parent69e1b99b1d29f6089334a8af8e7f87666fe8bb9e (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.cmake8
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)
2option(ENABLE_STATIC "Build static libraries for all modules" ON) 2option(ENABLE_STATIC "Build static libraries for all modules" ON)
3option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) 3option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF)
4 4
5if(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)
11endif()
12
5find_package(PkgConfig REQUIRED) 13find_package(PkgConfig REQUIRED)
6 14
7if(COMPILE_AS_CXX) 15if(COMPILE_AS_CXX)