cmake_minimum_required(VERSION 2.8.10)
project(StaticMode)

enable_testing()

set(CMAKE_CXX_FLAGS "-std=c++11 -Werror")

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  # using Clang
  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-unused-const-variable" )

elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  # using GCC
  SET( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic" )

elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  # using Visual Studio C++
endif()

add_subdirectory(test)
add_subdirectory(examples)

cmake_minimum_required(VERSION 2.8)
project(StaticMode)

enable_testing()

set(CMAKE_CXX_FLAGS "-std=c++11 -Werror")

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  # using Clang
  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Wno-c++98-compat -Wno-unused-const-variable" )

elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  # using GCC
  SET( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic" )

elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  # using Visual Studio C++
endif()

add_subdirectory(test)
add_subdirectory(examples)

Reduce Cmake required version to 2.8 from 2.8.10 to support Travis
Reduce Cmake required version to 2.8 from 2.8.10 to support Travis

We were using 2.8.10 because I believe that is the first version where CMAKE_CXX_COMPILER_ID was documented, although it is known to be available in earlier versions.