Skip to content

Commit

Permalink
cmake unified if conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Jun 5, 2022
1 parent d59a594 commit 717613e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions cmake/CommonModules/TinyHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ upgrade the GCC compiler")
endif()
endif()

if(NOT MSVC AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
if(NOT MSVC AND
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS TINY_CLANG)
message(STATUS "Minimum recommended Clang version was not satisfied, \
Expand Down
6 changes: 3 additions & 3 deletions cmake/CommonModules/TinyMsvcParallel.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Allow per-translation-unit parallel builds when using MSVC
function(tiny_msvc_parallel desc)

if(CMAKE_GENERATOR MATCHES "Visual Studio"
AND (CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel"
OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC|Intel")
if(CMAKE_GENERATOR MATCHES "Visual Studio" AND
(CMAKE_C_COMPILER_ID MATCHES "MSVC|Intel" OR
CMAKE_CXX_COMPILER_ID MATCHES "MSVC|Intel")
)
set(MSVC_PARALLEL ON CACHE STRING "${desc}")

Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/TinyInitDefaultVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ DESTINATION is encountered")
# set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)

# Fix install prefix for the MinGW and x64 toolchain
if(CMAKE_SYSTEM_NAME STREQUAL "Windows"
AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
)
get_property(help_string CACHE CMAKE_INSTALL_PREFIX PROPERTY HELPSTRING)
if(NOT help_string)
Expand Down

0 comments on commit 717613e

Please sign in to comment.