From 0a2d9a4fceb445843be62247f77da098faf7ba12 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 9 Oct 2019 17:17:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=80=D1=8F=D0=B4=D0=BE=D0=BA=20?= =?UTF-8?q?=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCompilerFlags.cmake | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CMLibCompilerFlags.cmake b/CMLibCompilerFlags.cmake index af11cc3..379fd4a 100644 --- a/CMLibCompilerFlags.cmake +++ b/CMLibCompilerFlags.cmake @@ -2,19 +2,6 @@ include(CheckCXXCompilerFlag) -if(LSB_DISTRIBUTOR_ID STREQUAL "AstraLinuxSE" - AND LSB_CODENAME STREQUAL "smolensk" - AND LSB_RELEASE STREQUAL "1.5") - set(_CMAKE_TOOLCHAIN_PREFIX "x86_64-linux-gnu-") - set(_CMAKE_TOOLCHAIN_SUFFIX "-4.7") - set(_CMAKE_TOOLCHAIN_LOCATION} "/usr/bin") -else() - # -Wshadow gives a lot of false positives with GCC 4.7.2 in Astra Linux 1.5 - if(CMAKE_CXX_COMPILER_IS_GCC) - check_enable_cxx_flag(-Wshadow) - endif() -endif() - macro(CHECK_ENABLE_CXX_FLAG flag) set(CMAKE_REQUIRED_QUIET TRUE) check_cxx_compiler_flag("${flag}" CHECK_CXX_FLAG) @@ -30,6 +17,19 @@ macro(CHECK_ENABLE_CXX_FLAG flag) unset(CHECK_CXX_FLAG CACHE) endmacro() +if(LSB_DISTRIBUTOR_ID STREQUAL "AstraLinuxSE" + AND LSB_CODENAME STREQUAL "smolensk" + AND LSB_RELEASE STREQUAL "1.5") + set(_CMAKE_TOOLCHAIN_PREFIX "x86_64-linux-gnu-") + set(_CMAKE_TOOLCHAIN_SUFFIX "-4.7") + set(_CMAKE_TOOLCHAIN_LOCATION} "/usr/bin") +else() + # -Wshadow gives a lot of false positives with GCC 4.7.2 in Astra Linux 1.5 + if(CMAKE_CXX_COMPILER_IS_GCC) + check_enable_cxx_flag(-Wshadow) + endif() +endif() + # Common configuration for GCC, clang and Intel. if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_INTEL OR CMAKE_CXX_COMPILER_IS_GCC) set(CMAKE_CXX_STANDARD 11)