Порядок функций

This commit is contained in:
Andrei Astafev 2019-10-09 17:17:24 +03:00
parent e57792f316
commit 0a2d9a4fce

View File

@ -2,19 +2,6 @@
include(CheckCXXCompilerFlag) 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) macro(CHECK_ENABLE_CXX_FLAG flag)
set(CMAKE_REQUIRED_QUIET TRUE) set(CMAKE_REQUIRED_QUIET TRUE)
check_cxx_compiler_flag("${flag}" CHECK_CXX_FLAG) check_cxx_compiler_flag("${flag}" CHECK_CXX_FLAG)
@ -30,6 +17,19 @@ macro(CHECK_ENABLE_CXX_FLAG flag)
unset(CHECK_CXX_FLAG CACHE) unset(CHECK_CXX_FLAG CACHE)
endmacro() 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. # 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) if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_INTEL OR CMAKE_CXX_COMPILER_IS_GCC)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)