aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-01-02 19:39:03 +0000
committerHoward Chu <hyc@symas.com>2016-01-02 21:53:02 +0000
commit26aac680951ccb761bf27237e82fff560785d4be (patch)
tree66ae1d9cb0e599af3cc94d99655baaaae6102a2d
parentIP_TOS not supported before Windows7 (diff)
downloadmonero-26aac680951ccb761bf27237e82fff560785d4be.tar.xz
Fix release flags
flags were being accumulated instead of being set. Win32 was getting -O2 -DNDEBUG -Ofast -DNDEBUG etc... Also for Win32, stay compatible to WinXP
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09cd54774..fed936344 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,9 @@ endif()
if(WIN32 OR ARM7 OR ARM6)
set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
+else()
+ set(CMAKE_C_FLAGS_RELEASE "-Ofast -DNDEBUG -Wno-unused-variable")
+ set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -DNDEBUG -Wno-unused-variable")
endif()
# set this to 0 if per-block checkpoint needs to be disabled
@@ -310,6 +313,9 @@ else()
# mingw doesn't support LTO (multiple definition errors at link time)
set(USE_LTO_DEFAULT false)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,10485760")
+ if(NOT BUILD_64)
+ add_definitions(-DWINVER=0x0501 -D_WIN32_WINNT=0x0501)
+ endif()
endif()
set(C_WARNINGS "-Waggregate-return -Wnested-externs -Wold-style-definition -Wstrict-prototypes")
set(CXX_WARNINGS "-Wno-reorder -Wno-missing-field-initializers")
@@ -353,8 +359,6 @@ else()
set(DEBUG_FLAGS "-g3 -O0")
endif()
- set(RELEASE_FLAGS "-Ofast -DNDEBUG -Wno-unused-variable")
-
if(NOT DEFINED USE_LTO_DEFAULT)
set(USE_LTO_DEFAULT true)
endif()