2.0.5
This commit is contained in:
parent
432a1a85e6
commit
f0203307c4
@ -1,4 +1,4 @@
|
||||
set(MYX_CMAKE_PACKAGE_VERSION "2.0.4")
|
||||
set(MYX_CMAKE_PACKAGE_VERSION "2.0.5")
|
||||
if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
@ -8,10 +8,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# cmake-format: on
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_EXTENSIONS ON)
|
||||
check_enable_cxx_compiler_flag(-Wno-shadow)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "e2k")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_CXX_EXTENSIONS ON)
|
||||
add_compile_options(-Wno-invalid-offsetof)
|
||||
check_enable_cxx_compiler_flag(-Wno-invalid-offsetof)
|
||||
list(APPEND CMAKE_LIBRARY_PATH "/usr/lib/e2k-linux-gnu")
|
||||
endif()
|
||||
if(CMAKE_COLOR_MAKEFILE)
|
||||
@ -25,21 +26,3 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(MYX_CMAKE_WARNINGS_NORMAL "Normal level" ON)
|
||||
cmake_dependent_option(MYX_CMAKE_WARNINGS_VERBOSE "Verbose level" OFF "MYX_CMAKE_WARNINGS_NORMAL" OFF)
|
||||
|
||||
if(MYX_CMAKE_WARNINGS_NORMAL)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
|
||||
check_enable_cxx_compiler_flag(-Wall)
|
||||
check_enable_cxx_compiler_flag(-Wextra)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MYX_CMAKE_WARNINGS_VERBOSE)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
|
||||
check_enable_cxx_compiler_flag(-Wpedantic)
|
||||
check_enable_cxx_compiler_flag(-Wnoexcept)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -10,16 +10,19 @@ macro(check_enable_cxx_compiler_flag flag)
|
||||
set(multiValueArgs)
|
||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
set(cmake_required_quiet TRUE)
|
||||
set(CMAKE_REQUIRED_QUIET TRUE)
|
||||
check_cxx_compiler_flag("${flag}" check_cxx_flag)
|
||||
unset(cmake_required_quiet)
|
||||
unset(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
if(check_cxx_flag)
|
||||
myx_message_notice("'${flag}': flag is supported.")
|
||||
if(ARG_TARGET)
|
||||
target_compile_options(${ARG_TARGET} PUBLIC ${flag})
|
||||
else()
|
||||
add_compile_options(${flag})
|
||||
endif()
|
||||
else()
|
||||
myx_message_status("'${flag}': flag is NOT supported.")
|
||||
endif()
|
||||
|
||||
unset(check_cxx_flag CACHE)
|
||||
|
@ -3,7 +3,7 @@
|
||||
## Установка
|
||||
|
||||
В корневом каталоге проекта создать каталог `cmake` и распаковать в него
|
||||
[архив](../../../releases/download/2.0.4/myx-cmake-local-2.0.4.tar.xz ).
|
||||
[архив](../../../releases/download/2.0.5/myx-cmake-local-2.0.5.tar.xz ).
|
||||
|
||||
## Использование
|
||||
|
||||
|
2
debian/CMakeLists.txt
vendored
2
debian/CMakeLists.txt
vendored
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
|
||||
project(myx-cmake VERSION 2.0.4 LANGUAGES)
|
||||
project(myx-cmake VERSION 2.0.5 LANGUAGES)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
myx-cmake (2.0.4) unstable; urgency=medium
|
||||
myx-cmake (2.0.5) unstable; urgency=medium
|
||||
|
||||
* New version.
|
||||
|
||||
|
@ -20,11 +20,11 @@ if(ENV{MYX_CMAKE_DIR})
|
||||
set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR})
|
||||
endif()
|
||||
if(MYX_CMAKE_DIR)
|
||||
find_package(MyxCMake 2.0.4 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH)
|
||||
find_package(MyxCMake 2.0.5 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH)
|
||||
myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===")
|
||||
else()
|
||||
if(MYX_CMAKE_USE_SYSTEM)
|
||||
find_package(MyxCMake 2.0.4 REQUIRED)
|
||||
find_package(MyxCMake 2.0.5 REQUIRED)
|
||||
myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===")
|
||||
else()
|
||||
include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake)
|
||||
|
Loading…
Reference in New Issue
Block a user