Skip to content

Commit 6edbc13

Browse files
committed
cmake find_package Threads
1 parent ab2b192 commit 6edbc13

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ find_package(TCL)
376376
# Zlib
377377
include(FindZLIB)
378378

379+
find_package(Threads)
380+
379381
################################################################
380382
#
381383
# Locate CUDD bdd package.
@@ -481,6 +483,7 @@ target_link_libraries(sta
481483
sta_swig
482484
OpenSTA
483485
${TCL_LIBRARY}
486+
${CMAKE_THREAD_LIBS_INIT}
484487
)
485488

486489
if (ZLIB_LIBRARIES)
@@ -493,11 +496,6 @@ endif()
493496

494497
message(STATUS "STA executable: ${STA_HOME}/app/sta")
495498

496-
# g++ std::thread apparently still needs -pthreads.
497-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
498-
target_link_libraries(sta -pthread)
499-
endif()
500-
501499
target_compile_options(sta PUBLIC ${STA_COMPILE_OPTIONS})
502500

503501
################################################################

0 commit comments

Comments
 (0)