diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml index bd76fd1..b06cff8 100644 --- a/.github/workflows/c.yml +++ b/.github/workflows/c.yml @@ -68,7 +68,7 @@ jobs: env: CC: clang CXX: clang++ - CXXFLAGS: -Werror -Wall -pedantic -std=c++17 + CXXFLAGS: -Werror -Wall -pedantic BUILD_TYPE: Debug steps: - uses: actions/checkout@v4 diff --git a/osmpbf/CMakeLists.txt b/osmpbf/CMakeLists.txt index 41f3c2a..80446f2 100644 --- a/osmpbf/CMakeLists.txt +++ b/osmpbf/CMakeLists.txt @@ -1,12 +1,14 @@ protobuf_generate_cpp(CPPS HS fileformat.proto osmformat.proto) add_library(osmpbf STATIC ${CPPS}) +target_compile_features(osmpbf PUBLIC cxx_std_11) target_include_directories(osmpbf SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS}) -set_property(TARGET osmpbf PROPERTY CXX_STANDARD 11) +#set_property(TARGET osmpbf PROPERTY CXX_STANDARD 11) install(TARGETS osmpbf ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) add_library(osmpbf_shared SHARED ${CPPS}) -set_property(TARGET osmpbf_shared PROPERTY CXX_STANDARD 11) +#set_property(TARGET osmpbf_shared PROPERTY CXX_STANDARD 11) +target_compile_features(osmpbf_shared PUBLIC cxx_std_11) target_link_libraries(osmpbf_shared PRIVATE protobuf::libprotobuf) target_include_directories(osmpbf_shared SYSTEM PUBLIC ${Protobuf_INCLUDE_DIRS}) set_target_properties(osmpbf_shared PROPERTIES OUTPUT_NAME osmpbf