yaml-cpp

FORK: A YAML parser and emitter in C++
git clone https://git.neptards.moe/neptards/yaml-cpp.git
Log | Files | Refs | README | LICENSE

CMakeLists.txt (887B)


      1 # Note: CMake support is community-based. The maintainers do not use CMake
      2 # internally.
      3 
      4 cmake_minimum_required(VERSION 2.8.8)
      5 
      6 if (POLICY CMP0048)
      7   cmake_policy(SET CMP0048 NEW)
      8 endif (POLICY CMP0048)
      9 
     10 project(googletest-distribution)
     11 set(GOOGLETEST_VERSION 1.10.0)
     12 
     13 if (CMAKE_VERSION VERSION_LESS "3.1")
     14   add_definitions(-std=c++11)
     15 else()
     16   set(CMAKE_CXX_STANDARD 11)
     17   set(CMAKE_CXX_STANDARD_REQUIRED ON)
     18   if(NOT CYGWIN)
     19     set(CMAKE_CXX_EXTENSIONS OFF)
     20   endif()
     21 endif()
     22 
     23 enable_testing()
     24 
     25 include(CMakeDependentOption)
     26 include(GNUInstallDirs)
     27 
     28 #Note that googlemock target already builds googletest
     29 option(BUILD_GMOCK "Builds the googlemock subproject" ON)
     30 option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
     31 
     32 if(BUILD_GMOCK)
     33   add_subdirectory( googlemock )
     34 else()
     35   add_subdirectory( googletest )
     36 endif()