You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ze...@apache.org on 2020/12/16 03:11:24 UTC

[thrift] branch master updated: build/cmake/DefineOptions.cmake: Fixed the logic of BUILD_SHARED_LIBS

This is an automated email from the ASF dual-hosted git repository.

zeshuai007 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 1e243a7  build/cmake/DefineOptions.cmake: Fixed the logic of BUILD_SHARED_LIBS
1e243a7 is described below

commit 1e243a76b186142f551a3cb8419131a468ff54ff
Author: Mario Emmenlauer <ma...@emmenlauer.de>
AuthorDate: Wed Jun 24 10:57:00 2020 +0200

    build/cmake/DefineOptions.cmake: Fixed the logic of BUILD_SHARED_LIBS
---
 build/cmake/DefineOptions.cmake | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/build/cmake/DefineOptions.cmake b/build/cmake/DefineOptions.cmake
index 8c7a4a9..e16e564 100644
--- a/build/cmake/DefineOptions.cmake
+++ b/build/cmake/DefineOptions.cmake
@@ -132,7 +132,12 @@ CMAKE_DEPENDENT_OPTION(BUILD_HASKELL "Build GHC library" ON
 # Common library options
 # https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
 # Default on Windows is static, shared mode library support needs work...
-CMAKE_DEPENDENT_OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF "WIN32" ON)
+if(WIN32)
+    set(DEFAULT_BUILD_SHARED_LIBS ON)
+else()
+    set(DEFAULT_BUILD_SHARED_LIBS OFF)
+endif()
+option(BUILD_SHARED_LIBS "Build shared libraries" ${DEFAULT_BUILD_SHARED_LIBS})
 
 if (WITH_SHARED_LIB)
     message(WARNING "WITH_SHARED_LIB is deprecated; use -DBUILD_SHARED_LIBS=ON instead")