This commit is contained in:
Andrei Astafev 2023-09-14 14:44:47 +03:00
parent bf8d01e785
commit c04c9900c6
13 changed files with 30 additions and 39 deletions

View File

@ -53,10 +53,7 @@ include(${MYX_CMAKE_LIB_DIR}/SemanticProjectVersion.cmake)
include(${MYX_CMAKE_LIB_DIR}/NinjaGeneratorWrapper.cmake) include(${MYX_CMAKE_LIB_DIR}/NinjaGeneratorWrapper.cmake)
include(${MYX_CMAKE_LIB_DIR}/DownloadContent.cmake) include(${MYX_CMAKE_LIB_DIR}/DownloadContent.cmake)
set(MYX_CMAKE_TOOLCHAINS_DIR "${MYX_CMAKE_LIB_DIR}/toolchains")
include(${MYX_CMAKE_LIB_DIR}/Toolchains.cmake) include(${MYX_CMAKE_LIB_DIR}/Toolchains.cmake)
unset(MYX_CMAKE_TOOLCHAINS_DIR)
include(${MYX_CMAKE_LIB_DIR}/AddExecutable.cmake) include(${MYX_CMAKE_LIB_DIR}/AddExecutable.cmake)
include(${MYX_CMAKE_LIB_DIR}/AddInterfaceLibrary.cmake) include(${MYX_CMAKE_LIB_DIR}/AddInterfaceLibrary.cmake)
include(${MYX_CMAKE_LIB_DIR}/AddObjectLibrary.cmake) include(${MYX_CMAKE_LIB_DIR}/AddObjectLibrary.cmake)

View File

@ -1,4 +1,4 @@
set(MYX_CMAKE_PACKAGE_VERSION "2.4.16") set(MYX_CMAKE_PACKAGE_VERSION "2.4.17")
if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE) set(PACKAGE_VERSION_COMPATIBLE FALSE)
else() else()

View File

@ -34,23 +34,38 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
include("${MYX_CMAKE_TOOLCHAINS_DIR}/GCC.cmake") if(CMAKE_COLOR_MAKEFILE)
check_enable_cxx_compiler_flag(-fdiagnostics-color=auto)
endif()
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
include("${MYX_CMAKE_TOOLCHAINS_DIR}/Clang.cmake") if(CMAKE_COLOR_MAKEFILE)
check_enable_cxx_compiler_flag(-fcolor-diagnostics)
endif()
endif() endif()
if((MYX_CMAKE_LSB_DISTRIBUTOR_ID STREQUAL "AstraLinuxSE") AND if((MYX_CMAKE_LSB_DISTRIBUTOR_ID STREQUAL "AstraLinuxSE") AND
(MYX_CMAKE_LSB_CODENAME STREQUAL "smolensk") AND (MYX_CMAKE_LSB_CODENAME STREQUAL "smolensk") AND
(MYX_CMAKE_LSB_RELEASE_VERSION STREQUAL "1.5")) (MYX_CMAKE_LSB_RELEASE_VERSION STREQUAL "1.5"))
include("${MYX_CMAKE_TOOLCHAINS_DIR}/AstraLinuxSE-1.5.cmake") find_program(CMAKE_AR NAMES "/usr/bin/x86_64-linux-gnu-gcc-ar-4.7")
return() find_program(CMAKE_NM NAMES "/usr/bin/x86_64-linux-gnu-gcc-nm-4.7")
find_program(CMAKE_RANLIB NAMES "/usr/bin/x86_64-linux-gnu-gcc-ranlib-4.7")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS ON)
check_enable_cxx_compiler_flag(-Wno-shadow)
endif() endif()
if((MYX_CMAKE_LSB_DISTRIBUTOR_ID STREQUAL "ElbrusD") AND if((MYX_CMAKE_LSB_DISTRIBUTOR_ID STREQUAL "ElbrusD") AND
(MYX_CMAKE_LSB_CODENAME STREQUAL "Jessie") AND (MYX_CMAKE_LSB_CODENAME STREQUAL "Jessie") AND
(MYX_CMAKE_LSB_RELEASE_VERSION VERSION_GREATER "1.4")) (MYX_CMAKE_LSB_RELEASE_VERSION VERSION_GREATER "1.4"))
include("${MYX_CMAKE_TOOLCHAINS_DIR}/ElbrusD-1.4.cmake") find_program(CMAKE_AR NAMES "/usr/${CMAKE_SYSTEM_PROCESSOR}-linux/bin/ar")
return() find_program(CMAKE_NM NAMES "/usr/${CMAKE_SYSTEM_PROCESSOR}-linux/bin/nm")
find_program(CMAKE_RANLIB NAMES "/usr/${CMAKE_SYSTEM_PROCESSOR}-linux/bin/ranlib")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS ON)
check_enable_cxx_compiler_flag(-Wno-invalid-offsetof)
list(APPEND CMAKE_LIBRARY_PATH "/usr/lib/e2k-linux-gnu")
endif() endif()

View File

@ -1,8 +0,0 @@
find_program(CMAKE_AR NAMES "/usr/bin/x86_64-linux-gnu-gcc-ar-4.7")
find_program(CMAKE_NM NAMES "/usr/bin/x86_64-linux-gnu-gcc-nm-4.7")
find_program(CMAKE_RANLIB NAMES "/usr/bin/x86_64-linux-gnu-gcc-ranlib-4.7")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS ON)
check_enable_cxx_compiler_flag(-Wno-shadow)

View File

@ -1,3 +0,0 @@
if(CMAKE_COLOR_MAKEFILE)
check_enable_cxx_compiler_flag(-fcolor-diagnostics)
endif()

View File

@ -1,9 +0,0 @@
find_program(CMAKE_AR NAMES "/usr/${CMAKE_SYSTEM_PROCESSOR}-linux/bin/ar")
find_program(CMAKE_NM NAMES "/usr/${CMAKE_SYSTEM_PROCESSOR}-linux/bin/nm")
find_program(CMAKE_RANLIB NAMES "/usr/${CMAKE_SYSTEM_PROCESSOR}-linux/bin/ranlib")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS ON)
check_enable_cxx_compiler_flag(-Wno-invalid-offsetof)
list(APPEND CMAKE_LIBRARY_PATH "/usr/lib/e2k-linux-gnu")

View File

@ -1,3 +0,0 @@
if(CMAKE_COLOR_MAKEFILE)
check_enable_cxx_compiler_flag(-fdiagnostics-color=auto)
endif()

View File

@ -3,7 +3,7 @@
## Установка ## Установка
В корневом каталоге проекта создать каталог `cmake` и распаковать в него В корневом каталоге проекта создать каталог `cmake` и распаковать в него
[архив](../../../releases/download/2.4.16/myx-cmake-local-2.4.16.tar.xz ). [архив](../../../releases/download/2.4.17/myx-cmake-local-2.4.17.tar.xz ).
## Использование ## Использование

View File

@ -1 +1 @@
2.4.16 2.4.17

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.6 FATAL_ERROR) cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(myx-cmake VERSION 2.4.16 LANGUAGES) project(myx-cmake VERSION 2.4.17 LANGUAGES)
include(GNUInstallDirs) include(GNUInstallDirs)
file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
myx-cmake (2.4.16) unstable; urgency=medium myx-cmake (2.4.17) unstable; urgency=medium
* New version. * New version.

View File

@ -36,3 +36,5 @@ with open(D2 + '/MyxCMakeConfig.cmake', encoding='utf-8') as f:
os.remove(fname) os.remove(fname)
else: else:
print(line) print(line)
os.rmdir(D2 + '/lib/macro')

View File

@ -20,11 +20,11 @@ if(ENV{MYX_CMAKE_DIR})
set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR}) set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR})
endif() endif()
if(MYX_CMAKE_DIR) if(MYX_CMAKE_DIR)
find_package(MyxCMake 2.4.16 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH) find_package(MyxCMake 2.4.17 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH)
myx_message_notice("== MyxCMake directory: ${MyxCMake_CONFIG} ==") myx_message_notice("== MyxCMake directory: ${MyxCMake_CONFIG} ==")
else() else()
if(MYX_CMAKE_USE_SYSTEM) if(MYX_CMAKE_USE_SYSTEM)
find_package(MyxCMake 2.4.16 REQUIRED) find_package(MyxCMake 2.4.17 REQUIRED)
myx_message_notice("== MyxCMake directory: ${MyxCMake_CONFIG} ==") myx_message_notice("== MyxCMake directory: ${MyxCMake_CONFIG} ==")
else() else()
include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake) include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake)