From 76d627aecb43008670a6dece4f9fc5a10b6285fe Mon Sep 17 00:00:00 2001 From: odygrd Date: Sat, 11 Apr 2020 17:09:25 +0100 Subject: [PATCH] Add QUILL_VERBOSE_MAKEFILE as a CMake option --- CHANGELOG.md | 1 + CMakeLists.txt | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 417e4e1a..1e97d962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Daily file handler. The file handler rollover every 24 hours * Rotating file handler. The file handler will rollover based on the size of the file * MinGW compatibility +* Added a CMake option `QUILL_VERBOSE_MAKEFILE`. Building Quill as a master project now defaults to non verbose makefile output unless `-DQUILL_VERBOSE_MAKEFILE=ON` is passed to CMake. ## v1.0.0 Initial release diff --git a/CMakeLists.txt b/CMakeLists.txt index 4117d559..9d6cb96f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,13 +61,6 @@ if (NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif () -#--------------------------------------------------------------------------------------- -# Always verbose make file -#--------------------------------------------------------------------------------------- -if (QUILL_MASTER_PROJECT) - set(CMAKE_VERBOSE_MAKEFILE TRUE CACHE BOOL "Verbose output" FORCE) -endif () - #------------------------------------------------------------------------------------------------------- # Required Packages #------------------------------------------------------------------------------------------------------- @@ -97,10 +90,19 @@ endif () # Log Info #------------------------------------------------------------------------------------------------------- if (QUILL_MASTER_PROJECT) + option(QUILL_VERBOSE_MAKEFILE "Verbose make output" OFF) + message(STATUS "Build Type: " ${CMAKE_BUILD_TYPE}) message(STATUS "Quill Version: ${QUILL_VERSION}") endif () +#--------------------------------------------------------------------------------------- +# Verbose make file option +#--------------------------------------------------------------------------------------- +if (QUILL_VERBOSE_MAKEFILE) + set(CMAKE_VERBOSE_MAKEFILE TRUE CACHE BOOL "Verbose output" FORCE) +endif () + #------------------------------------------------------------------------------------------------------- # Additional Compiler Options #-------------------------------------------------------------------------------------------------------