From 438ae78e8a049f96c9294b58d1153a20d18bb397 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 1 Sep 2021 19:25:00 +0300 Subject: [PATCH] Enable some CMake policies in Java example. --- example/java/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/example/java/CMakeLists.txt b/example/java/CMakeLists.txt index 057c8eca9..6a03776b2 100644 --- a/example/java/CMakeLists.txt +++ b/example/java/CMakeLists.txt @@ -1,11 +1,25 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) +if (POLICY CMP0065) + # do not export symbols from executables + # affects compiler checks in project(), so must be set before it + cmake_policy(SET CMP0065 NEW) +endif() + project(TdJavaExample VERSION 1.0 LANGUAGES CXX) if (POLICY CMP0054) # do not expand quoted arguments cmake_policy(SET CMP0054 NEW) endif() +if (POLICY CMP0060) + # link libraries by full path + cmake_policy(SET CMP0060 NEW) +endif() +if (POLICY CMP0074) + # use environment variables to find libraries + cmake_policy(SET CMP0074 NEW) +endif() find_package(Td REQUIRED)