Skip to content
Snippets Groups Projects
Commit 5569666d authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake] Add -lpthread for CMake >= 3.1

Since CMake 3.1 the if() command no longer automatically dereferences
variables named in quoted or bracket arguments.
This fixes FS#1567.
parent 6a1316cf
No related branches found
No related tags found
No related merge requests found
......@@ -219,9 +219,9 @@ if(NOT STDTHREAD_LINK_FLAGS STREQUAL "")
string(REPLACE ";" ";CMAKE_EXE_LINKER_FLAGS_" vars "${vars}")
string(TOUPPER "${vars}" vars)
foreach(var ${vars})
if(NOT ${var} STREQUAL "")
if(NOT var STREQUAL "")
set(${var} "${${var}} ${STDTHREAD_LINK_FLAGS}")
endif(NOT ${var} STREQUAL "")
endif()
endforeach(var ${vars})
endif(NOT STDTHREAD_LINK_FLAGS STREQUAL "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment