Merge branch 'master' of git.246060.ru:f1x1t/cmlib
This commit is contained in:
commit
41e27fb251
@ -49,5 +49,6 @@ include(CMLibToday)
|
|||||||
include(CMLibAuxilarySymlinks)
|
include(CMLibAuxilarySymlinks)
|
||||||
include(CMLibConfigHPPGenerate)
|
include(CMLibConfigHPPGenerate)
|
||||||
include(CMLibNinjaGeneratorHelper)
|
include(CMLibNinjaGeneratorHelper)
|
||||||
|
include(CMLibExternalProject)
|
||||||
include(CMLibCPack)
|
include(CMLibCPack)
|
||||||
include(CMLibUninstall)
|
include(CMLibUninstall)
|
||||||
|
46
CMLibExternalProject.cmake
Normal file
46
CMLibExternalProject.cmake
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
include(ExternalProject)
|
||||||
|
|
||||||
|
if(CMAKE_BUILD_TYPE)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_C_COMPILER)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_C_FLAGS)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -E env "CFLAGS=${CMAKE_C_FLAGS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CPP_COMPILER)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_CPP_COMPILER=${CMAKE_CPP_COMPILER})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_FLAGS)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -E env "CXXFLAGS=${CMAKE_CXX_FLAGS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_Fortran_COMPILER)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_Fortran_FLAGS)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -E env "FFLAGS=${CMAKE_Fortran_FLAGS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_PREFIX)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_PREFIX_PATH)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(Qt5_DIR)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DQt5_DIR=${Qt5_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(Qt5Core_DIR)
|
||||||
|
list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DQt5Core_DIR=${Qt5Core_DIR})
|
||||||
|
endif()
|
||||||
|
|
@ -10,7 +10,7 @@ function(add_format_sources target)
|
|||||||
|
|
||||||
find_program(UNCRUSTIFY_EXE NAMES uncrustify)
|
find_program(UNCRUSTIFY_EXE NAMES uncrustify)
|
||||||
if(UNCRUSTIFY_EXE)
|
if(UNCRUSTIFY_EXE)
|
||||||
list(APPEND UNCRUSTIFY_OPTS -lCPP --replace --no-backup)
|
list(APPEND UNCRUSTIFY_OPTS --replace --no-backup)
|
||||||
if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg)
|
if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg)
|
||||||
list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg)
|
list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user