summaryrefslogtreecommitdiffhomepage
path: root/cmake/mingw-w64.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-08 12:53:04 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-09 10:49:54 +0200
commita4c74da8884657b6438beb22ec3a146c087cce79 (patch)
tree6ad0bbf98d39a33eed0b8956286c763907f8b56d /cmake/mingw-w64.cmake
parentcd6ddb9f572dc9cc0a60b43c1c327709311c072e (diff)
cmake: fix mingw-w64 toolchain cflags override
Diffstat (limited to 'cmake/mingw-w64.cmake')
-rw-r--r--cmake/mingw-w64.cmake7
1 files changed, 4 insertions, 3 deletions
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)