From 9d74962296c27bd3f13638f8a79596e69057817d Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 7 Oct 2021 17:35:41 +0300 Subject: [PATCH] Enable CMP0065 policy in all projects. --- example/cpp/CMakeLists.txt | 2 +- td/generate/tl-parser/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/example/cpp/CMakeLists.txt b/example/cpp/CMakeLists.txt index 234d504d8..b3c6878a0 100644 --- a/example/cpp/CMakeLists.txt +++ b/example/cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +cmake_minimum_required(VERSION 3.4 FATAL_ERROR) project(TdExample VERSION 1.0 LANGUAGES CXX) diff --git a/td/generate/tl-parser/CMakeLists.txt b/td/generate/tl-parser/CMakeLists.txt index 442ce674a..6cf5331f4 100644 --- a/td/generate/tl-parser/CMakeLists.txt +++ b/td/generate/tl-parser/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.0 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(tl-parser LANGUAGES C) set(SOURCES crc32.h crc32.c tlc.c tl-parser.c tl-parser.h tl-parser-tree.h tl-tl.h portable_endian.h)