cmake find_package Threads
This commit is contained in:
parent
ab2b1924e8
commit
6edbc13083
|
|
@ -376,6 +376,8 @@ find_package(TCL)
|
||||||
# Zlib
|
# Zlib
|
||||||
include(FindZLIB)
|
include(FindZLIB)
|
||||||
|
|
||||||
|
find_package(Threads)
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
#
|
#
|
||||||
# Locate CUDD bdd package.
|
# Locate CUDD bdd package.
|
||||||
|
|
@ -481,6 +483,7 @@ target_link_libraries(sta
|
||||||
sta_swig
|
sta_swig
|
||||||
OpenSTA
|
OpenSTA
|
||||||
${TCL_LIBRARY}
|
${TCL_LIBRARY}
|
||||||
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (ZLIB_LIBRARIES)
|
if (ZLIB_LIBRARIES)
|
||||||
|
|
@ -493,11 +496,6 @@ endif()
|
||||||
|
|
||||||
message(STATUS "STA executable: ${STA_HOME}/app/sta")
|
message(STATUS "STA executable: ${STA_HOME}/app/sta")
|
||||||
|
|
||||||
# g++ std::thread apparently still needs -pthreads.
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
||||||
target_link_libraries(sta -pthread)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_compile_options(sta PUBLIC ${STA_COMPILE_OPTIONS})
|
target_compile_options(sta PUBLIC ${STA_COMPILE_OPTIONS})
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue