Draft: Fix cmake threads
- Store
CMAKE_THREAD_LIBS_INITin the cache file for integration with ICON. - Fix the
-pthreadproblem when building with NAG. - A bit of clean-up and consistency.
CMAKE_THREAD_LIBS_INIT in the cache file for integration with ICON.-pthread problem when building with NAG.