mirror of https://github.com/google/snappy.git
Allow build with different standard if lib used as a subproject
This commit is contained in:
parent
e9e11b84e6
commit
38945971d6
|
@ -1,10 +1,13 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
project(Snappy VERSION 1.1.7 LANGUAGES C CXX)
|
project(Snappy VERSION 1.1.7 LANGUAGES C CXX)
|
||||||
|
|
||||||
# This project requires C++11.
|
# Allow build with different standard
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
if(NOT CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
# This project requires C++11.
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
# BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
|
||||||
# it prominent in the GUI.
|
# it prominent in the GUI.
|
||||||
|
|
Loading…
Reference in New Issue