add support for CFLAGS and CXXFLAGS; fixes #1

This commit is contained in:
Radovan Bast
2015-06-10 15:25:24 +02:00
parent eeaceefca5
commit a21201b1b9
17 changed files with 143 additions and 55 deletions

View File

@ -1,5 +1,7 @@
if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-O3 -Wno-unused")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
if(NOT DEFINED ENV{CFLAGS})
if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
endif()
endif()