Enable CMP0065 policy in all projects.

This commit is contained in:
levlam 2021-10-07 17:35:41 +03:00
parent 34569b3600
commit 9d74962296
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -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)