CMake Build Error: can not find library

I got the following compilation error when building some dmclock code. How to fix this?

-- Boost version: 1.66.0
-- Could NOT find Threads (missing:  Threads_FOUND) 
-- Configuring done
-- Generating done
-- Build files have been written to: /root/ruc_test/dmclock2/build
[ 28%] Built target dmclock
Linking CXX executable dmclock-tests
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: 找不到 -lThreads::Threads
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: 找不到 -lGTest::GTest
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: can't find -lGTest::Main
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: can't find -lBoost::boost
/opt/rh/devtoolset-7/root/usr/libexec/gcc/x86_64-redhat-linux/7/ld: can't find -lThreads::Threads
collect2: error: ld returned 1 exit status
make[2]: *** [test/dmclock-tests] error 1
make[1]: *** [test/CMakeFiles/dmclock-tests.dir/all] error 2
make: *** [all] error 2

Looking at the output you’ve shown, this doesn’t seem to be related to Stan, but to dmclock, so you’ll find better support somewhere else. In any case, CMake is not supported by Stan, although it may become the default at some point in the future.