mirror of
https://github.com/boostorg/wave.git
synced 2026-01-19 04:42:16 +00:00
@@ -1,22 +1,22 @@
|
||||
# Generated by `boostdep --cmake wave`
|
||||
# Copyright 2020 Peter Dimov
|
||||
# Copyright 2020, 2021 Peter Dimov
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
cmake_minimum_required(VERSION 3.8...3.20)
|
||||
|
||||
project(boost_wave VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_wave
|
||||
src/instantiate_cpp_exprgrammar.cpp
|
||||
src/instantiate_cpp_grammar.cpp
|
||||
src/instantiate_cpp_literalgrs.cpp
|
||||
src/instantiate_re2c_lexer.cpp
|
||||
src/token_ids.cpp
|
||||
src/instantiate_defined_grammar.cpp
|
||||
src/instantiate_cpp_literalgrs.cpp
|
||||
src/instantiate_cpp_exprgrammar.cpp
|
||||
src/instantiate_has_include_grammar.cpp
|
||||
src/instantiate_predef_macros.cpp
|
||||
src/instantiate_re2c_lexer.cpp
|
||||
src/instantiate_re2c_lexer_str.cpp
|
||||
src/token_ids.cpp
|
||||
src/instantiate_cpp_grammar.cpp
|
||||
src/wave_config_constant.cpp
|
||||
|
||||
src/cpplexer/re2clex/aq.cpp
|
||||
@@ -34,6 +34,7 @@ target_link_libraries(boost_wave
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::filesystem
|
||||
Boost::format
|
||||
Boost::iterator
|
||||
Boost::lexical_cast
|
||||
Boost::mpl
|
||||
@@ -49,6 +50,8 @@ target_link_libraries(boost_wave
|
||||
Boost::type_traits
|
||||
)
|
||||
|
||||
target_compile_features(boost_wave PUBLIC cxx_std_11)
|
||||
|
||||
target_compile_definitions(boost_wave
|
||||
PUBLIC BOOST_WAVE_NO_LIB
|
||||
PRIVATE BOOST_WAVE_SOURCE
|
||||
|
||||
@@ -18,6 +18,9 @@ TODO (known issues):
|
||||
|
||||
CHANGELOG
|
||||
|
||||
Boost V1.84:
|
||||
- Fixed #188: Segmentation fault when "#pragma\n" is encountered
|
||||
|
||||
Boost V1.82:
|
||||
- Fixed #182: cpp_re.hpp has a memmove that passes 0/null as arguments
|
||||
|
||||
|
||||
@@ -2427,10 +2427,9 @@ pp_iterator_functor<ContextT>::on_pragma(
|
||||
const_tree_iterator_t last = make_ref_transform_iterator(end, get_value);
|
||||
|
||||
expanded.push_back(result_type(T_PP_PRAGMA, "#pragma", act_token.get_position()));
|
||||
expanded.push_back(result_type(T_SPACE, " ", act_token.get_position()));
|
||||
|
||||
while (++first != last && IS_CATEGORY(*first, WhiteSpaceTokenType))
|
||||
expanded.push_back(*first); // skip whitespace
|
||||
while (first != last && IS_CATEGORY(*first, WhiteSpaceTokenType))
|
||||
expanded.push_back(*first++); // skip whitespace
|
||||
|
||||
if (first != last) {
|
||||
if (T_IDENTIFIER == token_id(*first) &&
|
||||
@@ -2456,7 +2455,6 @@ pp_iterator_functor<ContextT>::on_pragma(
|
||||
#endif
|
||||
}
|
||||
}
|
||||
expanded.push_back(result_type(T_NEWLINE, "\n", act_token.get_position()));
|
||||
|
||||
// the queues should be empty at this point
|
||||
BOOST_ASSERT(unput_queue.empty());
|
||||
|
||||
@@ -46,7 +46,11 @@ namespace boost { namespace wave { namespace util
|
||||
inline std::string leaf(boost::filesystem::path const& p)
|
||||
{
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
#if BOOST_VERSION >= 108400
|
||||
return p.filename().string();
|
||||
#else
|
||||
return p.leaf().string();
|
||||
#endif
|
||||
#else
|
||||
return p.leaf();
|
||||
#endif
|
||||
@@ -54,12 +58,20 @@ namespace boost { namespace wave { namespace util
|
||||
|
||||
inline boost::filesystem::path branch_path(boost::filesystem::path const& p)
|
||||
{
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3 && BOOST_VERSION >= 108400
|
||||
return p.parent_path();
|
||||
#else
|
||||
return p.branch_path();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline boost::filesystem::path normalize(boost::filesystem::path& p)
|
||||
{
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3 && BOOST_VERSION >= 108400
|
||||
return p.lexically_normal().make_preferred();
|
||||
#else
|
||||
return p.normalize().make_preferred();
|
||||
#endif
|
||||
}
|
||||
|
||||
inline std::string native_file_string(boost::filesystem::path const& p)
|
||||
@@ -75,7 +87,9 @@ namespace boost { namespace wave { namespace util
|
||||
boost::filesystem::path const& p)
|
||||
{
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
#if BOOST_VERSION >= 105000
|
||||
#if BOOST_VERSION >= 108400
|
||||
return boost::filesystem::absolute(p, initial_path());
|
||||
#elif BOOST_VERSION >= 105000
|
||||
return boost::filesystem::complete(p, initial_path());
|
||||
#else
|
||||
return boost::filesystem3::complete(p, initial_path());
|
||||
@@ -89,7 +103,9 @@ namespace boost { namespace wave { namespace util
|
||||
boost::filesystem::path const& p, boost::filesystem::path const& base)
|
||||
{
|
||||
#if BOOST_FILESYSTEM_VERSION >= 3
|
||||
#if BOOST_VERSION >= 105000
|
||||
#if BOOST_VERSION >= 108400
|
||||
return boost::filesystem::absolute(p, base);
|
||||
#elif BOOST_VERSION >= 105000
|
||||
return boost::filesystem::complete(p, base);
|
||||
#else
|
||||
return boost::filesystem3::complete(p, base);
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
//R #line 25 "t_2_006.cpp"
|
||||
//R #pragma STDC preprocessed pragma body
|
||||
#pragma STDC PRAGMA_BODY
|
||||
// also test pragma without a body (allowed per https://eel.is/c++draft/cpp.pragma)
|
||||
//R #line 29 "t_2_006.cpp"
|
||||
//R #pragma
|
||||
#pragma
|
||||
|
||||
//H 10: t_2_006.cpp(12): #define
|
||||
//H 08: t_2_006.cpp(12): PRAGMA_BODY=preprocessed pragma body
|
||||
@@ -36,3 +40,4 @@
|
||||
//H 01: t_2_006.cpp(12): PRAGMA_BODY
|
||||
//H 02: preprocessed pragma body
|
||||
//H 03: preprocessed pragma body
|
||||
//H 10: t_2_006.cpp(29): #pragma
|
||||
|
||||
Reference in New Issue
Block a user