Skip to content

Commit

Permalink
Move global CMake flags to be used only when building tests (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Milerius authored and doom committed Jul 27, 2019
1 parent a87127d commit bacdc52
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 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(strong_type)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpadded -O3")

set(STRONG_TYPE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/include/st/is_strong_type.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/st/unwrap.hpp
Expand All @@ -22,6 +18,8 @@ target_include_directories(strong_type INTERFACE include)
option(STRONG_TYPE_BUILD_TESTS "Build tests of the strong_type library" OFF)

if (STRONG_TYPE_BUILD_TESTS)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpadded -O3")
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()

Expand Down

0 comments on commit bacdc52

Please sign in to comment.