This is incorrect and redundant:
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread -Wl,--no-undefined")
Incorrect because it loses existing CMAKE_EXE_LINKER_FLAGS. And redundant because if you scroll down you'll find we already have:
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
This is incorrect and redundant: EXE_LINKER_ FLAGS "${CMAKE_ SHARED_ LINKER_ FLAGS} -pthread -Wl,--no- undefined" )
+set(CMAKE_
Incorrect because it loses existing CMAKE_EXE_ LINKER_ FLAGS. And redundant because if you scroll down you'll find we already have: EXE_LINKER_ FLAGS "${CMAKE_ EXE_LINKER_ FLAGS} -pthread")
set(CMAKE_