Test was depending on thread library without explicit linking it,
which some compiler require.
Fixes #2051
Change-Id: I9929d9373a4e8caa393f548d25a78bc03c016bf9
# the research papers on the package. Check out http://www.gromacs.org.
include(CheckCXXSourceCompiles)
+include(FindThreads)
# Check whether both a suitable C++11-compatible compiler and standard
# library is available, and give a fatal error if not.
# Now check the standard library is OK
set(CMAKE_REQUIRED_FLAGS "${CXX11_CXX_FLAG} ${${STDLIB_CXX_FLAG_NAME}}")
- set(CMAKE_REQUIRED_LIBRARIES "${${STDLIB_LIBRARIES_NAME}}")
+ set(CMAKE_REQUIRED_LIBRARIES "${${STDLIB_LIBRARIES_NAME}} ${CMAKE_THREAD_LIBS_INIT}")
check_cxx_source_compiles(
"#include <algorithm>
#include <array>