From 045a5d93b708ec32b24f49b993f2a0a9b4e4160e Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Fri, 17 Jun 2022 14:23:05 +0200 Subject: [PATCH] Sync google3 github --- cmake/FindCPLEX.cmake | 15 ++++++- cmake/FindCbc.cmake | 13 ++++++ cmake/FindCgl.cmake | 13 ++++++ cmake/FindClp.cmake | 13 ++++++ cmake/FindCoinUtils.cmake | 13 ++++++ cmake/FindEigen3.cmake | 13 ++++++ cmake/FindGLPK.cmake | 13 ++++++ cmake/FindOsi.cmake | 13 ++++++ cmake/FindProtobuf.cmake | 13 ++++++ cmake/FindSCIP.cmake | 13 ++++++ cmake/FindXPRESS.cmake | 13 ++++++ cmake/Findglog.cmake | 13 ++++++ cmake/Findre2.cmake | 13 ++++++ cmake/Makefile | 13 ++++++ cmake/README.md | 6 +-- cmake/cpp.cmake | 13 ++++++ cmake/dependencies/CMakeLists.txt | 13 ++++++ cmake/deps.cmake | 13 ++++++ cmake/docker/alpine/Dockerfile | 1 - cmake/docker/archlinux/Dockerfile | 1 - cmake/docker/arm/glop.Dockerfile | 1 - cmake/docker/arm/or-tools.Dockerfile | 1 - cmake/docker/centos/Dockerfile | 1 - cmake/docker/debian/Dockerfile | 1 - cmake/docker/fedora/Dockerfile | 1 - cmake/docker/glop/Dockerfile | 1 - cmake/docker/opensuse/Dockerfile | 1 - cmake/docker/ubuntu/Dockerfile | 1 - cmake/docs/generate_image.sh | 13 ++++++ cmake/dotnet.cmake | 13 ++++++ cmake/flatzinc.cmake | 13 ++++++ cmake/glop.cmake | 13 ++++++ cmake/host.CMakeLists.txt | 13 ++++++ cmake/host.cmake | 13 ++++++ cmake/java.cmake | 13 ++++++ cmake/python.cmake | 13 ++++++ cmake/utils.cmake | 13 ++++++ ortools/algorithms/BUILD.bazel | 13 ++++++ ortools/algorithms/CMakeLists.txt | 13 ++++++ ortools/algorithms/csharp/CMakeLists.txt | 13 ++++++ ortools/algorithms/find_graph_symmetries.cc | 2 +- ortools/algorithms/java/CMakeLists.txt | 13 ++++++ ortools/algorithms/python/CMakeLists.txt | 13 ++++++ ortools/algorithms/samples/BUILD.bazel | 13 ++++++ ortools/algorithms/samples/CMakeLists.txt | 13 ++++++ ortools/algorithms/samples/code_samples.bzl | 45 ++++++++++++------- .../samples/simple_knapsack_program.py | 1 + ortools/base/BUILD.bazel | 13 ++++++ ortools/base/CMakeLists.txt | 13 ++++++ tools/Makefile.cpp.mk | 13 ++++++ tools/Makefile.dotnet.mk | 13 ++++++ tools/Makefile.java.mk | 13 ++++++ tools/Makefile.python.mk | 13 ++++++ tools/check_python_deps.py | 13 ++++++ tools/cross_compile.sh | 13 ++++++ tools/doc/doxygen_filter.py | 14 +++++- tools/doc/gen_javadoc.sh | 13 ++++++ tools/doc/gen_ref_doc.py | 14 ++++++ tools/docker/Makefile | 13 ++++++ tools/docker/README.md | 4 +- tools/docker/docs/generate_image.sh | 13 ++++++ tools/docker/python/amd64/alpine.Dockerfile | 1 - tools/docker/python/arm64v8/alpine.Dockerfile | 1 - tools/docker/python/build-manylinux.sh | 13 ++++++ tools/export_to_ipynb.py | 15 ++++++- tools/find_dependencies.sh | 14 ++++++ tools/generate_all_notebooks.sh | 13 ++++++ tools/release/build_delivery_linux.sh | 19 ++++++-- tools/release/build_delivery_mac.sh | 15 ++++++- tools/release/build_delivery_unix.sh | 13 ++++++ tools/release/publish_delivery_linux.sh | 13 ++++++ tools/release/publish_delivery_mac.sh | 13 ++++++ tools/release/publish_delivery_unix.sh | 13 ++++++ tools/release/test_delivery_mac.sh | 13 ++++++ tools/release/test_delivery_unix.sh | 13 ++++++ tools/setup_data.py | 14 ++++++ 76 files changed, 812 insertions(+), 41 deletions(-) diff --git a/cmake/FindCPLEX.cmake b/cmake/FindCPLEX.cmake index f45fbcc23e..b714a4dc1c 100644 --- a/cmake/FindCPLEX.cmake +++ b/cmake/FindCPLEX.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindCPLEX -------- @@ -51,7 +64,7 @@ else() set(CPLEX_FOUND TRUE) endif() -# TODO(mizux) Bump support to CPLEX 20.1.0 +# TODO(user) Bump support to CPLEX 20.1.0 # ref: https://www.ibm.com/docs/en/icos/20.1.0?topic=cplex-setting-up-gnulinuxmacos # ref: https://www.ibm.com/docs/en/icos/20.1.0?topic=cplex-setting-up-windows diff --git a/cmake/FindCbc.cmake b/cmake/FindCbc.cmake index 2779f27017..c905d97ab6 100644 --- a/cmake/FindCbc.cmake +++ b/cmake/FindCbc.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindCbc -------- diff --git a/cmake/FindCgl.cmake b/cmake/FindCgl.cmake index fb01ebf506..31775dc8ff 100644 --- a/cmake/FindCgl.cmake +++ b/cmake/FindCgl.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindCgl -------- diff --git a/cmake/FindClp.cmake b/cmake/FindClp.cmake index 923e9a22e3..799007cc77 100644 --- a/cmake/FindClp.cmake +++ b/cmake/FindClp.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindClp -------- diff --git a/cmake/FindCoinUtils.cmake b/cmake/FindCoinUtils.cmake index 9a3b8920ed..a046f44f52 100644 --- a/cmake/FindCoinUtils.cmake +++ b/cmake/FindCoinUtils.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindCoinUtils -------- diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake index 28bd3e914f..e7b88a8003 100644 --- a/cmake/FindEigen3.cmake +++ b/cmake/FindEigen3.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindEigen3 -------- diff --git a/cmake/FindGLPK.cmake b/cmake/FindGLPK.cmake index eb9e1ee0bc..6109fa7f5e 100644 --- a/cmake/FindGLPK.cmake +++ b/cmake/FindGLPK.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindGLPK -------- diff --git a/cmake/FindOsi.cmake b/cmake/FindOsi.cmake index f14154af1c..a825f5d25e 100644 --- a/cmake/FindOsi.cmake +++ b/cmake/FindOsi.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindOsi -------- diff --git a/cmake/FindProtobuf.cmake b/cmake/FindProtobuf.cmake index 35625b1e2e..ffc600a822 100644 --- a/cmake/FindProtobuf.cmake +++ b/cmake/FindProtobuf.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindProtobuf -------- diff --git a/cmake/FindSCIP.cmake b/cmake/FindSCIP.cmake index 5d2f83e1d2..09e6009ea3 100644 --- a/cmake/FindSCIP.cmake +++ b/cmake/FindSCIP.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindSCIP -------- diff --git a/cmake/FindXPRESS.cmake b/cmake/FindXPRESS.cmake index b73fdae58f..9e609ad253 100644 --- a/cmake/FindXPRESS.cmake +++ b/cmake/FindXPRESS.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: FindXPRESS -------- diff --git a/cmake/Findglog.cmake b/cmake/Findglog.cmake index ef84dfc638..84e3469ae5 100644 --- a/cmake/Findglog.cmake +++ b/cmake/Findglog.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: Findglog -------- diff --git a/cmake/Findre2.cmake b/cmake/Findre2.cmake index 3e57daa27e..2bf5504d74 100644 --- a/cmake/Findre2.cmake +++ b/cmake/Findre2.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #[=======================================================================[.rst: Findre2 -------- diff --git a/cmake/Makefile b/cmake/Makefile index 16399d0522..33288a7c9c 100644 --- a/cmake/Makefile +++ b/cmake/Makefile @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + PROJECT := ortools BUILD_SYSTEM := cmake BRANCH := $(shell git rev-parse --abbrev-ref HEAD) diff --git a/cmake/README.md b/cmake/README.md index 74b5742acd..37309f30a5 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -110,8 +110,8 @@ below). [SCIP license](https://scipopt.org/index.php#license) to ensure that you are complying with it. -OR-Tools can also optionally (disabled by default i.e. `OFF`) be compiled with support for -the following third-party solvers: +OR-Tools can also optionally (disabled by default i.e. `OFF`) be compiled with +support for the following third-party solvers: * GLPK (`BUILD_GLPK`),
note: You must enable the support of GLPK solver @@ -284,7 +284,7 @@ added automatically to your target as needed. #### Using FetchContent If you have `CMake >= 3.14.7` you can use the built-in module -[FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) +[`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html) instead. Note: The **ortools::ortools** target is in this case an ALIAS library target for the **ortools** library target. diff --git a/cmake/cpp.cmake b/cmake/cpp.cmake index 56555019ee..de776e58d8 100644 --- a/cmake/cpp.cmake +++ b/cmake/cpp.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_CXX) return() endif() diff --git a/cmake/dependencies/CMakeLists.txt b/cmake/dependencies/CMakeLists.txt index 1d6c9b2710..6202d07e52 100644 --- a/cmake/dependencies/CMakeLists.txt +++ b/cmake/dependencies/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # ############################################################################## # SWIG (WIN32) # ############################################################################## diff --git a/cmake/deps.cmake b/cmake/deps.cmake index ae47ec3aef..dca6861563 100644 --- a/cmake/deps.cmake +++ b/cmake/deps.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Check dependencies set(CMAKE_THREAD_PREFER_PTHREAD TRUE) set(THREAD_PREFER_PTHREAD_FLAG TRUE) diff --git a/cmake/docker/alpine/Dockerfile b/cmake/docker/alpine/Dockerfile index 63a76c7c08..095a4d0264 100644 --- a/cmake/docker/alpine/Dockerfile +++ b/cmake/docker/alpine/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/alpine FROM alpine:edge AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apk add --no-cache git build-base linux-headers cmake diff --git a/cmake/docker/archlinux/Dockerfile b/cmake/docker/archlinux/Dockerfile index dba10d709d..ce50623c14 100644 --- a/cmake/docker/archlinux/Dockerfile +++ b/cmake/docker/archlinux/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/archlinux/ FROM archlinux:latest AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN pacman -Syu --noconfirm git base-devel cmake diff --git a/cmake/docker/arm/glop.Dockerfile b/cmake/docker/arm/glop.Dockerfile index 13b473a3a7..65e96d30ff 100644 --- a/cmake/docker/arm/glop.Dockerfile +++ b/cmake/docker/arm/glop.Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/ubuntu FROM ubuntu:rolling AS env -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ diff --git a/cmake/docker/arm/or-tools.Dockerfile b/cmake/docker/arm/or-tools.Dockerfile index 374874b05c..a44909498d 100644 --- a/cmake/docker/arm/or-tools.Dockerfile +++ b/cmake/docker/arm/or-tools.Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/ubuntu FROM ubuntu:rolling AS env -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ diff --git a/cmake/docker/centos/Dockerfile b/cmake/docker/centos/Dockerfile index c7621b7f55..7736ff096d 100644 --- a/cmake/docker/centos/Dockerfile +++ b/cmake/docker/centos/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://quay.io/repository/centos/centos FROM quay.io/centos/centos:stream AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN dnf -y update \ diff --git a/cmake/docker/debian/Dockerfile b/cmake/docker/debian/Dockerfile index 87ba5eb0e4..0e247f6128 100644 --- a/cmake/docker/debian/Dockerfile +++ b/cmake/docker/debian/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/debian FROM debian:latest AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ diff --git a/cmake/docker/fedora/Dockerfile b/cmake/docker/fedora/Dockerfile index 1dc6806b02..b585c14191 100644 --- a/cmake/docker/fedora/Dockerfile +++ b/cmake/docker/fedora/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/fedora FROM fedora:latest AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN dnf -y update \ diff --git a/cmake/docker/glop/Dockerfile b/cmake/docker/glop/Dockerfile index f68ab35375..1d08e16d44 100644 --- a/cmake/docker/glop/Dockerfile +++ b/cmake/docker/glop/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/ubuntu FROM ubuntu:rolling AS env -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ diff --git a/cmake/docker/opensuse/Dockerfile b/cmake/docker/opensuse/Dockerfile index cde54d4db2..fdb0d86dbe 100644 --- a/cmake/docker/opensuse/Dockerfile +++ b/cmake/docker/opensuse/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/r/opensuse/tumbleweed FROM opensuse/tumbleweed AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN zypper refresh \ diff --git a/cmake/docker/ubuntu/Dockerfile b/cmake/docker/ubuntu/Dockerfile index b587b97865..b054d6264d 100644 --- a/cmake/docker/ubuntu/Dockerfile +++ b/cmake/docker/ubuntu/Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/ubuntu FROM ubuntu:rolling AS base -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apt-get update -qq \ diff --git a/cmake/docs/generate_image.sh b/cmake/docs/generate_image.sh index 7d125b4b01..efcd745d3d 100755 --- a/cmake/docs/generate_image.sh +++ b/cmake/docs/generate_image.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -euxo pipefail # Check plantuml is in PATH diff --git a/cmake/dotnet.cmake b/cmake/dotnet.cmake index 2a873086e1..df43f6b444 100644 --- a/cmake/dotnet.cmake +++ b/cmake/dotnet.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_DOTNET) return() endif() diff --git a/cmake/flatzinc.cmake b/cmake/flatzinc.cmake index 6bc6c88fa4..27cef073f7 100644 --- a/cmake/flatzinc.cmake +++ b/cmake/flatzinc.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_FLATZINC) return() endif() diff --git a/cmake/glop.cmake b/cmake/glop.cmake index 2f13fa04ed..35ef539104 100644 --- a/cmake/glop.cmake +++ b/cmake/glop.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_GLOP) return() endif() diff --git a/cmake/host.CMakeLists.txt b/cmake/host.CMakeLists.txt index 210e2a5ed4..07dfc9a5f4 100644 --- a/cmake/host.CMakeLists.txt +++ b/cmake/host.CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + cmake_minimum_required(VERSION 3.14) # fetch_git_dependency() diff --git a/cmake/host.cmake b/cmake/host.cmake index 6a6d79d249..63e4dd3003 100644 --- a/cmake/host.cmake +++ b/cmake/host.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT CMAKE_CROSSCOMPILING) set(PROTOC_PRG protobuf::protoc) return() diff --git a/cmake/java.cmake b/cmake/java.cmake index 43843ac422..e2ce4fe9e0 100644 --- a/cmake/java.cmake +++ b/cmake/java.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_JAVA) return() endif() diff --git a/cmake/python.cmake b/cmake/python.cmake index 0568b22383..381bf09abc 100644 --- a/cmake/python.cmake +++ b/cmake/python.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_PYTHON) return() endif() diff --git a/cmake/utils.cmake b/cmake/utils.cmake index 684a646428..f267f3d2e1 100644 --- a/cmake/utils.cmake +++ b/cmake/utils.cmake @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + function(get_patch_from_git VERSION_PATCH VERSION_MAJOR) find_package(Git QUIET) if(NOT GIT_FOUND) diff --git a/ortools/algorithms/BUILD.bazel b/ortools/algorithms/BUILD.bazel index 538a6555af..34729a2992 100644 --- a/ortools/algorithms/BUILD.bazel +++ b/ortools/algorithms/BUILD.bazel @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + package(default_visibility = ["//visibility:public"]) cc_library( diff --git a/ortools/algorithms/CMakeLists.txt b/ortools/algorithms/CMakeLists.txt index a2facd051c..0429de3040 100644 --- a/ortools/algorithms/CMakeLists.txt +++ b/ortools/algorithms/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + file(GLOB _SRCS "*.h" "*.cc") list(REMOVE_ITEM _SRCS ${CMAKE_CURRENT_SOURCE_DIR}/hungarian_test.cc diff --git a/ortools/algorithms/csharp/CMakeLists.txt b/ortools/algorithms/csharp/CMakeLists.txt index ab0c9248c2..7890e95cc4 100644 --- a/ortools/algorithms/csharp/CMakeLists.txt +++ b/ortools/algorithms/csharp/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set_property(SOURCE knapsack_solver.i PROPERTY CPLUSPLUS ON) set_property(SOURCE knapsack_solver.i PROPERTY SWIG_MODULE_NAME operations_research_algorithms) set_property(SOURCE knapsack_solver.i PROPERTY COMPILE_DEFINITIONS diff --git a/ortools/algorithms/find_graph_symmetries.cc b/ortools/algorithms/find_graph_symmetries.cc index 8e72f3e6cb..c2dd47c140 100644 --- a/ortools/algorithms/find_graph_symmetries.cc +++ b/ortools/algorithms/find_graph_symmetries.cc @@ -837,7 +837,7 @@ GraphSymmetryFinder::FindOneSuitablePermutation( tmp_dynamic_permutation_.UndoLastMappings(&base_singletons); } else { ScopedTimeDistributionUpdater u(&stats_.map_reelection_time); - // TODO(user, viger): try to get the non-singleton part from + // TODO(user): try to get the non-singleton part from // DynamicPermutation in O(1). On some graphs like the symmetry of the // mip problem lectsched-4-obj.mps.gz, this take the majority of the // time! diff --git a/ortools/algorithms/java/CMakeLists.txt b/ortools/algorithms/java/CMakeLists.txt index 6b89e23c48..ee07ffc6fd 100644 --- a/ortools/algorithms/java/CMakeLists.txt +++ b/ortools/algorithms/java/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set_property(SOURCE knapsack_solver.i PROPERTY CPLUSPLUS ON) set_property(SOURCE knapsack_solver.i PROPERTY SWIG_MODULE_NAME main) set_property(SOURCE knapsack_solver.i PROPERTY COMPILE_DEFINITIONS diff --git a/ortools/algorithms/python/CMakeLists.txt b/ortools/algorithms/python/CMakeLists.txt index 711d4a75d4..564d939041 100644 --- a/ortools/algorithms/python/CMakeLists.txt +++ b/ortools/algorithms/python/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set_property(SOURCE knapsack_solver.i PROPERTY CPLUSPLUS ON) set_property(SOURCE knapsack_solver.i PROPERTY SWIG_MODULE_NAME pywrapknapsack_solver) set_property(SOURCE knapsack_solver.i PROPERTY COMPILE_DEFINITIONS diff --git a/ortools/algorithms/samples/BUILD.bazel b/ortools/algorithms/samples/BUILD.bazel index 6acb8b5511..43edf5bd29 100644 --- a/ortools/algorithms/samples/BUILD.bazel +++ b/ortools/algorithms/samples/BUILD.bazel @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + load(":code_samples.bzl", "code_sample_cc") code_sample_cc(name = "knapsack") diff --git a/ortools/algorithms/samples/CMakeLists.txt b/ortools/algorithms/samples/CMakeLists.txt index 90246fcd14..1c8a168796 100644 --- a/ortools/algorithms/samples/CMakeLists.txt +++ b/ortools/algorithms/samples/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + if(NOT BUILD_SAMPLES) return() endif() diff --git a/ortools/algorithms/samples/code_samples.bzl b/ortools/algorithms/samples/code_samples.bzl index 9a36790d29..511cac6a9e 100644 --- a/ortools/algorithms/samples/code_samples.bzl +++ b/ortools/algorithms/samples/code_samples.bzl @@ -1,20 +1,33 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Helper macro to compile and test code samples.""" def code_sample_cc(name): - native.cc_binary( - name = name, - srcs = [name + ".cc"], - deps = [ - "//ortools/algorithms:knapsack_solver_lib", - ], - ) + native.cc_binary( + name = name, + srcs = [name + ".cc"], + deps = [ + "//ortools/algorithms:knapsack_solver_lib", + ], + ) - native.cc_test( - name = name+"_test", - size = "small", - srcs = [name + ".cc"], - deps = [ - ":"+name, - "//ortools/algorithms:knapsack_solver_lib", - ], - ) + native.cc_test( + name = name + "_test", + size = "small", + srcs = [name + ".cc"], + deps = [ + ":" + name, + "//ortools/algorithms:knapsack_solver_lib", + ], + ) diff --git a/ortools/algorithms/samples/simple_knapsack_program.py b/ortools/algorithms/samples/simple_knapsack_program.py index b681d04d3d..f5e5160a4e 100644 --- a/ortools/algorithms/samples/simple_knapsack_program.py +++ b/ortools/algorithms/samples/simple_knapsack_program.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + # [START program] """A simple knapsack problem.""" # [START import] diff --git a/ortools/base/BUILD.bazel b/ortools/base/BUILD.bazel index 55c86b229a..e015e6bb0b 100644 --- a/ortools/base/BUILD.bazel +++ b/ortools/base/BUILD.bazel @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + package(default_visibility = ["//visibility:public"]) config_setting( diff --git a/ortools/base/CMakeLists.txt b/ortools/base/CMakeLists.txt index 51e836f8b1..aa06420ac5 100644 --- a/ortools/base/CMakeLists.txt +++ b/ortools/base/CMakeLists.txt @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + file(GLOB _SRCS "*.h" "*.cc") set(NAME ${PROJECT_NAME}_base) diff --git a/tools/Makefile.cpp.mk b/tools/Makefile.cpp.mk index 8ab480dc48..14c608ce7f 100644 --- a/tools/Makefile.cpp.mk +++ b/tools/Makefile.cpp.mk @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + VERSION := @PROJECT_VERSION@ # Let's discover something about where we run ifeq ($(OS),Windows_NT) diff --git a/tools/Makefile.dotnet.mk b/tools/Makefile.dotnet.mk index 0edb6c69f1..32aa7388ab 100644 --- a/tools/Makefile.dotnet.mk +++ b/tools/Makefile.dotnet.mk @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + VERSION := @PROJECT_VERSION@ # Let's discover something about where we run ifeq ($(OS),Windows_NT) diff --git a/tools/Makefile.java.mk b/tools/Makefile.java.mk index c8b4485b2c..51d3b37254 100644 --- a/tools/Makefile.java.mk +++ b/tools/Makefile.java.mk @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + VERSION := @PROJECT_VERSION@ # Let's discover something about where we run ifeq ($(OS),Windows_NT) diff --git a/tools/Makefile.python.mk b/tools/Makefile.python.mk index e8787a249a..f22b7cf812 100644 --- a/tools/Makefile.python.mk +++ b/tools/Makefile.python.mk @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + VERSION := @PROJECT_VERSION@ # Let's discover something about where we run ifeq ($(OS),Windows_NT) diff --git a/tools/check_python_deps.py b/tools/check_python_deps.py index 4b1f129fd5..6f95122a66 100644 --- a/tools/check_python_deps.py +++ b/tools/check_python_deps.py @@ -1,4 +1,17 @@ #!/usr/bin/env python3 +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Check user python installation.""" import inspect import logging diff --git a/tools/cross_compile.sh b/tools/cross_compile.sh index 73ec65316f..bd2cc5ea4c 100755 --- a/tools/cross_compile.sh +++ b/tools/cross_compile.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function extract() { diff --git a/tools/doc/doxygen_filter.py b/tools/doc/doxygen_filter.py index 2f657250b4..b0053bc669 100644 --- a/tools/doc/doxygen_filter.py +++ b/tools/doc/doxygen_filter.py @@ -1,4 +1,16 @@ #!/usr/bin/env python3 +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. """Doxygen pre-filter script for ion. @@ -69,7 +81,7 @@ class DoxygenFormatter(object): # doesn't treat it like a code block. (re.compile(r'(^\s*)//\s{4,}([-\d*].*)'), r'\1 \2', self.COMMENT), - # Replace TODO(someone) in a comment with @todo (someone) + # Replace TODO(user) in a comment with @todo (someone) (re.compile(r'TODO'), r'@todo ', self.COMMENT), # Replace leading 'Note:' or 'Note that' in a comment with @note diff --git a/tools/doc/gen_javadoc.sh b/tools/doc/gen_javadoc.sh index 02f24e70fa..9bc89d1fa9 100755 --- a/tools/doc/gen_javadoc.sh +++ b/tools/doc/gen_javadoc.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -euxo pipefail # Check tar is in PATH diff --git a/tools/doc/gen_ref_doc.py b/tools/doc/gen_ref_doc.py index 6896908a92..5386886428 100644 --- a/tools/doc/gen_ref_doc.py +++ b/tools/doc/gen_ref_doc.py @@ -1,3 +1,17 @@ +#!/usr/bin/env python3 +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Generate OR-Tools ref doc using Doxygen.""" import os import re diff --git a/tools/docker/Makefile b/tools/docker/Makefile index d1f66349c6..dc0cad1c51 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -1,3 +1,16 @@ +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # General commands .PHONY: help BOLD=\e[1m diff --git a/tools/docker/README.md b/tools/docker/README.md index a3416a9853..8ee517edf2 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -63,5 +63,5 @@ docker run --platform linux/arm64 --rm --init -it ubuntu:latest bash -c "uname - ref: -* https://github.com/docker-library/official-images#architectures-other-than-amd64 -* https://github.com/multiarch/qemu-user-static#getting-started +* https://github.com/docker-library/official-images#architectures-other-than-amd64 +* https://github.com/multiarch/qemu-user-static#getting-started diff --git a/tools/docker/docs/generate_image.sh b/tools/docker/docs/generate_image.sh index 45b39f1b53..45d79f03eb 100755 --- a/tools/docker/docs/generate_image.sh +++ b/tools/docker/docs/generate_image.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eux rm -f ./*.svg ./*.png diff --git a/tools/docker/python/amd64/alpine.Dockerfile b/tools/docker/python/amd64/alpine.Dockerfile index cdbabb9b05..0670a0b908 100644 --- a/tools/docker/python/amd64/alpine.Dockerfile +++ b/tools/docker/python/amd64/alpine.Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/alpine FROM alpine:edge AS env -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apk add --no-cache git build-base linux-headers cmake xfce4-dev-tools diff --git a/tools/docker/python/arm64v8/alpine.Dockerfile b/tools/docker/python/arm64v8/alpine.Dockerfile index 7a4b453c07..1a8b3a07db 100644 --- a/tools/docker/python/arm64v8/alpine.Dockerfile +++ b/tools/docker/python/arm64v8/alpine.Dockerfile @@ -1,7 +1,6 @@ # Create a virtual environment with all tools installed # ref: https://hub.docker.com/_/alpine FROM arm64v8/alpine:edge AS env -LABEL maintainer="corentinl@google.com" # Install system build dependencies ENV PATH=/usr/local/bin:$PATH RUN apk add --no-cache git build-base linux-headers cmake xfce4-dev-tools diff --git a/tools/docker/python/build-manylinux.sh b/tools/docker/python/build-manylinux.sh index a5facffe95..0cf326083f 100755 --- a/tools/docker/python/build-manylinux.sh +++ b/tools/docker/python/build-manylinux.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Build all the wheel artifacts for the platforms supported by manylinux2014 and # export them to the specified location. set -exo pipefail diff --git a/tools/export_to_ipynb.py b/tools/export_to_ipynb.py index a797ff27d2..a4a2e7351d 100755 --- a/tools/export_to_ipynb.py +++ b/tools/export_to_ipynb.py @@ -1,4 +1,17 @@ #!/usr/bin/env python3 +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Transform any Python sample or example to Python NoteBook.""" import ast import os @@ -101,7 +114,7 @@ for idx, (c_block, s, e) in enumerate( filter(lambda l: not re.search(r'# \[START .*\]$', l), filtered_lines)) filtered_lines = list( filter(lambda l: not re.search(r'# \[END .*\]$', l), filtered_lines)) - # TODO(mizux): Remove only copyright not all line with '^#' + # TODO(user): Remove only copyright not all line with '^#' filtered_lines = list( filter(lambda l: not l.startswith(r'#'), filtered_lines)) filtered_lines = [s.replace(r'"""', '') for s in filtered_lines] diff --git a/tools/find_dependencies.sh b/tools/find_dependencies.sh index efee66644f..6e3ec6395b 100755 --- a/tools/find_dependencies.sh +++ b/tools/find_dependencies.sh @@ -1,3 +1,17 @@ +#!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + for deps in $(grep -e "\#include \"$dir" "src/$1/*.h" "src/$1/*.cc" | cut -d '"' -f 2 | sort -u) do echo "$deps" diff --git a/tools/generate_all_notebooks.sh b/tools/generate_all_notebooks.sh index a63d1f5fc8..9022a3bbbe 100755 --- a/tools/generate_all_notebooks.sh +++ b/tools/generate_all_notebooks.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # usage: ./tools/generate_all_notebooks.sh set -e diff --git a/tools/release/build_delivery_linux.sh b/tools/release/build_delivery_linux.sh index 9d0bffc8d6..18d8fd858a 100755 --- a/tools/release/build_delivery_linux.sh +++ b/tools/release/build_delivery_linux.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function help() { @@ -152,7 +165,7 @@ function build_java() { } # Python 3 -# todo(mizux) Use `make --directory tools/docker python` instead +# todo(user) Use `make --directory tools/docker python` instead function build_python() { if echo "${ORTOOLS_BRANCH} ${ORTOOLS_SHA1}" | cmp --silent "${ROOT_DIR}/export/python_build" -; then echo "build python up to date!" | tee -a build.log @@ -204,7 +217,7 @@ function build_archive() { make archive_java echo "DONE" | tee -a build.log - # TODO(mizux) copy archives to export/ + # TODO(user) copy archives to export/ echo "${ORTOOLS_BRANCH} ${ORTOOLS_SHA1}" > "${ROOT_DIR}/export/archive_build" } @@ -229,7 +242,7 @@ function build_examples() { make dotnet_examples_archive UNIX_PYTHON_VER=3 echo "DONE" | tee -a build.log - # TODO(mizux) copy example to export/ + # TODO(user) copy example to export/ echo "${ORTOOLS_BRANCH} ${ORTOOLS_SHA1}" > "${ROOT_DIR}/export/examples_build" } diff --git a/tools/release/build_delivery_mac.sh b/tools/release/build_delivery_mac.sh index 7f98fc6f79..83520b4c09 100755 --- a/tools/release/build_delivery_mac.sh +++ b/tools/release/build_delivery_mac.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function help() { @@ -145,7 +158,7 @@ function build_java() { } # Python 3 -# todo(mizux) Use `make --directory tools/docker python` instead +# todo(user) Use `make --directory tools/docker python` instead function build_python() { if echo "${ORTOOLS_BRANCH} ${ORTOOLS_SHA1}" | cmp --silent "${ROOT_DIR}/export/python_build" -; then echo "build python up to date!" | tee -a build.log diff --git a/tools/release/build_delivery_unix.sh b/tools/release/build_delivery_unix.sh index 8863fda329..d1487d3208 100755 --- a/tools/release/build_delivery_unix.sh +++ b/tools/release/build_delivery_unix.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function help() { diff --git a/tools/release/publish_delivery_linux.sh b/tools/release/publish_delivery_linux.sh index 610c5358f3..02331872b6 100755 --- a/tools/release/publish_delivery_linux.sh +++ b/tools/release/publish_delivery_linux.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function help() { diff --git a/tools/release/publish_delivery_mac.sh b/tools/release/publish_delivery_mac.sh index a8c754950b..a7e776f05a 100755 --- a/tools/release/publish_delivery_mac.sh +++ b/tools/release/publish_delivery_mac.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function help() { diff --git a/tools/release/publish_delivery_unix.sh b/tools/release/publish_delivery_unix.sh index b65554c36a..579ce9c6f3 100755 --- a/tools/release/publish_delivery_unix.sh +++ b/tools/release/publish_delivery_unix.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -eo pipefail function help() { diff --git a/tools/release/test_delivery_mac.sh b/tools/release/test_delivery_mac.sh index 9ebff49014..faa4227c0d 100755 --- a/tools/release/test_delivery_mac.sh +++ b/tools/release/test_delivery_mac.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -euxo pipefail # Check all prerequisite diff --git a/tools/release/test_delivery_unix.sh b/tools/release/test_delivery_unix.sh index f208b5449f..3254203124 100755 --- a/tools/release/test_delivery_unix.sh +++ b/tools/release/test_delivery_unix.sh @@ -1,4 +1,17 @@ #!/usr/bin/env bash +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set -euxo pipefail # Check all prerequisite diff --git a/tools/setup_data.py b/tools/setup_data.py index bfaac47556..caeca19f59 100644 --- a/tools/setup_data.py +++ b/tools/setup_data.py @@ -1,3 +1,17 @@ +#!/usr/bin/env python3 +# Copyright 2010-2022 Google LLC +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + """Setup.py for data package.""" from os import path import sys