From 742175c456228b0612724855472d137b260002cd Mon Sep 17 00:00:00 2001 From: Alessandro Gario Date: Fri, 9 Aug 2019 22:29:24 +0200 Subject: [PATCH] CMake: Remove the gflags, glog formula --- third-party-formula/gflags/BUCK | 49 --------------------- third-party-formula/gflags/CMakeLists.txt | 49 --------------------- third-party-formula/gflags/osquery.library | 12 ------ third-party-formula/glibc/BUCK | 50 ---------------------- third-party-formula/glibc/CMakeLists.txt | 37 ---------------- third-party-formula/glog/BUCK | 47 -------------------- third-party-formula/glog/CMakeLists.txt | 44 ------------------- third-party-formula/glog/osquery.library | 13 ------ 8 files changed, 301 deletions(-) delete mode 100644 third-party-formula/gflags/BUCK delete mode 100644 third-party-formula/gflags/CMakeLists.txt delete mode 100644 third-party-formula/gflags/osquery.library delete mode 100644 third-party-formula/glibc/BUCK delete mode 100644 third-party-formula/glibc/CMakeLists.txt delete mode 100644 third-party-formula/glog/BUCK delete mode 100644 third-party-formula/glog/CMakeLists.txt delete mode 100644 third-party-formula/glog/osquery.library diff --git a/third-party-formula/gflags/BUCK b/third-party-formula/gflags/BUCK deleted file mode 100644 index a439feb0789..00000000000 --- a/third-party-formula/gflags/BUCK +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "gflags", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "5e0813ea29d5ba739c089ae21dccf5b7d4ec6f7a7d9550da0834476fade2b60c", - "macos-x86_64": "217fd2573443981bc8e521fcf4d8201ba4d3c29cace1b9a537f94be08df7ebb6", - "windows-x86_64": "a7bb0676d7ac0338cfa71f48f5e0d83332470e1fcd0223aa697f1a0fd2e0789a", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libgflags.a", - "lib/libgflags_nothreads.a", - ], - "macos-x86_64": [ - "lib/libgflags.a", - "lib/libgflags_nothreads.a", - ], - "windows-x86_64": [ - "lib/gflags_static.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - - ], - version = "2.2.1", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party-formula/gflags/CMakeLists.txt b/third-party-formula/gflags/CMakeLists.txt deleted file mode 100644 index c572f2ba124..00000000000 --- a/third-party-formula/gflags/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -function(gflagsMain) - set(name "gflags") - - set(anchor_file "lib/libgflags.a") - - set(additional_library - lib/libgflags_nothreads.a - ) - - if(DEFINED PLATFORM_WINDOWS) - set(anchor_file "lib/gflags_static.lib") - set(additional_library "") - endif() - - importThirdPartyBinaryLibrary("${name}" "${anchor_file}" ${additional_library}) - - if(DEFINED PLATFORM_WINDOWS) - set(configure_options - -DCMAKE_CXX_FLAGS_RELEASE:STRING=/MT\ /O2\ /Ob2\ /DNDEBUG - ) - endif() - - definePrebuiltProject(${name} - URL https://github.com/gflags/gflags/archive/v2.2.1.tar.gz - SHA256 ae27cdbcd6a2f935baa78e4f21f675649271634c092b1be01469440495609d0e - CONFIGURE - cmake - -DCMAKE_INSTALL_PREFIX= - -DBUILD_SHARED_LIBS=OFF - -DGFLAGS_BUILD_STATIC_LIBS=ON - -DGFLAGS_BUILD_SHARED_LIBS=OFF - -DGFLAGS_BUILD_gflags_LIB=ON - -DGFLAGS_INSTALL_STATIC_LIBS=ON - ${configure_options} - - BUILD - cmake --build . --config Release - INSTALL - cmake --build . --config Release --target install - ) -endfunction() - -gflagsMain() diff --git a/third-party-formula/gflags/osquery.library b/third-party-formula/gflags/osquery.library deleted file mode 100644 index 296abc5a8f9..00000000000 --- a/third-party-formula/gflags/osquery.library +++ /dev/null @@ -1,12 +0,0 @@ -library( - name = "gflags", - version = "2.2.1", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - ], -) diff --git a/third-party-formula/glibc/BUCK b/third-party-formula/glibc/BUCK deleted file mode 100644 index 7e6fc8af409..00000000000 --- a/third-party-formula/glibc/BUCK +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:platforms.bzl", "LINUX", "MACOSX", "POSIX") - -osquery_cxx_library( - name = "dl", - exported_platform_linker_flags = [ - ( - POSIX, - [ - "-ldl", - ], - ), - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "pthread", - exported_platform_linker_flags = [ - ( - LINUX, - ["-pthread"], - ), - ], - visibility = ["PUBLIC"], -) - -osquery_cxx_library( - name = "resolv", - exported_platform_linker_flags = [ - ( - LINUX, - ["-lresolv"], - ), - ( - MACOSX, - ["-lresolv"], - ), - ], - external = True, - visibility = ["PUBLIC"], -) diff --git a/third-party-formula/glibc/CMakeLists.txt b/third-party-formula/glibc/CMakeLists.txt deleted file mode 100644 index dbcd6a80f53..00000000000 --- a/third-party-formula/glibc/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -function(glibcMain) - generateGlibcDl() - generateGlibcResolv() - generateGlibcPthread() -endfunction() - -function(generateGlibcDl) - add_library(thirdparty_glibc_dl INTERFACE) - - if(DEFINED PLATFORM_POSIX) - target_link_options(thirdparty_glibc_dl INTERFACE -ldl) - endif() -endfunction() - -function(generateGlibcResolv) - add_library(thirdparty_glibc_resolv INTERFACE) - - if(DEFINED PLATFORM_LINUX OR DEFINED PLATFORM_MACOS) - target_link_options(thirdparty_glibc_resolv INTERFACE -lresolv) - endif() -endfunction() - -function(generateGlibcPthread) - add_library(thirdparty_glibc_pthread INTERFACE) - - if(DEFINED PLATFORM_LINUX) - target_link_options(thirdparty_glibc_pthread INTERFACE -pthread) - endif() -endfunction() - -glibcMain() diff --git a/third-party-formula/glog/BUCK b/third-party-formula/glog/BUCK deleted file mode 100644 index 61c097530f2..00000000000 --- a/third-party-formula/glog/BUCK +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under both the Apache 2.0 license (found in the -# LICENSE file in the root directory of this source tree) and the GPLv2 (found -# in the COPYING file in the root directory of this source tree). -# You may select, at your option, one of the above-listed licenses. - -# @generated - -load("//tools/build_defs/oss/osquery:cxx.bzl", "osquery_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_prebuilt_cxx_library") -load("//tools/build_defs/oss/osquery:third_party.bzl", "osquery_tp_target") - -osquery_tp_prebuilt_cxx_library( - name = "glog", - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - sha256sums = { - "linux-x86_64": "1291104355f4373f22294d86eeb2e612d03ea1adbf7cbaef2083ca730e9df60c", - "macos-x86_64": "91ccd947175a029da61447cc2f871798dc3756bc3adfc178cc782e4714e5a712", - "windows-x86_64": "7c25024502db7e5ffaa0d7e851450946b9193fb093b815692763b619b4d55723", - }, - platform_static_libs = { - "linux-x86_64": [ - "lib/libglog.a", - ], - "macos-x86_64": [ - "lib/libglog.a", - ], - "windows-x86_64": [ - "lib/glog.lib", - ], - }, - linker_flags = [ - - ], - deps = [ - osquery_tp_target("gflags", "gflags"), - ], - version = "0.3.5", - build = "0", - visibility = ["PUBLIC"], -) diff --git a/third-party-formula/glog/CMakeLists.txt b/third-party-formula/glog/CMakeLists.txt deleted file mode 100644 index 11e878c5c51..00000000000 --- a/third-party-formula/glog/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2014-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed in accordance with the terms specified in -# the LICENSE file found in the root directory of this source tree. - -function(glogMain) - set(name "glog") - set(anchor_file "lib/libglog.a") - - if(DEFINED PLATFORM_WINDOWS) - set(anchor_file "lib/glog.lib") - endif() - - importThirdPartyBinaryLibrary("${name}" "${anchor_file}") - - target_link_libraries("thirdparty_${name}" INTERFACE thirdparty_gflags) - - if(DEFINED PLATFORM_WINDOWS) - set(configure_options - -DCMAKE_CXX_FLAGS_RELEASE:STRING=/MT\ /O2\ /Ob2\ /DNDEBUG - ) - endif() - - set(dependencies gflags) - definePrebuiltProject(${name} - URL https://github.com/google/glog/archive/v0.3.5.tar.gz - SHA256 7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0 - DEPENDS ${dependencies} - CONFIGURE - cmake - -DCMAKE_INSTALL_PREFIX= - -DBUILD_SHARED_LIBS=OFF - -DBUILD_TESTING=OFF - ${configure_options} - - BUILD - cmake --build . --config Release - INSTALL - cmake --build . --config Release --target install - ) -endfunction() - -glogMain() diff --git a/third-party-formula/glog/osquery.library b/third-party-formula/glog/osquery.library deleted file mode 100644 index be80dadf6bc..00000000000 --- a/third-party-formula/glog/osquery.library +++ /dev/null @@ -1,13 +0,0 @@ -library( - name = "glog", - version = "0.3.5", - build = 0, - platforms = [ - "linux-x86_64", - "macos-x86_64", - "windows-x86_64", - ], - deps = [ - "gflags:gflags", - ], -)