diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/mingw-w64.cmake | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake index 3057625d..8042881f 100644 --- a/cmake/mingw-w64.cmake +++ b/cmake/mingw-w64.cmake @@ -38,15 +38,15 @@ set(cpu "-O3 -march=pentium4 -mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx - set(lto "-flto -fuse-linker-plugin -flto-compression-level=3 -fno-fat-lto-objects -flto-partition=balanced -fipa-pta") set(_CFLAGS " -fvisibility=hidden ") -set(_CXXFLAGS " ${_CFLAGS} ") -set(_CFLAGS_RELEASE " -s ${cpu} ${fpu} ${lto} ") +set(_CXXFLAGS "${_CFLAGS}") +set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto}") set(_CFLAGS_DEBUG "-g -ggdb") -set(_CXXFLAGS_RELEASE " ${_CFLAGS_RELEASE}") -set(_CXXFLAGS_DEBUG " ${_CFLAGS_DEBUG} ") +set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}") +set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}") -set(_LDFLAGS " -Wl,--as-needed ${_CXXFLAGS} ") -set(_LDFLAGS_RELEASE " ${_CXXFLAGS_RELEASE} ") -set(_LDFLAGS_DEBUG " ${_CXXFLAGS_DEBUG} ") +set(_LDFLAGS "-Wl,--as-needed") +set(_LDFLAGS_RELEASE "") +set(_LDFLAGS_DEBUG "") set(WARNINGS_ENABLE TRUE CACHE BOOL "Emit additional warnings at compile-time") # these are very noisy, high false positive rate. only for development. @@ -86,15 +86,15 @@ endif() foreach(j C CXX) foreach(i _DEBUG _RELEASE) set(OVERRIDE_${j}_FLAGS${i} "" CACHE STRING "") - set(CMAKE_${j}_FLAGS${i} " ${_${j}FLAGS${i}} ${OVERRIDE_${j}_FLAGS${i}} " CACHE STRING "" FORCE) + set(CMAKE_${j}_FLAGS${i} "${_${j}FLAGS${i}} ${OVERRIDE_${j}_FLAGS${i}}" CACHE STRING "" FORCE) endforeach() - set(CMAKE_${j}_FLAGS " ${_${j}FLAGS} ${_${j}_WARNS} ${OVERRIDE_${j}_FLAGS} " CACHE STRING "" FORCE) + set(CMAKE_${j}_FLAGS "${_${j}FLAGS} ${_${j}_WARNS} ${OVERRIDE_${j}_FLAGS}" CACHE STRING "" FORCE) endforeach() foreach(j "" _DEBUG _RELEASE) foreach(i MODULE EXE SHARED) set(OVERRIDE_LDFLAGS${j} "" CACHE STRING "") - set(CMAKE_${i}_LINKER_FLAGS${j} " ${_LDFLAGS${j}} ${OVERRIDE_LDFLAGS${j}} " CACHE STRING "" FORCE) + set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${OVERRIDE_LDFLAGS${j}}" CACHE STRING "" FORCE) endforeach() endforeach() |