From 53379dfd0c555ed811bc0afd79439211c7be03ef Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 17 Mar 2019 10:50:19 -0700 Subject: [PATCH] Don't set CMAKE_BUILD_TYPE if fmt is a subproject (#1081) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c3e9773..1e24afd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ endfunction() # Set the default CMAKE_BUILD_TYPE to Release. # This should be done before the project command since the latter can set # CMAKE_BUILD_TYPE itself (it does so for nmake). -if (NOT CMAKE_BUILD_TYPE) +if (MASTER_PROJECT AND NOT CMAKE_BUILD_TYPE) join(doc "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or " "CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") set(CMAKE_BUILD_TYPE Release CACHE STRING ${doc})