From 943deab664a8dd38d459ecc9a55fd13900281246 Mon Sep 17 00:00:00 2001 From: starry <46017436+stary24@users.noreply.github.com> Date: Thu, 12 May 2022 15:12:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3CentOS7=E4=B8=8BParse.cpp?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=B8=8D=E9=80=9A=E8=BF=87=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update CMakeLists.txt 解决编译不通过问题 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52b73270..8ed4356d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,12 @@ if(CCACHE_FOUND) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) endif(CCACHE_FOUND) +#add_compile_options(-D__STDC_FORMAT_MACROS) +if(CMAKE_COMPILER_IS_GNUCXX) + add_compile_options(-D__STDC_FORMAT_MACROS) + message(STATUS "-D__STDC_FORMAT_MACROS") +endif(CMAKE_COMPILER_IS_GNUCXX) + #set(CMAKE_BUILD_TYPE "Release") if ("${CMAKE_BUILD_TYPE}" STREQUAL "") set(CMAKE_BUILD_TYPE "Debug")