--- CMakeLists.txt.orig 2010-12-01 22:29:50.000000000 +0100 +++ CMakeLists.txt 2010-12-01 22:30:29.000000000 +0100 @@ -70,7 +70,7 @@ "${CMAKE_C_FLAGS} -fPIC -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes") SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g") - SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized") + SET(CMAKE_C_FLAGS_RELEASE "$ENV{OPTFLAGS} -Wuninitialized") ENDIF (WIN32)