diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-11 18:40:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-11 18:47:53 +0300 |
commit | bcc8c04db4a111b692660a7706757290a5f03465 (patch) | |
tree | 7ef37008099362ab2786be7482322157c27debb4 /build_files/cmake | |
parent | 98045648ab4907a9843ede70de90ef923229dacc (diff) |
Cleanup: code style & cmake
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/buildinfo.cmake | 2 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 18 | ||||
-rw-r--r-- | build_files/cmake/packaging.cmake | 6 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32_msvc.cmake | 2 |
4 files changed, 14 insertions, 14 deletions
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake index 1f0a283ba0e..a43b99f5d1e 100644 --- a/build_files/cmake/buildinfo.cmake +++ b/build_files/cmake/buildinfo.cmake @@ -56,7 +56,7 @@ if(EXISTS ${SOURCE_DIR}/.git) string(REGEX REPLACE "[\r\n]+" ";" _git_contains_branches "${_git_contains_branches}") string(REGEX REPLACE ";[ \t]+" ";" _git_contains_branches "${_git_contains_branches}") foreach(_branch ${_git_contains_branches}) - if (NOT "${_branch}" MATCHES "\\(HEAD.*") + if(NOT "${_branch}" MATCHES "\\(HEAD.*") set(MY_WC_BRANCH "${_branch}") break() endif() diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 09428953a46..f9992ee92b9 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1574,24 +1574,24 @@ macro(openmp_delayload endmacro() MACRO(WINDOWS_SIGN_TARGET target) - if (WITH_WINDOWS_CODESIGN) - if (!SIGNTOOL_EXE) + if(WITH_WINDOWS_CODESIGN) + if(!SIGNTOOL_EXE) error("Codesigning is enabled, but signtool is not found") else() - if (WINDOWS_CODESIGN_PFX_PASSWORD) + if(WINDOWS_CODESIGN_PFX_PASSWORD) set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD}) else() - if ($ENV{PFXPASSWORD}) + if($ENV{PFXPASSWORD}) set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD}) else() - message( FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.") + message(FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.") endif() endif() add_custom_command(TARGET ${target} - POST_BUILD - COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}> - VERBATIM - ) + POST_BUILD + COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}> + VERBATIM + ) endif() endif() ENDMACRO() diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake index e8621bc457a..5b894d96f95 100644 --- a/build_files/cmake/packaging.cmake +++ b/build_files/cmake/packaging.cmake @@ -40,8 +40,8 @@ unset(MY_WC_HASH) # Force Package Name execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) -if (MSVC) - if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") +if(MSVC) + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") set(PACKAGE_ARCH windows64) else() set(PACKAGE_ARCH windows32) @@ -50,7 +50,7 @@ else(MSVC) set(PACKAGE_ARCH ${CMAKE_SYSTEM_PROCESSOR}) endif() -if (CPACK_OVERRIDE_PACKAGENAME) +if(CPACK_OVERRIDE_PACKAGENAME) set(CPACK_PACKAGE_FILE_NAME ${CPACK_OVERRIDE_PACKAGENAME}-${PACKAGE_ARCH}) else() set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH}) diff --git a/build_files/cmake/platform/platform_win32_msvc.cmake b/build_files/cmake/platform/platform_win32_msvc.cmake index 45a44596e61..3ea93a96290 100644 --- a/build_files/cmake/platform/platform_win32_msvc.cmake +++ b/build_files/cmake/platform/platform_win32_msvc.cmake @@ -33,7 +33,7 @@ endmacro() macro(windows_find_package package_name ) if(WITH_WINDOWS_FIND_MODULES) - find_package( ${package_name}) + find_package(${package_name}) endif(WITH_WINDOWS_FIND_MODULES) endmacro() |