date icon indicating copy to clipboard operation
date copied to clipboard

Taget tz is not exported in dateConfig

Open antonbutanaev opened this issue 7 years ago • 2 comments

Build and install library:

$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
$ ninja install

Then, in another project: CMakeLists.txt:

cmake_minimum_required(VERSION 3.6)
project(testIt)
find_package(Threads REQUIRED)
find_package(date REQUIRED)
set(CMAKE_CXX_STANDARD 17)
add_executable(testIt main.cpp)
target_link_libraries(
    testIt
    tz
    Threads::Threads
)

/testIt.dir/main.cpp.o -c ../main.cpp ../main.cpp:1:10: fatal error: date/tz.h: No such file or directory #include "date/tz.h" ^~~~~~~~~~~

CMakeLists.txt:

-tz
+date_interface

main.cpp compiles then, but doesn't link (undefined reference to `date::get_tzdb())

To fix this, tz should be exported. Here is proposed patch (with pthread stuff also):

CMakeLists.diff.txt

antonbutanaev avatar Jan 16 '19 09:01 antonbutanaev

Target tz is still not exported. Any plans to fix this?

bambuk6 avatar Apr 13 '20 19:04 bambuk6

Also an issue here.

nschloe avatar Jul 17 '20 07:07 nschloe