mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-27 00:14:07 +08:00
build(cmake): always mark HAS_STRING_VIEW as part…
…of the interface If the library gets compiled with HAS_STRING_VIEW=1, consumers always need to link to the functions using std::string_view, as they are the only ones compiled into the shared library. You can find a longer explanation here: <https://github.com/HowardHinnant/date/pull/754#issuecomment-1361248007>
This commit is contained in:
parent
dc9d161607
commit
cf8f25b183
@ -100,6 +100,8 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
if ( DISABLE_STRING_VIEW )
|
if ( DISABLE_STRING_VIEW )
|
||||||
target_compile_definitions( date INTERFACE HAS_STRING_VIEW=0 -DHAS_DEDUCTION_GUIDES=0 )
|
target_compile_definitions( date INTERFACE HAS_STRING_VIEW=0 -DHAS_DEDUCTION_GUIDES=0 )
|
||||||
|
else()
|
||||||
|
target_compile_definitions( date INTERFACE HAS_STRING_VIEW=1 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#[===================================================================[
|
#[===================================================================[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user