Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 88FE2200B13 for ; Wed, 15 Jun 2016 21:48:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 87E17160A57; Wed, 15 Jun 2016 19:48:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8AF99160A4D for ; Wed, 15 Jun 2016 21:48:12 +0200 (CEST) Received: (qmail 20573 invoked by uid 500); 15 Jun 2016 19:48:11 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 20482 invoked by uid 99); 15 Jun 2016 19:48:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2016 19:48:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5A9E1C2325 for ; Wed, 15 Jun 2016 19:48:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id HFuXyR9f5acK for ; Wed, 15 Jun 2016 19:48:09 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id E938160D7C for ; Wed, 15 Jun 2016 19:48:05 +0000 (UTC) Received: (qmail 17402 invoked by uid 99); 15 Jun 2016 19:48:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2016 19:48:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DF86DDFDD3; Wed, 15 Jun 2016 19:48:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hakanmemisoglu@apache.org To: commits@quickstep.incubator.apache.org Date: Wed, 15 Jun 2016 19:48:34 -0000 Message-Id: In-Reply-To: <553fff50cee74dbabadaa42d540fd69e@git.apache.org> References: <553fff50cee74dbabadaa42d540fd69e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [31/50] [abbrv] incubator-quickstep git commit: Add options to build gflag as a shared library. archived-at: Wed, 15 Jun 2016 19:48:13 -0000 Add options to build gflag as a shared library. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/096abe29 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/096abe29 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/096abe29 Branch: refs/heads/decimal-type Commit: 096abe29ab8f8510b177168f9e492f59b10e49f5 Parents: 2d39b8e Author: Navneet Potti Authored: Wed Jun 8 16:59:07 2016 -0500 Committer: Zuyu Zhang Committed: Wed Jun 8 20:30:29 2016 -0700 ---------------------------------------------------------------------- CMakeLists.txt | 8 +++++++- cli/CMakeLists.txt | 8 +++++++- query_execution/CMakeLists.txt | 8 +++++++- query_optimizer/CMakeLists.txt | 8 +++++++- query_optimizer/tests/CMakeLists.txt | 10 ++++++++-- relational_operators/CMakeLists.txt | 20 +++++++++++++------- storage/CMakeLists.txt | 12 +++++++++--- transaction/CMakeLists.txt | 8 +++++++- 8 files changed, 65 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index ef7fd50..2d10a78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,6 +139,12 @@ endif() option(ENABLE_DISTRIBUTED "Use the distributed version of Quickstep" OFF) +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + # Turn on the QUICKSTEP_DEBUG flag in the source if this is a debug build. if (CMAKE_MAJOR_VERSION GREATER 2) cmake_policy(SET CMP0043 NEW) @@ -700,7 +706,7 @@ add_subdirectory(yarn) add_executable (quickstep_cli_shell cli/QuickstepCli.cpp) # Link against direct deps (will transitively pull in everything needed). target_link_libraries(quickstep_cli_shell - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog quickstep_catalog_CatalogRelation quickstep_cli_CommandExecutor http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/cli/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 8fee7a4..faf5040 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -30,6 +30,12 @@ if(LIBNUMA_FOUND) set(QUICKSTEP_HAVE_LIBNUMA TRUE) endif() +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/CliConfig.h.in" "${CMAKE_CURRENT_BINARY_DIR}/CliConfig.h" @@ -110,7 +116,7 @@ target_link_libraries(quickstep_cli_InputParserUtil ${LIBNUMA_LIBRARY}) endif() target_link_libraries(quickstep_cli_PrintToScreen - gflags_nothreads-static + ${GFLAGS_LIB_NAME} quickstep_catalog_CatalogAttribute quickstep_catalog_CatalogRelation quickstep_storage_StorageBlock http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/query_execution/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/query_execution/CMakeLists.txt b/query_execution/CMakeLists.txt index 7d9d601..8306f78 100644 --- a/query_execution/CMakeLists.txt +++ b/query_execution/CMakeLists.txt @@ -19,6 +19,12 @@ QS_PROTOBUF_GENERATE_CPP(queryexecution_QueryExecutionMessages_proto_srcs queryexecution_QueryExecutionMessages_proto_hdrs QueryExecutionMessages.proto) +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + # Declare micro-libs: if (ENABLE_DISTRIBUTED) add_library(quickstep_queryexecution_BlockLocator BlockLocator.cpp BlockLocator.hpp) @@ -202,7 +208,7 @@ if (ENABLE_DISTRIBUTED) add_executable(BlockLocator_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/BlockLocator_unittest.cpp") target_link_libraries(BlockLocator_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/query_optimizer/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/query_optimizer/CMakeLists.txt b/query_optimizer/CMakeLists.txt index 5c9438d..8f08130 100644 --- a/query_optimizer/CMakeLists.txt +++ b/query_optimizer/CMakeLists.txt @@ -24,6 +24,12 @@ configure_file ( "${CMAKE_CURRENT_BINARY_DIR}/QueryOptimizerConfig.h" ) +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + add_subdirectory(cost_model) add_subdirectory(expressions) add_subdirectory(logical) @@ -182,7 +188,7 @@ target_link_libraries(quickstep_queryoptimizer_OptimizerTree quickstep_utility_Macros quickstep_utility_TreeStringSerializable) target_link_libraries(quickstep_queryoptimizer_PhysicalGenerator - gflags_nothreads-static + ${GFLAGS_LIB_NAME} quickstep_queryoptimizer_LogicalToPhysicalMapper quickstep_queryoptimizer_logical_Logical quickstep_queryoptimizer_physical_Physical http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/query_optimizer/tests/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/query_optimizer/tests/CMakeLists.txt b/query_optimizer/tests/CMakeLists.txt index 07af404..6ef2a03 100644 --- a/query_optimizer/tests/CMakeLists.txt +++ b/query_optimizer/tests/CMakeLists.txt @@ -18,6 +18,12 @@ add_subdirectory(logical_generator) add_subdirectory(physical_generator) add_subdirectory(resolver) +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + add_library(quickstep_queryoptimizer_tests_OptimizerTest OptimizerTest.cpp OptimizerTest.hpp) add_library(quickstep_queryoptimizer_tests_TestDatabaseLoader TestDatabaseLoader.cpp TestDatabaseLoader.hpp) @@ -102,7 +108,7 @@ add_executable(quickstep_queryoptimizer_tests_OptimizerTextTest "${PROJECT_SOURCE_DIR}/utility/textbased_test/TextBasedTest.hpp") target_link_libraries(quickstep_queryoptimizer_tests_ExecutionGeneratorTest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogDatabase @@ -132,7 +138,7 @@ target_link_libraries(quickstep_queryoptimizer_tests_ExecutionGeneratorTest tmb ${LIBS}) target_link_libraries(quickstep_queryoptimizer_tests_OptimizerTextTest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest gtest_main http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/relational_operators/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/relational_operators/CMakeLists.txt b/relational_operators/CMakeLists.txt index eec5300..d2693eb 100644 --- a/relational_operators/CMakeLists.txt +++ b/relational_operators/CMakeLists.txt @@ -23,6 +23,12 @@ QS_PROTOBUF_GENERATE_CPP(relationaloperators_WorkOrder_proto_srcs relationaloperators_WorkOrder_proto_hdrs WorkOrder.proto) +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + # Declare micro-libs: add_library(quickstep_relationaloperators_AggregationOperator AggregationOperator.cpp AggregationOperator.hpp) add_library(quickstep_relationaloperators_BuildHashOperator BuildHashOperator.cpp BuildHashOperator.hpp) @@ -160,7 +166,7 @@ target_link_libraries(quickstep_relationaloperators_FinalizeAggregationOperator quickstep_utility_Macros tmb) target_link_libraries(quickstep_relationaloperators_HashJoinOperator - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog quickstep_catalog_CatalogRelation quickstep_catalog_CatalogRelationSchema @@ -350,7 +356,7 @@ target_link_libraries(quickstep_relationaloperators_TableGeneratorOperator quickstep_utility_Macros tmb) target_link_libraries(quickstep_relationaloperators_TextScanOperator - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog quickstep_catalog_CatalogAttribute quickstep_catalog_CatalogRelation @@ -470,7 +476,7 @@ target_link_libraries(quickstep_relationaloperators add_executable(AggregationOperator_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/AggregationOperator_unittest.cpp") target_link_libraries(AggregationOperator_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute @@ -523,7 +529,7 @@ add_test(AggregationOperator_unittest AggregationOperator_unittest) add_executable(HashJoinOperator_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/HashJoinOperator_unittest.cpp") target_link_libraries(HashJoinOperator_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute @@ -573,7 +579,7 @@ add_test(HashJoinOperator_unittest HashJoinOperator_unittest) add_executable(SortMergeRunOperator_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/SortMergeRunOperator_unittest.cpp") target_link_libraries(SortMergeRunOperator_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute @@ -624,7 +630,7 @@ add_test(SortMergeRunOperator_unittest SortMergeRunOperator_unittest) add_executable(SortRunGenerationOperator_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/SortRunGenerationOperator_unittest.cpp") target_link_libraries(SortRunGenerationOperator_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute @@ -672,7 +678,7 @@ add_test(SortRunGenerationOperator_unittest SortRunGenerationOperator_unittest) add_executable(TextScanOperator_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/TextScanOperator_unittest.cpp") target_link_libraries(TextScanOperator_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/storage/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index a77976a..b536411 100644 --- a/storage/CMakeLists.txt +++ b/storage/CMakeLists.txt @@ -21,6 +21,12 @@ if (REBUILD_INDEX_ON_UPDATE_OVERFLOW) set(QUICKSTEP_REBUILD_INDEX_ON_UPDATE_OVERFLOW TRUE) endif() +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + include(CheckIncludeFileCXX) check_include_files("fcntl.h;glob.h;unistd.h;sys/stat.h;sys/types.h" QUICKSTEP_HAVE_FILE_MANAGER_POSIX) if (NOT QUICKSTEP_HAVE_FILE_MANAGER_POSIX) @@ -617,7 +623,7 @@ target_link_libraries(quickstep_storage_FileManager if (QUICKSTEP_HAVE_FILE_MANAGER_HDFS) target_link_libraries(quickstep_storage_FileManagerHdfs glog - gflags_nothreads-static + ${GFLAGS_LIB_NAME} quickstep_storage_FileManager quickstep_storage_StorageBlockInfo quickstep_storage_StorageConstants @@ -950,7 +956,7 @@ target_link_libraries(quickstep_storage_StorageBlockLayout target_link_libraries(quickstep_storage_StorageBlockLayout_proto ${PROTOBUF_LIBRARY}) target_link_libraries(quickstep_storage_StorageManager - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogTypedefs @@ -1380,7 +1386,7 @@ if (ENABLE_DISTRIBUTED) add_executable(DataExchange_unittest "${CMAKE_CURRENT_SOURCE_DIR}/tests/DataExchange_unittest.cpp") target_link_libraries(DataExchange_unittest - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog gtest quickstep_catalog_CatalogAttribute http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/096abe29/transaction/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/transaction/CMakeLists.txt b/transaction/CMakeLists.txt index c6c87b6..430b4bc 100644 --- a/transaction/CMakeLists.txt +++ b/transaction/CMakeLists.txt @@ -13,6 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +if (BUILD_SHARED_LIBS) + set(GFLAGS_LIB_NAME gflags_nothreads-shared) +else() + set(GFLAGS_LIB_NAME gflags_nothreads-static) +endif() + add_library(quickstep_transaction_AccessMode AccessMode.cpp AccessMode.hpp) @@ -68,7 +74,7 @@ target_link_libraries(quickstep_transaction_Lock quickstep_transaction_AccessMode quickstep_transaction_ResourceId) target_link_libraries(quickstep_transaction_LockManager - gflags_nothreads-static + ${GFLAGS_LIB_NAME} glog quickstep_utility_ThreadSafeQueue quickstep_threading_Thread