Fix problems with USE_CXX11

This commit is contained in:
sfan5 2014-12-20 12:31:39 +01:00
parent 1c47825d70
commit 20b340e2ee
1 changed files with 6 additions and 4 deletions

View File

@ -14,13 +14,15 @@ endif()
option(USE_CXX11 "Use C++11" FALSE)
if(USE_CXX11)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -std=c++11 -Wall -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2 -std=c++11 -Wall -Wextra")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(USE_CXX11 1) # We use this in config.h, it needs to be a valid value
else(USE_CXX11)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2 -Wall -Wextra")
set(USE_CXX11 0)
endif(USE_CXX11)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2 -Wall")
# Find libgd
find_library(LIBGD_LIBRARY gd)
find_path(LIBGD_INCLUDE_DIR gd.h)