From fb5b69cdece41a6aff4dba92a8aa2970990345f2 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sun, 29 Jan 2017 19:01:10 +0000 Subject: [PATCH] Force BOOST_PP_VARIADIC for clang Current clang has full support for all variadic macro feature required by Boost.Preprocessor. However, older Boost turned off variadic feature for clang by default, probably because clang was broken at that time. It should be safe to turn it on now. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index eeac7d5bb..7515b8ac5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,13 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) endif() endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) +if(CMAKE_COMPILER_IS_CLANGXX) + # older boost.preprocessor turn off variadics for clang + add_definitions(-DBOOST_PP_VARIADICS=1) + message(STATUS "Force BOOST_PP_VARIADICS=1 for clang") +endif() + + # ================================================================================ # Output directories for install target