Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
d6d9bf7570 | |||
a42482170f | |||
57269a7660 | |||
62ad3b66c4 | |||
75cde136ba | |||
2132fbf6b9 | |||
c054ac8e78 | |||
e735546b2d |
5
Makefile
5
Makefile
@ -28,11 +28,12 @@ pack:
|
||||
tar acf $(BUILD_DIR)/myxx-cmake-local-$(V).tar.xz MyxxCMake
|
||||
|
||||
upload:
|
||||
# git tag -d $(V)
|
||||
git tag $(V)
|
||||
tea r c --repo cmake/myxx -t $(V) --tag $(V) \
|
||||
gitea-tea r c --repo cmake/myxx -t $(V) --tag $(V) \
|
||||
-a $(BUILD_DIR)/myxx-cmake_$(V).dsc \
|
||||
-a $(BUILD_DIR)/myxx-cmake_$(V).tar.xz \
|
||||
-a $(BUILD_DIR)/myxx-cmake_$(V)_all.deb \
|
||||
-a $(BUILD_DIR)/myxx-cmake-local-$(V).tar.xz
|
||||
git tag -d $(V)
|
||||
git push
|
||||
git push --all
|
||||
|
@ -3,7 +3,7 @@ cmake_policy(SET CMP0057 NEW) # IN_LIST operator
|
||||
|
||||
get_filename_component(MYXX_CMAKE_SOURCE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
||||
|
||||
if(NOT MyxCMake_DIR)
|
||||
if(NOT MYX_CMAKE_DIR)
|
||||
message(FATAL_ERROR "MyxxCMake library required MyxCMake to work")
|
||||
endif()
|
||||
|
||||
@ -48,28 +48,40 @@ function(myxx)
|
||||
get_target_property(__target_type ${__iter} TYPE)
|
||||
|
||||
if((NOT ${__target_type} STREQUAL "UTILITY") AND
|
||||
(NOT ${__target_type} STREQUAL "INTERFACE_LIBRARY") AND
|
||||
(NOT ${__iter} MATCHES ".*_shared$" ) AND
|
||||
(NOT ${__iter} MATCHES ".*_static$" )
|
||||
)
|
||||
myxx_code_coverage(${__iter})
|
||||
myxx_analyze_pvs_studio(${__iter})
|
||||
if(MYXX_CMAKE_CLANG_TIDY_FIX)
|
||||
myxx_analyze_clang_tidy(${__iter} FIX)
|
||||
else()
|
||||
myxx_analyze_clang_tidy(${__iter})
|
||||
endif()
|
||||
|
||||
if(MYXX_CMAKE_CLANG_TIDY_NAMING_FIX)
|
||||
myxx_analyze_clang_tidy_naming(${__iter} FIX)
|
||||
else()
|
||||
myxx_analyze_clang_tidy_naming(${__iter})
|
||||
endif()
|
||||
|
||||
if(MYXX_CMAKE_CLANG_CHECK_FIX)
|
||||
myxx_analyze_clang_check(${__iter} FIX)
|
||||
else()
|
||||
myxx_analyze_clang_check(${__iter})
|
||||
endif()
|
||||
|
||||
if(MYXX_CMAKE_CLAZY_FIX)
|
||||
myxx_analyze_clazy(${__iter} FIX)
|
||||
else()
|
||||
myxx_analyze_clazy(${__iter})
|
||||
endif()
|
||||
myxx_analyze_pvs_studio(${__iter})
|
||||
|
||||
if(NOT ${__target_type} STREQUAL "INTERFACE_LIBRARY")
|
||||
myxx_code_coverage(${__iter})
|
||||
myxx_add_sanitizers(${__iter})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endfunction(myxx)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
set(MYXX_CMAKE_PACKAGE_VERSION "2.4.32")
|
||||
set(MYXX_CMAKE_PACKAGE_VERSION "2.4.40")
|
||||
if(MYXX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
@ -39,11 +39,11 @@ function(myxx_analyze_pvs_studio TARGET_NAME)
|
||||
set(ARG_MODE "GA:1,2,3;64:1,2;OP:1,2,3;CS:1,2;OWASP:1,2")
|
||||
endif()
|
||||
|
||||
get_target_property(__target_sources ${TARGET_NAME} SOURCES)
|
||||
foreach(__iter ${__target_sources})
|
||||
string(FIND ${__iter} ${CMAKE_BINARY_DIR} __pos)
|
||||
if(__pos EQUAL -1)
|
||||
list(APPEND __filtered_sources ${__iter})
|
||||
get_target_property(target_src ${TARGET_NAME} SOURCES)
|
||||
foreach(it ${target_src})
|
||||
string(FIND ${it} ${CMAKE_BINARY_DIR} pos)
|
||||
if(pos EQUAL -1)
|
||||
list(APPEND filtered_src ${it})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@ -56,16 +56,16 @@ function(myxx_analyze_pvs_studio TARGET_NAME)
|
||||
ARGS --exclude-path ${CMAKE_CURRENT_BINARY_DIR} ${ARG_ARGS}
|
||||
MODE ${ARG_MODE})
|
||||
|
||||
get_target_property(__target_type ${TARGET_NAME} TYPE)
|
||||
if(${__target_type} STREQUAL INTERFACE_LIBRARY)
|
||||
set(__target_type INTERFACE)
|
||||
get_target_property(target_type ${TARGET_NAME} TYPE)
|
||||
if(${target_type} STREQUAL INTERFACE_LIBRARY)
|
||||
set(target_type INTERFACE)
|
||||
else()
|
||||
set(__target_type PRIVATE)
|
||||
set(target_type PRIVATE)
|
||||
endif()
|
||||
if(MSVC)
|
||||
target_compile_options(${TARGET_NAME} BEFORE ${__target_type} /FI ${ARG_HEADER})
|
||||
target_compile_options(${TARGET_NAME} BEFORE ${target_type} /FI ${ARG_HEADER})
|
||||
else() # GCC/Clang
|
||||
target_compile_options(${TARGET_NAME} BEFORE ${__target_type} -include ${ARG_HEADER})
|
||||
target_compile_options(${TARGET_NAME} BEFORE ${target_type} -include ${ARG_HEADER})
|
||||
endif()
|
||||
|
||||
add_dependencies(${TARGET_NAME}-analyze-pvs-studio ${TARGET_NAME})
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
## Установка
|
||||
|
||||
Скачать [пакет](../../../releases/download/2.4.32/myxx-cmake_2.4.32_all.deb)
|
||||
для Debian и установить его, выполнив команду `sudo dpkg -i myxx-cmake_2.4.32_all.deb`,
|
||||
или [архив](../../../releases/download/2.4.32/myxx-cmake-local-2.4.32.tar.xz)
|
||||
Скачать [пакет](../../../releases/download/2.4.40/myxx-cmake_2.4.40_all.deb)
|
||||
для Debian и установить его, выполнив команду `sudo dpkg -i myxx-cmake_2.4.40_all.deb`,
|
||||
или [архив](../../../releases/download/2.4.40/myxx-cmake-local-2.4.40.tar.xz)
|
||||
и распаковать его в каталог `$HOME/.local/share/cmake`.
|
||||
|
||||
## Использование
|
||||
|
2
debian/CMakeLists.txt
vendored
2
debian/CMakeLists.txt
vendored
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
|
||||
project(myxx-cmake VERSION 2.4.32 LANGUAGES)
|
||||
project(myxx-cmake VERSION 2.4.40 LANGUAGES)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
file(WRITE ${CMAKE_SOURCE_DIR}/MyxxCMake/MyxxCMakeConfigVersion.cmake
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
||||
myxx-cmake (2.4.32) unstable; urgency=medium
|
||||
myxx-cmake (2.4.40) unstable; urgency=medium
|
||||
|
||||
* New version.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user