mirror of
https://github.com/verilator/verilator.git
synced 2025-04-05 12:12:39 +00:00
Fix linking with pthreads on CMake (#5194)
This commit is contained in:
parent
833df6d9ea
commit
aadd5ea509
3
.gitignore
vendored
3
.gitignore
vendored
@ -46,3 +46,6 @@ verilator-config-version.cmake
|
||||
/test_regress/snapshot/
|
||||
xmverilog.*
|
||||
xrun.history
|
||||
|
||||
# Normal CMake build directory
|
||||
/build
|
||||
|
@ -30,6 +30,7 @@ include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(CheckStructHasMember)
|
||||
include(ExternalProject)
|
||||
include(FindThreads)
|
||||
|
||||
if (NOT WIN32)
|
||||
message(WARNING "CMake support on Linux/OSX is experimental.")
|
||||
|
@ -488,6 +488,8 @@ add_dependencies(${verilator}
|
||||
V3PreLex_yy_cpp${CMAKE_BUILD_TYPE}
|
||||
)
|
||||
|
||||
target_link_libraries(${verilator} PRIVATE Threads::Threads)
|
||||
|
||||
# verilated_cov_key.h is only regenerated in a single-configuration environment.
|
||||
# This limitation can be lifted when `add_dependencies` will support generator
|
||||
# expressions. See https://gitlab.kitware.com/cmake/cmake/issues/19467
|
||||
|
Loading…
Reference in New Issue
Block a user