I am trying to set up my cmake project with HDF5 on Windows 10 (64 bit) using the CLion editor and MinGW. After a ton of time, trying to properly configure the CMakeLists file, I got something working - the code is compiling, there are no errors from mingw32-make or from cmake. However, I still get red underlined errors in CLion that do not seem to affect the assembly, but I feel that they are there because I did something wrong. (I'm very new, doing something more than cool C ++ projects)
Here is my CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(testProject)
add_definitions(-std=c++11)
set(SOURCE_FILES hdf_example.cpp)
link_libraries("C:/Program Files/HDF_Group/HDF5/1.8.16/lib/hdf5_hl_cpp-shared.lib"
"C:/Program Files/HDF_Group/HDF5/1.8.16/lib/hdf5_cpp-shared.lib"
"C:/Program Files/HDF_Group/HDF5/1.8.16/lib/hdf5-shared.lib")
add_executable (abc hdf_example.cpp)

Compiling from the command line using the mingw32-make command or in the IDE results in successful compilation without errors or warnings that I can see.
C:\Users\Me\Documents\project_name\temp-build\src\abc>mingw32-make
[ 50%] Building CXX object src/s3/CMakeFiles/abc.dir/hdf_example.cpp.obj
[100%] Linking CXX executable abc.exe
[100%] Built target abc
-, ? , ?