diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-05-18 11:05:23 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-05-18 13:00:49 +0000 |
commit | 21321fcbbdb0c5ec3b4109aabbee038333fb4dc5 (patch) | |
tree | f94e89828391c307d0d97a41a10f19061c8dc96d | |
parent | 1f952df44a86efaaf5025403f388f9d2f018bd17 (diff) | |
download | mariadb-git-21321fcbbdb0c5ec3b4109aabbee038333fb4dc5.tar.gz |
Windows : small cmake cleanup
Use STRING(APPEND VAR...) rather than SET(VAR "${VAR} ..."), it is shorter
-rw-r--r-- | cmake/os/Windows.cmake | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index e61669b991b..863085e93b7 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -201,25 +201,25 @@ IF(MSVC) # Mark 32 bit executables large address aware so they can # use > 2GB address space IF(CMAKE_SIZEOF_VOID_P MATCHES 4) - SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") + STRING(APPEND CMAKE_EXE_LINKER_FLAGS " /LARGEADDRESSAWARE") ENDIF() # Speed up multiprocessor build IF (NOT CLANG_CL) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") + STRING(APPEND CMAKE_C_FLAGS " /MP") + STRING(APPEND CMAKE_CXX_FLAGS " /MP") ENDIF() #TODO: update the code and remove the disabled warnings - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /we4700 /we4311 /we4477 /we4302 /we4090") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4099 /we4700 /we4311 /we4477 /we4302 /we4090") + STRING(APPEND CMAKE_C_FLAGS " /we4700 /we4311 /we4477 /we4302 /we4090") + STRING(APPEND CMAKE_CXX_FLAGS " /we4099 /we4700 /we4311 /we4477 /we4302 /we4090") IF(MSVC_VERSION GREATER 1910 AND NOT CLANG_CL) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-") + STRING(APPEND CMAKE_CXX_FLAGS " /permissive-") ENDIF() ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS) IF(MYSQL_MAINTAINER_MODE MATCHES "ERR") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + STRING(APPEND CMAKE_C_FLAGS " /WX") + STRING(APPEND CMAKE_CXX_FLAGS " /WX") FOREACH(type EXE SHARED MODULE) FOREACH(cfg RELEASE DEBUG RELWITHDEBINFO) SET(CMAKE_${type}_LINKER_FLAGS_${cfg} "${CMAKE_${type}_LINKER_FLAGS_${cfg}} /WX") @@ -229,9 +229,9 @@ IF(MSVC) IF(MSVC_VERSION LESS 1910) # Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning), # removed in VS2017 - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800") + STRING(APPEND CMAKE_CXX_FLAGS " /wd4800") ELSEIF (NOT CLANG_CL) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2OptimizeHugeFunctions") + STRING(APPEND CMAKE_CXX_FLAGS " /d2OptimizeHugeFunctions") ENDIF() ENDIF() |