From a072e41677ece79973e61ca61968eaf6d633bff1 Mon Sep 17 00:00:00 2001 From: bit Date: Sun, 9 Sep 2018 09:56:27 +0200 Subject: [PATCH 1/2] Fix compile with gcc7 and tesseract 4 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1954cb..0245c75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ include(CheckCXXCompilerFlag) include(CheckCXXSourceCompiles) include(CheckCXXSourceRuns) -set(CMAKE_C_FLAGS "-std=gnu99") +set(CMAKE_C_FLAGS "-std=gnu++11") set(CMAKE_CXX_FLAGS "-ansi -pedantic -Wall -Wextra -Wno-long-long") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mtune=native -march=native -DNDEBUG -fomit-frame-pointer -ffast-math") # TODO -Ofast GCC 4.6 From 75f140a9fc0a8c36b8a557186b162135cbe1583c Mon Sep 17 00:00:00 2001 From: bit Date: Wed, 13 Feb 2019 16:06:17 +0530 Subject: [PATCH 2/2] use CMAKE_CXX_FLAGS --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0245c75..3f1e1a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,8 +53,8 @@ include(CheckCXXCompilerFlag) include(CheckCXXSourceCompiles) include(CheckCXXSourceRuns) -set(CMAKE_C_FLAGS "-std=gnu++11") -set(CMAKE_CXX_FLAGS "-ansi -pedantic -Wall -Wextra -Wno-long-long") +set(CMAKE_C_FLAGS "-std=gnu99") +set(CMAKE_CXX_FLAGS "-ansi -pedantic -Wall -Wextra -Wno-long-long -std=gnu++11") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mtune=native -march=native -DNDEBUG -fomit-frame-pointer -ffast-math") # TODO -Ofast GCC 4.6 set(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})