From 97522c024b6b2f28d65577c367c4bb1e2ec721af Mon Sep 17 00:00:00 2001 From: lovelyyoung <1002639516@qq.com> Date: Wed, 30 Jun 2021 22:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCMakeLists=E4=B8=AD=E7=94=9F?= =?UTF-8?q?=E6=88=90vs=E5=B7=A5=E7=A8=8B=E9=9C=80=E8=A6=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4c++=E7=89=88=E6=9C=AC=E4=BB=A5=E5=8F=8Adebug=E7=89=88?= =?UTF-8?q?=E6=9C=AClog=E5=BA=93=E9=93=BE=E6=8E=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- huagao/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/huagao/CMakeLists.txt b/huagao/CMakeLists.txt index d4e6aa22..29733e33 100644 --- a/huagao/CMakeLists.txt +++ b/huagao/CMakeLists.txt @@ -1,6 +1,14 @@ # CMake 最低版本号要求 cmake_minimum_required (VERSION 2.8) project(huagotwainds) +if (MSVC_VERSION GREATER_EQUAL "1900") + include(CheckCXXCompilerFlag) + CHECK_CXX_COMPILER_FLAG("/std:c++17" _cpp_latest_flag_supported) + if (_cpp_latest_flag_supported) + add_compile_options("/std:c++17") + endif() +endif() + execute_process( COMMAND git log -1 --format=%H WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} @@ -89,7 +97,7 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows") link_libraries(tesseract_viewer) link_libraries(tesseract_wordrec) link_libraries(turbojpeg) - link_libraries(log4cplusS) + RW_LINK_3RD_PART_LIBRARY(log4cplusS) MESSAGE(STATUS "current platform: Windows") ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") MESSAGE(STATUS "current platform: FreeBSD")