2022-10-06 23:49:02 +00:00
|
|
|
include_guard(GLOBAL)
|
|
|
|
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
# cmake-format: off
|
|
|
|
if((MYX_CMAKE_LSB_DISTRIBUTOR_ID STREQUAL "AstraLinuxSE") AND
|
|
|
|
(MYX_CMAKE_LSB_CODENAME STREQUAL "smolensk") AND
|
|
|
|
(MYX_CMAKE_LSB_RELEASE_VERSION STREQUAL "1.5"))
|
|
|
|
# cmake-format: on
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS ON)
|
2022-10-07 05:03:03 +00:00
|
|
|
check_enable_cxx_compiler_flag(-Wno-shadow)
|
2022-10-06 23:49:02 +00:00
|
|
|
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS ON)
|
2022-10-07 05:03:03 +00:00
|
|
|
check_enable_cxx_compiler_flag(-Wno-invalid-offsetof)
|
2022-10-06 23:49:02 +00:00
|
|
|
list(APPEND CMAKE_LIBRARY_PATH "/usr/lib/e2k-linux-gnu")
|
|
|
|
endif()
|
|
|
|
if(CMAKE_COLOR_MAKEFILE)
|
|
|
|
check_enable_cxx_compiler_flag(-fdiagnostics-color=auto)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
|
|
if(CMAKE_COLOR_MAKEFILE)
|
|
|
|
check_enable_cxx_compiler_flag(-fcolor-diagnostics)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|