Skip to content

Commit

Permalink
Move global CMake settings into the testing scope (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Milerius authored and doom committed Apr 24, 2019
1 parent 2ac59d5 commit 34bd3e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.9)

project(meta)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_FLAGS "-Wall -Wextra")

set(META_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/include/meta/sequence/details/drop_helper.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/meta/sequence/details/flatten_helper.hpp
Expand Down Expand Up @@ -72,6 +68,9 @@ target_include_directories(doom_meta INTERFACE include)
option(META_BUILD_TESTS "Build tests of the meta library" OFF)

if (META_BUILD_TESTS)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Wextra")

find_package(GTest REQUIRED)

add_executable(doom_meta-tests
Expand Down

0 comments on commit 34bd3e3

Please sign in to comment.