Fix cmake compilation properties

For some reason using target_compile_features doesn't properly set up
C++17 flags in the generate compile_commands.json, which then breaks
clang-complete.  Switch to use properties instead, which works.
This commit is contained in:
Jason Rhinelander 2022-05-12 12:15:30 -03:00
parent 5a3c12e721
commit 5c7f6504d2
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
1 changed files with 6 additions and 2 deletions

View File

@ -140,8 +140,12 @@ if(WARNINGS_AS_ERRORS)
target_compile_options(oxenmq PRIVATE -Werror)
endif()
target_compile_features(oxenmq PUBLIC cxx_std_17)
set_target_properties(oxenmq PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(oxenmq PROPERTIES
POSITION_INDEPENDENT_CODE ON
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
function(link_dep_libs target linktype libdirs)
foreach(lib ${ARGN})