about summary refs log tree commit diff
path: root/third_party/glog/toolchains
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-27T00·26+0100
committerVincent Ambo <tazjin@google.com>2020-05-27T00·26+0100
commit6941048b7e55ec85ec257c4f597e7f0d54e1584d (patch)
tree35b90141e36142f5ebb5910fc0b08e0018e4486a /third_party/glog/toolchains
parent7dc094173b641c78a449395cc6f28a5e52b6fe64 (diff)
parentafe04691aca3f669f517adaeb5bd4a87a481fb4a (diff)
merge(3p/glog): Vendor glog from commit 'afe04691' r/863
Diffstat (limited to 'third_party/glog/toolchains')
-rw-r--r--third_party/glog/toolchains/.gitignore2
-rw-r--r--third_party/glog/toolchains/clang-cxx17.cmake13
-rw-r--r--third_party/glog/toolchains/gcc-cxx11.cmake13
-rw-r--r--third_party/glog/toolchains/gcc-cxx17.cmake13
-rw-r--r--third_party/glog/toolchains/gcc-cxx98.cmake13
-rw-r--r--third_party/glog/toolchains/gcc-gnuxx11.cmake13
-rw-r--r--third_party/glog/toolchains/linux-mingw-w64-cxx11.cmake33
-rw-r--r--third_party/glog/toolchains/linux-mingw-w64-cxx17.cmake33
-rw-r--r--third_party/glog/toolchains/linux-mingw-w64-gnuxx11.cmake33
-rw-r--r--third_party/glog/toolchains/mingw-cxx11.cmake13
-rw-r--r--third_party/glog/toolchains/mingw-cxx17.cmake13
-rw-r--r--third_party/glog/toolchains/mingw-gnuxx11.cmake13
-rw-r--r--third_party/glog/toolchains/vs-14-2015-sdk-8-1.cmake2
-rw-r--r--third_party/glog/toolchains/vs-14-2015-win64.cmake1
-rw-r--r--third_party/glog/toolchains/vs-15-2017-win64-cxx17.cmake2
-rw-r--r--third_party/glog/toolchains/vs-15-2017-win64.cmake1
16 files changed, 211 insertions, 0 deletions
diff --git a/third_party/glog/toolchains/.gitignore b/third_party/glog/toolchains/.gitignore
new file mode 100644
index 000000000000..13489ce3b5db
--- /dev/null
+++ b/third_party/glog/toolchains/.gitignore
@@ -0,0 +1,2 @@
+# allow toolchain files to be tracked by git
+!*.cmake
diff --git a/third_party/glog/toolchains/clang-cxx17.cmake b/third_party/glog/toolchains/clang-cxx17.cmake
new file mode 100644
index 000000000000..09d077a38d7c
--- /dev/null
+++ b/third_party/glog/toolchains/clang-cxx17.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/gcc.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER clang)
+set(CMAKE_CXX_COMPILER clang++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/gcc-cxx11.cmake b/third_party/glog/toolchains/gcc-cxx11.cmake
new file mode 100644
index 000000000000..da1ab5778a27
--- /dev/null
+++ b/third_party/glog/toolchains/gcc-cxx11.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/gcc.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/gcc-cxx17.cmake b/third_party/glog/toolchains/gcc-cxx17.cmake
new file mode 100644
index 000000000000..1b834f12015b
--- /dev/null
+++ b/third_party/glog/toolchains/gcc-cxx17.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/gcc.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/gcc-cxx98.cmake b/third_party/glog/toolchains/gcc-cxx98.cmake
new file mode 100644
index 000000000000..5697ab252aae
--- /dev/null
+++ b/third_party/glog/toolchains/gcc-cxx98.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/gcc.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 98)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/gcc-gnuxx11.cmake b/third_party/glog/toolchains/gcc-gnuxx11.cmake
new file mode 100644
index 000000000000..91f0e4a3ce76
--- /dev/null
+++ b/third_party/glog/toolchains/gcc-gnuxx11.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/gcc.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS ON)
diff --git a/third_party/glog/toolchains/linux-mingw-w64-cxx11.cmake b/third_party/glog/toolchains/linux-mingw-w64-cxx11.cmake
new file mode 100644
index 000000000000..9c6e126a68d2
--- /dev/null
+++ b/third_party/glog/toolchains/linux-mingw-w64-cxx11.cmake
@@ -0,0 +1,33 @@
+# Sample toolchain file for building for Windows from an Ubuntu Linux system.
+#
+# Typical usage:
+#    *) install cross compiler: `sudo apt-get install mingw-w64`
+#    *) cmake -H. -B_build_mingw -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/linux-mingw-w64.cmake"
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR x86_64)
+set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
+
+# set compiler
+set(CMAKE_C_COMPILER   ${TOOLCHAIN_PREFIX}-gcc)
+set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+set(CMAKE_RC_COMPILER  ${TOOLCHAIN_PREFIX}-windres)
+
+# target environment on the build host system
+#   set 1st to dir with the cross compiler's C/C++ headers/libs
+set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
+
+# modify default behavior of FIND_XXX() commands to
+# search for headers/libs in the target environment and
+# search for programs in the build host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# use emulator for `try_run` calls
+set(CMAKE_CROSSCOMPILING_EMULATOR wine64)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/linux-mingw-w64-cxx17.cmake b/third_party/glog/toolchains/linux-mingw-w64-cxx17.cmake
new file mode 100644
index 000000000000..1c363f10eb10
--- /dev/null
+++ b/third_party/glog/toolchains/linux-mingw-w64-cxx17.cmake
@@ -0,0 +1,33 @@
+# Sample toolchain file for building for Windows from an Ubuntu Linux system.
+#
+# Typical usage:
+#    *) install cross compiler: `sudo apt-get install mingw-w64`
+#    *) cmake -H. -B_build_mingw -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/linux-mingw-w64.cmake"
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR x86_64)
+set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
+
+# set compiler
+set(CMAKE_C_COMPILER   ${TOOLCHAIN_PREFIX}-gcc)
+set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+set(CMAKE_RC_COMPILER  ${TOOLCHAIN_PREFIX}-windres)
+
+# target environment on the build host system
+#   set 1st to dir with the cross compiler's C/C++ headers/libs
+set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
+
+# modify default behavior of FIND_XXX() commands to
+# search for headers/libs in the target environment and
+# search for programs in the build host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# use emulator for `try_run` calls
+set(CMAKE_CROSSCOMPILING_EMULATOR wine64)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/linux-mingw-w64-gnuxx11.cmake b/third_party/glog/toolchains/linux-mingw-w64-gnuxx11.cmake
new file mode 100644
index 000000000000..99029649dfa3
--- /dev/null
+++ b/third_party/glog/toolchains/linux-mingw-w64-gnuxx11.cmake
@@ -0,0 +1,33 @@
+# Sample toolchain file for building for Windows from an Ubuntu Linux system.
+#
+# Typical usage:
+#    *) install cross compiler: `sudo apt-get install mingw-w64`
+#    *) cmake -H. -B_build_mingw -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/linux-mingw-w64.cmake"
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR x86_64)
+set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
+
+# set compiler
+set(CMAKE_C_COMPILER   ${TOOLCHAIN_PREFIX}-gcc)
+set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
+set(CMAKE_RC_COMPILER  ${TOOLCHAIN_PREFIX}-windres)
+
+# target environment on the build host system
+#   set 1st to dir with the cross compiler's C/C++ headers/libs
+set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
+
+# modify default behavior of FIND_XXX() commands to
+# search for headers/libs in the target environment and
+# search for programs in the build host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+# use emulator for `try_run` calls
+set(CMAKE_CROSSCOMPILING_EMULATOR wine64)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS ON)
diff --git a/third_party/glog/toolchains/mingw-cxx11.cmake b/third_party/glog/toolchains/mingw-cxx11.cmake
new file mode 100644
index 000000000000..873f623f6011
--- /dev/null
+++ b/third_party/glog/toolchains/mingw-cxx11.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="%cd%\toolchains\mingw.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/mingw-cxx17.cmake b/third_party/glog/toolchains/mingw-cxx17.cmake
new file mode 100644
index 000000000000..c0c89cc459f4
--- /dev/null
+++ b/third_party/glog/toolchains/mingw-cxx17.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="%cd%\toolchains\mingw.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/third_party/glog/toolchains/mingw-gnuxx11.cmake b/third_party/glog/toolchains/mingw-gnuxx11.cmake
new file mode 100644
index 000000000000..66337050c92f
--- /dev/null
+++ b/third_party/glog/toolchains/mingw-gnuxx11.cmake
@@ -0,0 +1,13 @@
+# Sample toolchain file for building with gcc compiler
+#
+# Typical usage:
+#    *) cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="%cd%\toolchains\mingw.cmake"
+
+# set compiler
+set(CMAKE_C_COMPILER gcc)
+set(CMAKE_CXX_COMPILER g++)
+
+# set c++ standard
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS YES)
diff --git a/third_party/glog/toolchains/vs-14-2015-sdk-8-1.cmake b/third_party/glog/toolchains/vs-14-2015-sdk-8-1.cmake
new file mode 100644
index 000000000000..463bee052386
--- /dev/null
+++ b/third_party/glog/toolchains/vs-14-2015-sdk-8-1.cmake
@@ -0,0 +1,2 @@
+# set c++ standard
+set(CMAKE_SYSTEM_VERSION 8.1)
diff --git a/third_party/glog/toolchains/vs-14-2015-win64.cmake b/third_party/glog/toolchains/vs-14-2015-win64.cmake
new file mode 100644
index 000000000000..00beda25efd4
--- /dev/null
+++ b/third_party/glog/toolchains/vs-14-2015-win64.cmake
@@ -0,0 +1 @@
+# dummy, nothing extra to set
diff --git a/third_party/glog/toolchains/vs-15-2017-win64-cxx17.cmake b/third_party/glog/toolchains/vs-15-2017-win64-cxx17.cmake
new file mode 100644
index 000000000000..5e4e936872d9
--- /dev/null
+++ b/third_party/glog/toolchains/vs-15-2017-win64-cxx17.cmake
@@ -0,0 +1,2 @@
+# set c++ standard
+set(CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS_INIT} /std:c++17")
diff --git a/third_party/glog/toolchains/vs-15-2017-win64.cmake b/third_party/glog/toolchains/vs-15-2017-win64.cmake
new file mode 100644
index 000000000000..00beda25efd4
--- /dev/null
+++ b/third_party/glog/toolchains/vs-15-2017-win64.cmake
@@ -0,0 +1 @@
+# dummy, nothing extra to set