From c89390f0f5a17370627d0e856f906e8e9c7984e4 Mon Sep 17 00:00:00 2001 From: serg06 Date: Sun, 24 May 2020 18:15:23 -0400 Subject: [PATCH] Make including Clang optional I include libzmq in my cmake project, and I don't want clang-related targets popping up in Visual Studio's solution explorer. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56059582..ab864994 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1751,7 +1751,10 @@ if(MSVC_VERSION EQUAL 1600) endif() # this cannot be moved, as it does not only contain function/macro definitions -include(ClangFormat) +option(ENABLE_CLANG "Include Clang" ON) +if (ENABLE_CLANG) + include(ClangFormat) +endif() # fixes https://github.com/zeromq/libzmq/issues/3776 The problem is, both libzmq-static libzmq try to use/generate # precompiled.pch at the same time Add a dependency, so they run in order and so they dont get in each others way TODO