2014-09-18 14:26:55 +04:00
|
|
|
# (c) 2014 Copyright ownCloud, Inc.
|
|
|
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
|
|
# For details see the accompanying COPYING* file.
|
|
|
|
|
2015-02-17 19:27:32 +03:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
|
|
|
|
2013-08-07 14:36:45 +04:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
|
|
|
OUTPUT_VARIABLE GCC_VERSION)
|
|
|
|
if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
2015-02-17 19:27:32 +03:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
|
2013-08-07 14:36:45 +04:00
|
|
|
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
2015-02-17 19:27:32 +03:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
2013-08-07 14:36:45 +04:00
|
|
|
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
|
2015-02-17 19:27:32 +03:00
|
|
|
else()
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
2013-08-07 14:36:45 +04:00
|
|
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
|
|
|
if(DEFINED MIRALL_FATAL_WARNINGS)
|
2015-02-17 19:27:32 +03:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
2013-08-07 14:36:45 +04:00
|
|
|
endif(DEFINED MIRALL_FATAL_WARNINGS)
|