Files
ortools-clone/patches/abseil-cpp-20200225.2.patch
Mizux Seiha b7fb6d4209 Update CMake
2020-07-01 21:01:27 +02:00

27 lines
930 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48cb6eb..1cdaad2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,9 @@ cmake_policy(SET CMP0057 NEW)
# Project version variables are the empty std::string if version is unspecified
cmake_policy(SET CMP0048 NEW)
+# option() honor variables
+cmake_policy(SET CMP0077 NEW)
+
project(absl CXX)
# Output directory is correct by default for most build setups. However, when
@@ -41,9 +44,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# when absl is included as subproject (i.e. using add_subdirectory(abseil-cpp))
# in the source tree of a project that uses it, install rules are disabled.
if(NOT "^${CMAKE_SOURCE_DIR}$" STREQUAL "^${PROJECT_SOURCE_DIR}$")
- set(ABSL_ENABLE_INSTALL FALSE)
+ option(ABSL_ENABLE_INSTALL OFF)
else()
- set(ABSL_ENABLE_INSTALL TRUE)
+ option(ABSL_ENABLE_INSTALL ON)
endif()
list(APPEND CMAKE_MODULE_PATH