Upgrade to protobuf 24.4 #6310

Open
biodranik wants to merge 3 commits from protobuf-24.4 into master
25 changed files with 11653 additions and 8848 deletions

2
.gitmodules vendored
View file

@ -9,7 +9,7 @@
url = https://github.com/aurelien-rainone/macdeployqtfix.git
[submodule "3party/protobuf/protobuf"]
path = 3party/protobuf/protobuf
url = https://github.com/organicmaps/protobuf.git
url = https://github.com/protocolbuffers/protobuf.git
[submodule "tools/twine"]
path = tools/twine
url = https://github.com/organicmaps/twine.git

View file

@ -1,43 +1,33 @@
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
project(protobuf)
set(SRC
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
config.h
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/arena.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/extension_set.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/generated_message_util.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/io/coded_stream.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/io/zero_copy_stream.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/message_lite.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/repeated_field.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/bytestream.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/common.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/int128.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/once.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/status.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/statusor.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/stringpiece.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/stringprintf.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/structurally_valid.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/strutil.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/stubs/time.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
protobuf/src/google/protobuf/wire_format_lite.cc
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
# protobuf config
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(protobuf_LIB_NAME libprotobuf-lite)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(protobuf_VERSION "24.4")
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(protobuf_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/protobuf)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(protobuf_SHARED_OR_STATIC "STATIC")
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(protobuf_BUILD_TESTS OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(protobuf_INSTALL OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
add_library(${PROJECT_NAME} ${SRC})
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
# abseil
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(ABSL_PROPAGATE_CXX_STD OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(ABSL_ENABLE_INSTALL OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(ABSL_FIND_GOOGLETEST OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(ABSL_ROOT_DIR ${protobuf_SOURCE_DIR}/third_party/abseil-cpp)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
include(protobuf/cmake/abseil-cpp.cmake)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
target_include_directories(${PROJECT_NAME}
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
PRIVATE . ../../
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
PUBLIC protobuf/src
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
# utf8_range
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(utf8_range_ENABLE_TESTS OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set(utf8_range_ENABLE_INSTALL OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
add_subdirectory(${protobuf_SOURCE_DIR}/third_party/utf8_range)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
if(NOT PLATFORM_WIN)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_PTHREAD)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
endif ()
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
include(protobuf/cmake/${protobuf_LIB_NAME}.cmake)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
target_compile_options(${PROJECT_NAME} PRIVATE
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Wno-shorten-64-to-32>
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
$<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-deprecated-declarations>
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-sign-compare>
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
add_library(${PROJECT_NAME} ALIAS ${protobuf_LIB_NAME})
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
target_include_directories(${protobuf_LIB_NAME} PRIVATE ${protobuf_SOURCE_DIR}/third_party/utf8_range)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
# Disable Unity build for protobuf because macro in port_def.inc do not have include guard.
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set_target_properties(${protobuf_LIB_NAME} PROPERTIES UNITY_BUILD OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
# Disable unity build to avoid name clashes in abseil.
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set_target_properties(absl_strings PROPERTIES UNITY_BUILD OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set_target_properties(absl_time PROPERTIES UNITY_BUILD OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
set_target_properties(absl_time_zone PROPERTIES UNITY_BUILD OFF)
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.

Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.
Review
set(protobuf_VERSION "24.4")
```suggestion set(protobuf_VERSION "24.4") ```
biodranik commented 2023-10-15 07:22:43 +00:00 (Migrated from github.com)
Review

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?

@AndrewShkrob I don't like updating it manually every time. Can it be automated? Is it needed at all?
Review

This line is required:

set_target_properties(libprotobuf-lite PROPERTIES
    VERSION ${protobuf_VERSION}
    OUTPUT_NAME ${LIB_PREFIX}protobuf-lite
    DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}"
    # For -fvisibility=hidden and -fvisibility-inlines-hidden
    C_VISIBILITY_PRESET hidden
    CXX_VISIBILITY_PRESET hidden
    VISIBILITY_INLINES_HIDDEN ON
)

I think it's not a big deal to update the version each time you update the version...
But if you don't like it, you can set any dummy value here, for example, "OrganicMaps", or the commit hash of the protobuf repo.

There is also another way. The version of protobuf is stored in 3party/protobuf/protobuf/version.json:

{
    "24.x": {
        "protoc_version": "24.4",
        "lts": false,
        "date": "2023-10-03",
        "languages": {
            "cpp": "4.24.4",
            "csharp": "3.24.4",
            "java": "3.24.4",
            "javascript": "3.24.4",
            "objectivec": "3.24.4",
            "php": "3.24.4",
            "python": "4.24.4",
            "ruby": "3.24.4"
        }
    }
}

We can write a script to fetch "protoc_version", but I think it's an overcomplication.

This line is required: ```cmake set_target_properties(libprotobuf-lite PROPERTIES VERSION ${protobuf_VERSION} OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}" # For -fvisibility=hidden and -fvisibility-inlines-hidden C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON ) ``` I think it's not a big deal to update the version each time you update the version... But if you don't like it, you can set any dummy value here, for example, `"OrganicMaps"`, or the commit hash of the protobuf repo. There is also another way. The version of protobuf is stored in `3party/protobuf/protobuf/version.json`: ```json { "24.x": { "protoc_version": "24.4", "lts": false, "date": "2023-10-03", "languages": { "cpp": "4.24.4", "csharp": "3.24.4", "java": "3.24.4", "javascript": "3.24.4", "objectivec": "3.24.4", "php": "3.24.4", "python": "4.24.4", "ruby": "3.24.4" } } } ``` We can write a script to fetch `"protoc_version"`, but I think it's an overcomplication.

View file

@ -1,152 +0,0 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* the name of <hash_map> */
#define HASH_MAP_CLASS unordered_map
/* the location of <unordered_map> or <hash_map> */
#define HASH_MAP_H <unordered_map>
/* the namespace of hash_map/hash_set */
#define HASH_NAMESPACE std
/* the name of <hash_set> */
#define HASH_SET_CLASS unordered_set
/* the location of <unordered_set> or <hash_set> */
#define HASH_SET_H <unordered_set>
/* define if the compiler supports basic C++11 syntax */
#define HAVE_CXX11 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
/* define if the compiler has hash_map */
#define HAVE_HASH_MAP 1
/* define if the compiler has hash_set */
#define HAVE_HASH_SET 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Enable classes using zlib compression. */
#define HAVE_ZLIB 1
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Name of package */
#define PACKAGE "protobuf"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "protobuf@googlegroups.com"
/* Define to the full name of this package. */
#define PACKAGE_NAME "Protocol Buffers"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "Protocol Buffers 3.3.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "protobuf"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "3.3.0"
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Version number of package */
#define VERSION "3.3.0"
/* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */

@ -1 +1 @@
Subproject commit a6189acd18b00611c1dc7042299ad75486f08a1a
Subproject commit 7789b3ac85248ad75631a1919071fa268e466210

View file

@ -19,13 +19,10 @@ An overview of currently used icons can be found in the [Wiki](https://github.co
To work with styles first [clone the OM repository](INSTALL.md#getting-sources).
Install a `protobuf` python package with `pip`
First, you need to install Python 3.8 or a newer version.
Then, use the following command to install the `protobuf` python package using `pip`:
```
pip install protobuf
```
or with your OS package manager, e.g for Ubuntu
```
sudo apt install python3-protobuf
pip3 install -r tools/kothic/requirements.txt
```
To run the `generate_symbols.sh` script install `optipng` also, e.g. for Ubuntu

View file

@ -22,6 +22,10 @@
#include "drape/support_manager.hpp"
#include "drape/utils/projection.hpp"
#if BUILD_DESIGNER
#include "indexer/classificator_loader.hpp"
#endif
#include "indexer/drawing_rules.hpp"
#include "indexer/map_style_reader.hpp"
#include "indexer/scales.hpp"

View file

@ -142,11 +142,6 @@ set(SRC
set(OTHER_FILES drules_struct.proto)
# Disable warnings.
set_source_files_properties(drules_struct.pb.cc PROPERTIES COMPILE_FLAGS
"$<$<CXX_COMPILER_ID:AppleClang,Clang>:-Wno-shorten-64-to-32> $<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>"
)
file(COPY ${OTHER_FILES} DESTINATION ${CMAKE_BINARY_DIR})
omim_add_library(${PROJECT_NAME} ${SRC})

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@ inline uint32_t PatchMinDrawableScale(uint32_t s)
inline uint32_t PatchMaxDrawableScale(uint32_t s)
{
std::min(s + kPatchScaleShift, static_cast<uint32_t>(GetUpperStyleScale()));
return std::min(s + kPatchScaleShift, static_cast<uint32_t>(GetUpperStyleScale()));
}
#else // BUILD_DESIGNER

View file

@ -8,10 +8,7 @@
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QProcess>
#include <QtCore/QProcessEnvironment>
#include <exception>
#include <iomanip> // std::quoted
#include <regex>
#include <string>
@ -122,8 +119,3 @@ QString GetExternalPath(QString const & name, QString const & primaryPath,
}
return path;
}
QString GetProtobufEggPath()
{
return GetExternalPath("protobuf-3.3.0-py2.7.egg", "kothic", "../3party/protobuf");
}

View file

@ -21,4 +21,3 @@ QString JoinPathQt(std::initializer_list<QString> folders);
QString GetExternalPath(QString const & name, QString const & primaryPath,
QString const & secondaryPath);
QString GetProtobufEggPath();

View file

@ -24,17 +24,13 @@ void BuildDrawingRulesImpl(QString const & mapcssFile, QString const & outputDir
if (QFile(outputFile).exists())
throw std::runtime_error("Output directory is not clear");
// Add path to the protobuf EGG in the PROTOBUF_EGG_PATH environment variable
QProcessEnvironment env{QProcessEnvironment::systemEnvironment()};
env.insert("PROTOBUF_EGG_PATH", GetProtobufEggPath());
// Run the script
(void)ExecProcess("python", {
GetExternalPath("libkomwm.py", "kothic/src", "../tools/kothic/src"),
"-s", mapcssFile,
"-o", outputTemplate,
"-x", "True",
}, &env);
});
// Ensure that generated file is not empty.
if (QFile(outputFile).size() == 0)

View file

@ -22,16 +22,12 @@ QString GetStyleStatistics(QString const & mapcssMappingFile, QString const & dr
if (!QFile(drulesFile).exists())
throw std::runtime_error("drawing-rules file does not exist at " + drulesFile.toStdString());
// Add path to the protobuf EGG in the PROTOBUF_EGG_PATH environment variable.
QProcessEnvironment env{QProcessEnvironment::systemEnvironment()};
env.insert("PROTOBUF_EGG_PATH", GetProtobufEggPath());
// Run the script.
return ExecProcess("python", {
GetExternalPath("drules_info.py", "kothic/src", "../tools/python/stylesheet"),
mapcssMappingFile,
drulesFile,
}, &env);
});
}
QString GetCurrentStyleStatistics()

View file

@ -241,26 +241,26 @@ int main(int argc, char * argv[])
);
w.show();
returnCode = app.exec();
}
#ifdef BUILD_DESIGNER
if (build_style::NeedRecalculate && !mapcssFilePath.isEmpty())
{
try
if (build_style::NeedRecalculate && !mapcssFilePath.isEmpty())
{
build_style::RunRecalculationGeometryScript(mapcssFilePath);
try
{
build_style::RunRecalculationGeometryScript(mapcssFilePath);
}
catch (std::exception & e)
{
QMessageBox msgBox;
vng commented 2023-10-14 12:24:42 +00:00 (Migrated from github.com)
Review

Why additional indent here?

Why additional indent here?
biodranik commented 2023-10-15 07:42:51 +00:00 (Migrated from github.com)
Review

Indent looks ok:
image

Indent looks ok: <img width="790" alt="image" src="https://github.com/organicmaps/organicmaps/assets/170263/dfa4ef59-77d7-4331-abfc-fb512a77faab">
msgBox.setWindowTitle("Error");
msgBox.setText(e.what());
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec();
}
}
catch (std::exception & e)
{
QMessageBox msgBox;
msgBox.setWindowTitle("Error");
msgBox.setText(e.what());
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Ok);
msgBox.exec();
}
}
#endif // BUILD_DESIGNER
}
LOG_SHORT(LINFO, ("Organic Maps finished with code", returnCode));
return returnCode;

View file

@ -95,7 +95,7 @@ namespace qt
indexRegenCheckBox->setChecked(enabled);
connect(indexRegenCheckBox, &QCheckBox::stateChanged, [](int i)
{
settings::Set(kEnabledAutoRegenGeomIndex, static_cast<bool>(i))
settings::Set(kEnabledAutoRegenGeomIndex, static_cast<bool>(i));
});
}
#endif

@ -1 +1 @@
Subproject commit 51864cec294c56ca949618671e06dcc4f2543874
Subproject commit 2260f364af8165e870b6bda7cefd63727945b210

View file

@ -0,0 +1,5 @@
# Command to regenerate tools/python/stylesheet/drules_struct_pb2.py
```
protoc --proto_path=indexer --python_out=tools/python/stylesheet indexer/drules_struct.proto
```

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
../../kothic/src/drules_struct_pb2.py

View file

@ -3,6 +3,7 @@ OMIM_ROOT = $(PROJECT_DIR)/../..
QT_PATH[arch=x86_64] = /usr/local/opt/qt@5
QT_PATH[arch=arm64] = /opt/homebrew/opt/qt@5
BOOST_ROOT = $(OMIM_ROOT)/3party/boost
PROTOBUF_PATHS = $(OMIM_ROOT)/3party/protobuf/protobuf/third_party/abseil-cpp/ $(OMIM_ROOT)/3party/protobuf/protobuf/src
// jansson is included in many libs, and is also used in headers (leaks to other libs)
HEADER_SEARCH_PATHS = $(inherited) $(OMIM_ROOT) $(BOOST_ROOT) $(OMIM_ROOT)/3party/jansson $(OMIM_ROOT)/3party/jansson/jansson/src

View file

@ -999,6 +999,10 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"${PROTOBUF_PATHS}",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
@ -1007,6 +1011,10 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"${PROTOBUF_PATHS}",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;

View file

@ -1093,6 +1093,10 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"${PROTOBUF_PATHS}",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
@ -1101,6 +1105,10 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"${PROTOBUF_PATHS}",
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;

View file

@ -787,6 +787,10 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"${PROTOBUF_PATHS}",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = "-Wno-deprecated-register ";
};
@ -796,6 +800,10 @@
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
HEADER_SEARCH_PATHS = (
"$(inherited)",
"${PROTOBUF_PATHS}",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WARNING_CFLAGS = "-Wno-deprecated-register ";
};

File diff suppressed because it is too large Load diff