erikzenker / inotify-cpp

A C++ interface for linux inotify
MIT License
136 stars 37 forks source link

CMake 3.5.1 does not include the cxx_std_11 feature #54

Closed AndrewLipscomb closed 5 years ago

AndrewLipscomb commented 5 years ago

https://stackoverflow.com/a/49027994/3886090 says that the cxx_std_11 required by the src/CMakeLists.txt target_compile_features(${LIB_NAME} PUBLIC cxx_std_11) call was not introduced until CMake 3.8

I am running 3.5.1 and have that issue - instead adding

set_property(TARGET ${LIB_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${LIB_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)

for the lib, tests and demo worked, and should preserve the CMake cohesiveness if this is added in as a subproject somewhere

erikzenker commented 5 years ago

Hi ALTinners, thx for your report. Is this the only problem you have with CMake 3.5.1? And updating CMake is not an option?

AndrewLipscomb commented 5 years ago

Its more that you specify an option that is not available in the Cmake version you recommend. Easy fix - advise that this project requires cmake 3.8 to use!

erikzenker commented 5 years ago

Then lets go for the easy fix.

erikzenker commented 5 years ago

Fixed with #57