From a4c74da8884657b6438beb22ec3a146c087cce79 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 8 Jun 2016 12:53:04 +0200 Subject: cmake: fix mingw-w64 toolchain cflags override --- cmake/mingw-w64.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmake') diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake index 657d7bb1..a7add16d 100644 --- a/cmake/mingw-w64.cmake +++ b/cmake/mingw-w64.cmake @@ -37,8 +37,8 @@ set(lto "-flto -fuse-linker-plugin") set(_CFLAGS " -fvisibility=hidden ") set(_CXXFLAGS " ${_CFLAGS} ") set(_CFLAGS_RELEASE " -s ${cpu} ${fpu} ${lto} ") -set(_CFLAGS_DEBUG "-g -ggdb ${cpu} ${fpu} ") -set(_CXXFLAGS_RELEASE " ${_CFLAGS_RELEASE} ") +set(_CFLAGS_DEBUG "-g -ggdb") +set(_CXXFLAGS_RELEASE " ${_CFLAGS_RELEASE}") set(_CXXFLAGS_DEBUG " ${_CFLAGS_DEBUG} ") set(_LDFLAGS " -Wl,--as-needed ${_CXXFLAGS} ") @@ -80,12 +80,13 @@ endif() foreach(j C CXX) foreach(i "" _DEBUG _RELEASE) + set(OVERRIDE_${j}_FLAGS${i} "" CACHE STRING "") set(CMAKE_${j}_FLAGS${i} " ${_${j}FLAGS${i}} ${_${j}_WARNS} ${OVERRIDE_${j}_FLAGS${i}} " CACHE STRING "" FORCE) endforeach() endforeach() foreach (i "" _DEBUG _RELEASE) - set(CMAKE_CXX_FLAGS${i} " ${CMAKE_CXX_FLAGS${i}} ${OVERRIDE_C_FLAGS${i}} " CACHE STRING "" FORCE) + set(CMAKE_CXX_FLAGS${i} " ${CMAKE_CXX_FLAGS${i}} " CACHE STRING "" FORCE) endforeach() foreach(j "" _DEBUG _RELEASE) -- cgit v1.2.3