From 491b7775b273daf1325a1b050345dbf75b394315 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 11 Jan 2015 01:08:02 +0100 Subject: Reduce size of gperf entity table Don't store length of UTF-8 string. It can be computed by NULL-terminating strings shorter than 4 bytes and using strnlen. Use gperf's string pool option. This allows to use an 'int' index into the string pool instead of a pointer and is helpful on 64-bit systems. Shaves about 75 KB off the 32-bit binaries on Linux and 128 KB off the 64-bit binaries on OS X. --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b4a0fe8..254c065 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -124,7 +124,7 @@ if(MSVC) endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127 /wd4244 /wd4267 /wd4706 /wd4800 /D_CRT_SECURE_NO_WARNINGS") elseif(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic -D_GNU_SOURCE") endif() # Compile as C++ under MSVC -- cgit v1.2.3