mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-27 00:14:07 +08:00
Ensure Android private functions dont show up
... for external consumers like tests Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
This commit is contained in:
parent
7657ad7855
commit
fca69e308d
@ -112,6 +112,7 @@ endif()
|
|||||||
#]===================================================================]
|
#]===================================================================]
|
||||||
if( BUILD_TZ_LIB )
|
if( BUILD_TZ_LIB )
|
||||||
add_library( date-tz )
|
add_library( date-tz )
|
||||||
|
target_compile_definitions( date-tz PRIVATE BUILD_TZ_LIB=1 )
|
||||||
target_sources( date-tz
|
target_sources( date-tz
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>/date/tz.h
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>/date/tz.h
|
||||||
|
@ -139,10 +139,12 @@ namespace date
|
|||||||
|
|
||||||
enum class choose {earliest, latest};
|
enum class choose {earliest, latest};
|
||||||
|
|
||||||
|
#if defined(BUILD_TZ_LIB)
|
||||||
# if defined(ANDROID) || defined(__ANDROID__)
|
# if defined(ANDROID) || defined(__ANDROID__)
|
||||||
struct tzdb;
|
struct tzdb;
|
||||||
static std::unique_ptr<tzdb> init_tzdb();
|
static std::unique_ptr<tzdb> init_tzdb();
|
||||||
# endif // defined(ANDROID) || defined(__ANDROID__)
|
# endif // defined(ANDROID) || defined(__ANDROID__)
|
||||||
|
#endif // defined(BUILD_TZ_LIB)
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
@ -827,9 +829,11 @@ public:
|
|||||||
#if !USE_OS_TZDB
|
#if !USE_OS_TZDB
|
||||||
DATE_API void add(const std::string& s);
|
DATE_API void add(const std::string& s);
|
||||||
#else
|
#else
|
||||||
|
# if defined(BUILD_TZ_LIB)
|
||||||
# if defined(ANDROID) || defined(__ANDROID__)
|
# if defined(ANDROID) || defined(__ANDROID__)
|
||||||
friend std::unique_ptr<tzdb> init_tzdb();
|
friend std::unique_ptr<tzdb> init_tzdb();
|
||||||
# endif // defined(ANDROID) || defined(__ANDROID__)
|
# endif // defined(ANDROID) || defined(__ANDROID__)
|
||||||
|
# endif // defined(BUILD_TZ_LIB)
|
||||||
#endif // !USE_OS_TZDB
|
#endif // !USE_OS_TZDB
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user