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