I've been trying to get my cmake project set up with HDF5 on Windows 10 (64bit), using the CLion editor and MinGW. After a ton of time trying to get my CMakeLists file set up properly, I got something working - the code compiles, no errors from mingw32-make or from cmake. However, I'm still getting red underlined errors in CLion, which don't seem to have any impact on the build, but I have a feeling that they're there because I did something incorrect. (I'm very new doing anything more than class projects with C++)
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 this from the command line using mingw32-make or in the IDE both result a successful compilation with no 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
Is this something I should be concerned about? Or should I just ignore it since everything compiles?