diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2015-04-05 22:52:07 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2015-04-05 23:37:23 -0700 |
commit | a5f7ffb3b6e04304930a22d1a86f89c9fbf713d9 (patch) | |
tree | 71da7e91d0b93ba3e6c2c5c7e11f158d4fbc0bc4 /CMakeLists.txt | |
parent | 133dffeec9b991c18b7c5e38cba112c8a9b6ed34 (diff) | |
download | rabbitmq-c-a5f7ffb3b6e04304930a22d1a86f89c9fbf713d9.tar.gz |
Make tests only link against static rabbitmq
This gets around issues with symbol visibility issues while testing functions
that are not declared to be visibile outside the library.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c067284..bef5262 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -224,7 +224,7 @@ endif() find_package(Threads) option(BUILD_SHARED_LIBS "Build rabbitmq-c as a shared library" ON) -option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" OFF) +option(BUILD_STATIC_LIBS "Build rabbitmq-c as a static library" ON) option(BUILD_EXAMPLES "Build Examples" ON) option(BUILD_TOOLS "Build Tools (requires POPT Library)" ${POPT_FOUND}) @@ -278,6 +278,11 @@ if (BUILD_TOOLS) endif () if (BUILD_TESTS) + if (NOT BUILD_STATIC_LIBS) + message(FATAL_ERROR + "Tests can only be built against static libraries " + "(set BUILD_STATIC_LIBS=ON)") + endif () enable_testing() add_subdirectory(tests) endif (BUILD_TESTS) |