Don't set CMAKE_BUILD_TYPE if fmt is a subproject (#1081)

This commit is contained in:
Victor Zverovich committed 2019-03-17 10:50:40 -07:00
1 parent 76d326a2a2
commit 53379dfd0c
1 file changed
+1 -1
+1 -1
View File
@@ -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})