From 5c90828e4e189e78fce1d93bf1700519e7aff76c Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 23 Jul 2020 10:21:40 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=8F=D0=B2=D0=BD=D0=BE=D0=B5=20=D1=83=D0=BA=D0=B0=D0=B7=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=8F=D0=B7=D1=8B=D0=BA=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=B8=D1=81?= =?UTF-8?q?=D1=85=D0=BE=D0=B4=D0=BD=D1=8B=D1=85=20=D1=82=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibFormatSources.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMLibFormatSources.cmake b/CMLibFormatSources.cmake index 0a80e14..6c4a3c0 100644 --- a/CMLibFormatSources.cmake +++ b/CMLibFormatSources.cmake @@ -10,7 +10,7 @@ function(add_format_sources target) find_program(UNCRUSTIFY_EXE NAMES uncrustify) 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) list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg) endif() From e3600e96ce859625abbcbcede84c81ca3c3da765 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 3 Aug 2020 15:16:10 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B0=D1=87?= =?UTF-8?q?=D0=B0=20=D0=B0=D1=80=D0=B3=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B2=D0=BE=20=D0=B2=D0=BD=D0=B5=D1=88=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D1=8B=20(=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20CMLIB?= =?UTF-8?q?=5FEXT=5FPROJ=5FDEFAULT=5FARGS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCommon.cmake | 1 + CMLibExternalProject.cmake | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 CMLibExternalProject.cmake diff --git a/CMLibCommon.cmake b/CMLibCommon.cmake index 8e5ec18..f460e4e 100644 --- a/CMLibCommon.cmake +++ b/CMLibCommon.cmake @@ -49,5 +49,6 @@ include(CMLibToday) include(CMLibAuxilarySymlinks) include(CMLibConfigHPPGenerate) include(CMLibNinjaGeneratorHelper) +include(CMLibExternalProject) include(CMLibCPack) include(CMLibUninstall) diff --git a/CMLibExternalProject.cmake b/CMLibExternalProject.cmake new file mode 100644 index 0000000..0dcaaee --- /dev/null +++ b/CMLibExternalProject.cmake @@ -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() +