Skip to main content
added 3 characters in body
Source Link
Manuel
  • 6.5k
  • 7
  • 44
  • 59

The following should be clean (using find_package) and work (the find module is called FindThreads):

cmake_minimum_required (VERSION 2.6) find_package (Threads) add_executable (myapp main.cpp ...) target_link_librarytarget_link_libraries (myapp ${CMAKE_THREAD_LIBS_INIT}) 

The following should be clean (using find_package) and work (the find module is called FindThreads):

cmake_minimum_required (VERSION 2.6) find_package (Threads) add_executable (myapp main.cpp ...) target_link_library (myapp ${CMAKE_THREAD_LIBS_INIT} 

The following should be clean (using find_package) and work (the find module is called FindThreads):

cmake_minimum_required (VERSION 2.6) find_package (Threads) add_executable (myapp main.cpp ...) target_link_libraries (myapp ${CMAKE_THREAD_LIBS_INIT}) 
Source Link
Manuel
  • 6.5k
  • 7
  • 44
  • 59

The following should be clean (using find_package) and work (the find module is called FindThreads):

cmake_minimum_required (VERSION 2.6) find_package (Threads) add_executable (myapp main.cpp ...) target_link_library (myapp ${CMAKE_THREAD_LIBS_INIT}