bert.cpp
bert.cpp copied to clipboard
models CMakeLists.txt with -lrt required for some versions of ld
Some versions of ld are causing the following issue: undefined reference to `clock_gettime'
https://stackoverflow.com/questions/2418157/c-error-undefined-reference-to-clock-gettime-and-clock-settime
Can be replicated with "conda install -c conda-forge gxx_linux-64", which uses "GNU ld (GNU Binutils) 2.39".
Hi, thanks for the PR and bringing this issue up. Any idea if this is going to cause issues on systems without lib rt? E.g. https://stackoverflow.com/questions/49268901/issue-when-linking-with-lrt-on-mac-osx
I'm really bad at cmake, but would something like this work?
if (UNIX)
link_libraries("-lrt")
endif()