authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-01 15:26:01-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-02-01 15:26:01-07:00
logc7eb8aaec566588048965e3ebecb1bb792656427
tree66bd1b6471a39d4a96707046ab368e1e4a6175b5
parent108af28c1bcac4b082f25dd4cdcf578091b99616

build: fix release mode


2 files changed, 8 insertions(+), 5 deletions(-)

.gitignore+1
......@@ -1 +1,2 @@
11build/
2build-release/
CMakeLists.txt+7-5
......@@ -1,7 +1,9 @@
1cmake_minimum_required(VERSION 2.8)
1cmake_minimum_required(VERSION 2.8.5)
22
3set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
4 "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
3if(NOT CMAKE_BUILD_TYPE)
4 set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
5 "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
6endif()
57
68project(zig CXX)
79set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
......@@ -142,9 +144,9 @@ include_directories(
142144 "${CMAKE_SOURCE_DIR}/src"
143145)
144146
145set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wno-unused-variable -Wno-unused-but-set-variable")
147set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -Wall -pedantic")
146148
147set(EXE_CFLAGS "-std=c++11 -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Werror -Wall -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes")
149set(EXE_CFLAGS "-std=c++11 -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes")
148150
149151add_executable(zig ${ZIG_SOURCES})
150152set_target_properties(zig PROPERTIES