Compare commits

..

No commits in common. "bf099295ab3e448c420cc3b17c0a436e9d990884" and "f0760fcd1176d42cc53dd1e57520144ef25d3ec8" have entirely different histories.

View File

@ -1,11 +1,12 @@
# based on https://github.com/bluescarni/yacma
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")
find_program(LSB_RELEASE NAMES lsb_release)
if (LSB_RELEASE)
execute_process(COMMAND ${LSB_RELEASE} -d -s OUTPUT_VARIABLE LSB_DESC)
if ("${LSB_DESC}" STREQUAL "Astra Linux SE 1.5 (Smolensk)")
set(_CMAKE_TOOLCHAIN_PREFIX "x86_64-linux-gnu-")
set(_CMAKE_TOOLCHAIN_SUFFIX "-4.7")
endif()
endif()
include(CheckCXXCompilerFlag)
@ -98,16 +99,13 @@ if(CMAKE_CXX_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_IS_INTEL OR CMAKE_CXX_COMPI
check_cxx_compiler_flag(-fno-fat-lto-objects CXX_HAS_NO_FAT_LTO_FLAG)
if(CMAKE_CXX_COMPILER_IS_GCC AND CXX_HAS_LTO_FLAG)
find_program(CMAKE_GCC_AR
NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_TOOLCHAIN_SUFFIX}"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar"
NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_TOOLCHAIN_SUFFIX}
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_GCC_NM
NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm${_CMAKE_TOOLCHAIN_SUFFIX}"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm"
NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
find_program(CMAKE_GCC_RANLIB
NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${_CMAKE_TOOLCHAIN_SUFFIX}"
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib"
NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
if(CMAKE_GCC_AR AND CMAKE_GCC_NM AND CMAKE_GCC_RANLIB)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")