Хак для Астра 1.5
This commit is contained in:
parent
6be68e5e51
commit
e3e3ecfc3a
@ -1,5 +1,13 @@
|
|||||||
# based on https://github.com/bluescarni/yacma
|
# 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")
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
macro(CHECK_ENABLE_CXX_FLAG flag)
|
macro(CHECK_ENABLE_CXX_FLAG flag)
|
||||||
@ -90,13 +98,16 @@ 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)
|
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)
|
if(CMAKE_CXX_COMPILER_IS_GCC AND CXX_HAS_LTO_FLAG)
|
||||||
find_program(CMAKE_GCC_AR
|
find_program(CMAKE_GCC_AR
|
||||||
NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_TOOLCHAIN_SUFFIX}
|
NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar${_CMAKE_TOOLCHAIN_SUFFIX}"
|
||||||
|
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar"
|
||||||
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
|
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
|
||||||
find_program(CMAKE_GCC_NM
|
find_program(CMAKE_GCC_NM
|
||||||
NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm
|
NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm${_CMAKE_TOOLCHAIN_SUFFIX}"
|
||||||
|
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm"
|
||||||
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
|
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
|
||||||
find_program(CMAKE_GCC_RANLIB
|
find_program(CMAKE_GCC_RANLIB
|
||||||
NAMES ${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib
|
NAMES "${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib${_CMAKE_TOOLCHAIN_SUFFIX}"
|
||||||
|
"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib"
|
||||||
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
|
HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
|
||||||
if(CMAKE_GCC_AR AND CMAKE_GCC_NM AND CMAKE_GCC_RANLIB)
|
if(CMAKE_GCC_AR AND CMAKE_GCC_NM AND CMAKE_GCC_RANLIB)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")
|
||||||
|
Loading…
Reference in New Issue
Block a user