diff options
author | Derek Bailey <derekbailey@google.com> | 2021-11-17 20:22:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 20:22:23 -0800 |
commit | 8aa18b629163d8c878fe0b8aba743cd554ec37ca (patch) | |
tree | 5c0d6d06db946f034de77c41ee0f8567b33a4a5b /CMakeLists.txt | |
parent | d727579b6da2fedd65055f0514c4c73f6851f003 (diff) | |
download | flatbuffers-8aa18b629163d8c878fe0b8aba743cd554ec37ca.tar.gz flatbuffers-8aa18b629163d8c878fe0b8aba743cd554ec37ca.tar.bz2 flatbuffers-8aa18b629163d8c878fe0b8aba743cd554ec37ca.zip |
fixed cmp0048 error (#6932)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e53a3d8e..6f5f465a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,17 @@ cmake_minimum_required(VERSION 2.8.12) + +if (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) + project(FlatBuffers + DESCRIPTION "Flatbuffers serialization library" + VERSION 2.0.0 + LANGUAGES CXX) +else() + project(FlatBuffers) +endif (POLICY CMP0048) + # generate compile_commands.json set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -include(CheckCXXSymbolExists) - -project(FlatBuffers) # NOTE: Code coverage only works on Linux & OSX. option(FLATBUFFERS_CODE_COVERAGE "Enable the code coverage build option." OFF) @@ -61,6 +69,8 @@ endif() # Auto-detect locale-narrow 'strtod_l' and 'strtoull_l' functions. if(NOT DEFINED FLATBUFFERS_LOCALE_INDEPENDENT) + include(CheckCXXSymbolExists) + set(FLATBUFFERS_LOCALE_INDEPENDENT 0) if(MSVC) check_cxx_symbol_exists(_strtof_l stdlib.h FLATBUFFERS_HAS_STRTOF_L) |