Merge pull request #3636 from schulzch/cmake-precompiled

[CMake] Add ENABLE_PRECOMPILED option
This commit is contained in:
Luca Boccassi 2019-08-21 13:32:15 +01:00 committed by GitHub
commit 56ace6d03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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