Skip to content

Commit

Permalink
demo's not compiling, posix linker args end up bad
Browse files Browse the repository at this point in the history
When following the instructions to generate the Ninja files with CMake,
the resulting builds fail as the linker args generated try to reference
a non-existant library "Threads::Threads".

Including the "FindThreads" CMake module fixes this issue. It looks
supported on CMake 2.8 all the way up to the current release. The demos
now easily build following the instructions.
  • Loading branch information
voutilad committed Jan 3, 2021
1 parent d5814d5 commit b09392a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/async/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
cmake_minimum_required (VERSION 2.8.7)

project(nng-asyncdemo)

include(FindThreads)
set(PARALLEL 128 CACHE STRING "Parallelism (min 4, max 1000)")

# Call this from your own project's makefile.
Expand Down
1 change: 1 addition & 0 deletions demo/http_client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
cmake_minimum_required (VERSION 2.8.7)

project(http_client)
include(FindThreads)

# Call this from your own project's makefile.
find_package(nng CONFIG REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion demo/raw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
cmake_minimum_required (VERSION 2.8.7)

project(raw)

include(FindThreads)
set(PARALLEL 128 CACHE STRING "Parallelism (min 4, max 1000)")

find_package(nng CONFIG REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions demo/reqrep/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
cmake_minimum_required (VERSION 2.8.7)

project(reqrep)
include(FindThreads)

find_package(nng CONFIG REQUIRED)

Expand Down
1 change: 1 addition & 0 deletions demo/rest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
cmake_minimum_required (VERSION 2.8.7)

project(rest)
include(FindThreads)

find_package(nng CONFIG REQUIRED)

Expand Down

0 comments on commit b09392a

Please sign in to comment.