From 878f1d51f5cb60c2b0582bb6d55105a4a7aa8b22 Mon Sep 17 00:00:00 2001 From: Christoph Schulz Date: Wed, 21 Aug 2019 14:02:31 +0200 Subject: [PATCH] Add ENABLE_PRECOMPILED option. You might want to disable this flag when building with Ninja. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6087e3af..dac4e352 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1080,7 +1080,8 @@ if(ZMQ_BUILD_FRAMEWORK) COMMENT "Perf tools") endif() -if(MSVC) +option(ENABLE_PRECOMPILED "Enable precompiled headers, if possible" ON) +if(MSVC AND ENABLE_PRECOMPILED) # default for all sources is to use precompiled headers foreach(source ${sources}) # C and C++ can not use the same precompiled header