Skip to content

Commit

Permalink
Merge pull request boostorg#99 from Flamefire/fix-cygwin-paths
Browse files Browse the repository at this point in the history
Support systems without implicit include path
  • Loading branch information
Flamefire authored Jul 6, 2022
2 parents e24241e + 41868c6 commit f44b3bb
Show file tree
Hide file tree
Showing 73 changed files with 194 additions and 197 deletions.
132 changes: 66 additions & 66 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@ project(boost_locale VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
file(GLOB_RECURSE headers include/*.hpp)

add_library(boost_locale
src/encoding/codepage.cpp
src/encoding/conv.hpp
src/encoding/iconv_codepage.ipp
src/encoding/uconv_codepage.ipp
src/encoding/wconv_codepage.ipp
src/shared/date_time.cpp
src/shared/format.cpp
src/shared/formatting.cpp
src/shared/generator.cpp
src/shared/ids.cpp
src/shared/localization_backend.cpp
src/shared/message.cpp
src/shared/mo_lambda.cpp
src/util/codecvt_converter.cpp
src/util/default_locale.cpp
src/util/info.cpp
src/util/locale_data.cpp
src/util/locale_data.hpp
src/util/numeric.hpp
src/util/timezone.hpp
src/boost/locale/encoding/codepage.cpp
src/boost/locale/encoding/conv.hpp
src/boost/locale/encoding/iconv_codepage.ipp
src/boost/locale/encoding/uconv_codepage.ipp
src/boost/locale/encoding/wconv_codepage.ipp
src/boost/locale/shared/date_time.cpp
src/boost/locale/shared/format.cpp
src/boost/locale/shared/formatting.cpp
src/boost/locale/shared/generator.cpp
src/boost/locale/shared/ids.cpp
src/boost/locale/shared/localization_backend.cpp
src/boost/locale/shared/message.cpp
src/boost/locale/shared/mo_lambda.cpp
src/boost/locale/util/codecvt_converter.cpp
src/boost/locale/util/default_locale.cpp
src/boost/locale/util/info.cpp
src/boost/locale/util/locale_data.cpp
src/boost/locale/util/locale_data.hpp
src/boost/locale/util/numeric.hpp
src/boost/locale/util/timezone.hpp
${headers}
)

add_library(Boost::locale ALIAS boost_locale)

target_include_directories(boost_locale PUBLIC include)
target_include_directories(boost_locale PUBLIC include PRIVATE src)

target_link_libraries(boost_locale
PUBLIC
Expand Down Expand Up @@ -90,7 +90,7 @@ if(BOOST_LOCALE_ENABLE_ICONV)
target_link_libraries(boost_locale PRIVATE Iconv::Iconv)

target_sources(boost_locale PRIVATE
src/util/iconv.hpp
src/boost/locale/util/iconv.hpp
)
endif()

Expand All @@ -102,38 +102,38 @@ if(BOOST_LOCALE_ENABLE_ICU)
target_link_libraries(boost_locale PRIVATE ICU::data ICU::i18n ICU::uc)

target_sources(boost_locale PRIVATE
src/icu/all_generator.hpp
src/icu/boundary.cpp
src/icu/cdata.hpp
src/icu/codecvt.cpp
src/icu/codecvt.hpp
src/icu/collator.cpp
src/icu/conversion.cpp
src/icu/date_time.cpp
src/icu/formatter.cpp
src/icu/formatter.hpp
src/icu/icu_backend.cpp
src/icu/icu_backend.hpp
src/icu/icu_util.hpp
src/icu/numeric.cpp
src/icu/predefined_formatters.hpp
src/icu/time_zone.cpp
src/icu/time_zone.hpp
src/icu/uconv.hpp
src/boost/locale/icu/all_generator.hpp
src/boost/locale/icu/boundary.cpp
src/boost/locale/icu/cdata.hpp
src/boost/locale/icu/codecvt.cpp
src/boost/locale/icu/codecvt.hpp
src/boost/locale/icu/collator.cpp
src/boost/locale/icu/conversion.cpp
src/boost/locale/icu/date_time.cpp
src/boost/locale/icu/formatter.cpp
src/boost/locale/icu/formatter.hpp
src/boost/locale/icu/icu_backend.cpp
src/boost/locale/icu/icu_backend.hpp
src/boost/locale/icu/icu_util.hpp
src/boost/locale/icu/numeric.cpp
src/boost/locale/icu/predefined_formatters.hpp
src/boost/locale/icu/time_zone.cpp
src/boost/locale/icu/time_zone.hpp
src/boost/locale/icu/uconv.hpp
)

endif()

if(BOOST_LOCALE_ENABLE_STD)

target_sources(boost_locale PRIVATE
src/std/all_generator.hpp
src/std/codecvt.cpp
src/std/collate.cpp
src/std/converter.cpp
src/std/numeric.cpp
src/std/std_backend.cpp
src/std/std_backend.hpp
src/boost/locale/std/all_generator.hpp
src/boost/locale/std/codecvt.cpp
src/boost/locale/std/collate.cpp
src/boost/locale/std/converter.cpp
src/boost/locale/std/numeric.cpp
src/boost/locale/std/std_backend.cpp
src/boost/locale/std/std_backend.hpp
)

else()
Expand All @@ -145,13 +145,13 @@ endif()
if(BOOST_LOCALE_ENABLE_WINAPI)

target_sources(boost_locale PRIVATE
src/win32/all_generator.hpp
src/win32/api.hpp
src/win32/collate.cpp
src/win32/converter.cpp
src/win32/numeric.cpp
src/win32/win_backend.cpp
src/win32/win_backend.hpp
src/boost/locale/win32/all_generator.hpp
src/boost/locale/win32/api.hpp
src/boost/locale/win32/collate.cpp
src/boost/locale/win32/converter.cpp
src/boost/locale/win32/numeric.cpp
src/boost/locale/win32/win_backend.cpp
src/boost/locale/win32/win_backend.hpp
)

else()
Expand All @@ -163,23 +163,23 @@ endif()
if(BOOST_LOCALE_ENABLE_WINAPI OR (BOOST_LOCALE_ENABLE_STD AND WIN32))

target_sources(boost_locale PRIVATE
src/win32/lcid.cpp
src/win32/lcid.hpp
src/boost/locale/win32/lcid.cpp
src/boost/locale/win32/lcid.hpp
)

endif()

if(BOOST_LOCALE_ENABLE_POSIX)

target_sources(boost_locale PRIVATE
src/posix/all_generator.hpp
src/posix/codecvt.cpp
src/posix/codecvt.hpp
src/posix/collate.cpp
src/posix/converter.cpp
src/posix/numeric.cpp
src/posix/posix_backend.cpp
src/posix/posix_backend.hpp
src/boost/locale/posix/all_generator.hpp
src/boost/locale/posix/codecvt.cpp
src/boost/locale/posix/codecvt.hpp
src/boost/locale/posix/collate.cpp
src/boost/locale/posix/converter.cpp
src/boost/locale/posix/numeric.cpp
src/boost/locale/posix/posix_backend.cpp
src/boost/locale/posix/posix_backend.hpp
)

else()
Expand All @@ -191,8 +191,8 @@ endif()
if(BOOST_LOCALE_ENABLE_WINAPI OR BOOST_LOCALE_ENABLE_STD OR BOOST_LOCALE_ENABLE_POSIX)

target_sources(boost_locale PRIVATE
src/util/gregorian.cpp
src/util/gregorian.hpp
src/boost/locale/util/gregorian.cpp
src/boost/locale/util/gregorian.hpp
)

endif()
Expand Down
19 changes: 11 additions & 8 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import os ;
import toolset ;
import feature ;

path-constant TOP : .. ;

project /boost/locale
: source-location ../src
: source-location $(TOP)/src/boost/locale
;

# Features
Expand All @@ -24,7 +26,7 @@ feature.feature boost.locale.winapi : on off : optional propagated ;

## iconv

obj has_iconv_libc_obj : ../build/has_iconv.cpp ;
obj has_iconv_libc_obj : $(TOP)/build/has_iconv.cpp ;
exe has_iconv : has_iconv_libc_obj ;
explicit has_iconv ;

Expand All @@ -39,19 +41,19 @@ lib iconv

explicit iconv ;

obj has_iconv_libc_ext : ../build/has_iconv.cpp iconv ;
obj has_iconv_libc_ext : $(TOP)/build/has_iconv.cpp iconv ;
exe has_external_iconv : has_iconv_libc_ext iconv ;
explicit has_external_iconv ;

exe accepts_shared_option : ../build/option.cpp
exe accepts_shared_option : $(TOP)/build/option.cpp
: <cxxflags>-shared-libstdc++
<cxxflags>-shared-libgcc
<linkflags>-shared-libstdc++
<linkflags>-shared-libgcc
;

# Xlocale
obj has_xlocale_obj : ../build/has_xlocale.cpp ;
obj has_xlocale_obj : $(TOP)/build/has_xlocale.cpp ;
exe has_xlocale : has_xlocale_obj ;
explicit has_xlocale ;

Expand Down Expand Up @@ -187,8 +189,8 @@ else

}

obj has_icu_obj : ../build/has_icu_test.cpp : $(ICU_OPTS) ;
obj has_icu64_obj : ../build/has_icu_test.cpp : $(ICU64_OPTS) ;
obj has_icu_obj : $(TOP)/build/has_icu_test.cpp : $(ICU_OPTS) ;
obj has_icu64_obj : $(TOP)/build/has_icu_test.cpp : $(ICU64_OPTS) ;

exe has_icu : has_icu_obj : $(ICU_OPTS) ;
exe has_icu64 : has_icu64_obj : $(ICU64_OPTS) ;
Expand Down Expand Up @@ -260,7 +262,7 @@ rule configure-full ( properties * : flags-only )
;

result += <source>icu/$(ICU_SOURCES).cpp
<library>../../thread/build//boost_thread
<library>/boost/thread//boost_thread
;
}

Expand Down Expand Up @@ -424,6 +426,7 @@ boost-lib locale
:
# Don't link explicitly, not required
<define>BOOST_THREAD_NO_LIB=1
<include>$(TOP)/src
<threading>multi
<target-os>windows:<define>_CRT_SECURE_NO_WARNINGS
<toolset>gcc:<cxxflags>"-Wno-long-long -Wno-deprecated-declarations"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
#include <memory>
#include <string>

#include "conv.hpp"
#include "boost/locale/encoding/conv.hpp"
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
#define BOOST_LOCALE_WITH_WCONV
#endif
#ifdef BOOST_LOCALE_WITH_ICONV
#include "iconv_codepage.ipp"
#include "boost/locale/encoding/iconv_codepage.ipp"
#endif
#ifdef BOOST_LOCALE_WITH_ICU
#include "uconv_codepage.ipp"
#include "boost/locale/encoding/uconv_codepage.ipp"
#endif
#ifdef BOOST_LOCALE_WITH_WCONV
#include "wconv_codepage.ipp"
#include "boost/locale/encoding/wconv_codepage.ipp"
#endif


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include <boost/locale/encoding.hpp>
#include <cerrno>
#include "../util/iconv.hpp"
#include "conv.hpp"
#include "boost/locale/util/iconv.hpp"
#include "boost/locale/encoding/conv.hpp"

namespace boost {
namespace locale {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include <boost/locale/hold_ptr.hpp>
#include <unicode/ucnv.h>
#include <unicode/ucnv_err.h>
#include "conv.hpp"
#include "../icu/icu_util.hpp"
#include "../icu/uconv.hpp"
#include "boost/locale/encoding/conv.hpp"
#include "boost/locale/icu/icu_util.hpp"
#include "boost/locale/icu/uconv.hpp"

namespace boost {
namespace locale {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#endif
#include <windows.h>

#include "conv.hpp"
#include "boost/locale/encoding/conv.hpp"

namespace boost {
namespace locale {
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/icu/boundary.cpp → src/boost/locale/icu/boundary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#include <unicode/rbbi.h>
#include <vector>

#include "cdata.hpp"
#include "all_generator.hpp"
#include "icu_util.hpp"
#include "uconv.hpp"
#include "boost/locale/icu/cdata.hpp"
#include "boost/locale/icu/all_generator.hpp"
#include "boost/locale/icu/icu_util.hpp"
#include "boost/locale/icu/uconv.hpp"

#ifdef BOOST_MSVC
#pragma warning(disable:4244) // 'argument' : conversion from 'int'
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions src/icu/codecvt.cpp → src/boost/locale/icu/codecvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
#define BOOST_LOCALE_SOURCE
#include <boost/locale/encoding.hpp>
#include <boost/locale/encoding_errors.hpp>
#include "../encoding/conv.hpp"
#include "all_generator.hpp"
#include "uconv.hpp"
#include <unicode/ucnv.h>
#include <unicode/ucnv_err.h>
#include <boost/locale/util.hpp>
#include <boost/locale/hold_ptr.hpp>
#include "codecvt.hpp"
#include "icu_util.hpp"
#include "boost/locale/encoding/conv.hpp"
#include "boost/locale/icu/all_generator.hpp"
#include "boost/locale/icu/uconv.hpp"
#include "boost/locale/icu/codecvt.hpp"
#include "boost/locale/icu/icu_util.hpp"
#include <unicode/ucnv.h>
#include <unicode/ucnv_err.h>

#ifdef BOOST_MSVC
# pragma warning(disable : 4244) // loose data
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/icu/collator.cpp → src/boost/locale/icu/collator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include <vector>
#include <limits>

#include "cdata.hpp"
#include "all_generator.hpp"
#include "uconv.hpp"
#include "../shared/mo_hash.hpp"
#include "boost/locale/icu/cdata.hpp"
#include "boost/locale/icu/all_generator.hpp"
#include "boost/locale/icu/uconv.hpp"
#include "boost/locale/shared/mo_hash.hpp"

#include <unicode/coll.h>
#if U_ICU_VERSION_MAJOR_NUM*100 + U_ICU_VERSION_MINOR_NUM >= 402
Expand Down
10 changes: 4 additions & 6 deletions src/icu/conversion.cpp → src/boost/locale/icu/conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
//
#define BOOST_LOCALE_SOURCE
#include <boost/locale/conversion.hpp>
#include "all_generator.hpp"
#include "boost/locale/icu/all_generator.hpp"
#include "boost/locale/icu/cdata.hpp"
#include "boost/locale/icu/uconv.hpp"

#include <unicode/normlzr.h>
#include <unicode/ustring.h>
#include <unicode/locid.h>
Expand All @@ -16,11 +19,6 @@
#include <unicode/ucasemap.h>
#define WITH_CASE_MAPS
#endif


#include "cdata.hpp"
#include "uconv.hpp"

#include <vector>

namespace boost {
Expand Down
Loading

0 comments on commit f44b3bb

Please sign in to comment.