From 75005bbcd549d2659a3f5fc9144ecdaa84c06253 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 27 Jan 2018 09:18:20 -0800 Subject: [PATCH] Don't export the -std=c++11 flag from the fmt target --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8239401a..177f1e0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,8 @@ if (FMT_CPPFORMAT) endif () # Starting with CMake 3.1 the CXX_STANDARD property can be used instead. -target_compile_options(fmt PUBLIC ${CPP14_FLAG}) +# Don't export -std since it may break projects that use other standards. +target_compile_options(fmt PRIVATE ${CPP14_FLAG}) if (FMT_PEDANTIC) target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif ()