Open jo71 opened 7 years ago
Boost libraries has it's own mechanism for the libraries and includes extraction: https://stackoverflow.com/questions/5306745/getting-only-necessary-headers-out-of-boost
If you take a look at the bcp
sources, you can figure out how it finds the includes (https://svn.boost.org/svn/boost/trunk/tools/bcp/add_path.cpp):
//
// Scan for any #include MACRO includes that we don't recognise.
//
// Begin by declaring all of the macros that get #included that
// we know about and are correctly handled as special cases:
//
static const std::string known_macros[] = {
Seems the contire
does not contain such a tricky way to detect the necessary headers.
I may suggest to avoid the boost/preprocessor
directory from any detection by the contire
, otherwise you can include entire directory into pch
header: boost/preprocessor.hpp
.
I run into the same issue.
The problem with andry81 solution are the requirements of use of Boost.Spirit and Boost.Test on my project too. Both libs make heavy use of BOOST_PP magic.
The following doesn't work:
set_target_properties(${PROJECT_NAME} PROPERTIES
COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH "${Boost_INCLUDE_DIRS}/preprocessor")
compiler error:
/usr/include/boost/preprocessor/iteration/detail/local.hpp:13:6: Fehler: #error BOOST_PP_ERROR: local iteration boundaries are not defined
# error BOOST_PP_ERROR: local iteration boundaries are not defined
^~~~~
/usr/include/boost/preprocessor/iteration/detail/local.hpp:34:29: Fehler: expected constructor, destructor, or type conversion before »(« token
BOOST_PP_LOCAL_MACRO(0)
^
Are there any tips how to gather the origin of the problem?
Hi, is there any progress on this? I'm also having similar issues with BOOST_PP
. My current options are to either add boost dependencies after cotiring, or simply not using cotire at all.
I run into a problem which I wasn't able to reduce yet. I'm using boost spirit and boost.test. The error rises:
The calc9 example from boost.spirit.x3 compiles with cotire and an intro example from boost.test also, but failed here. Maybe helpful: