<commit_before># ******************************************************************************
# Copyright (c) 2017-2018 Intel Copyright
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by application law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************

set(ONNX_SOURCE_URL "https://raw.githubusercontent.com/onnx/onnx/v1.1.2/onnx/onnx.proto")

set_source_files_properties(onnx.pb.h onnx.pb.cc PROPERTIES GENERATED TRUE)

if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/onnx.proto")
    file(DOWNLOAD ${ONNX_SOURCE_URL} ${CMAKE_CURRENT_BINARY_DIR}/onnx.proto)
endif()

add_custom_command(OUTPUT onnx.pb.cc onnx.pb.h
        COMMAND protobuf::protoc --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/onnx.proto
        DEPENDS onnx.proto)

add_library(onnx_import_interface OBJECT
        onnx.cpp
        onnx.hpp
        onnx.pb.h
        onnx.proto)

add_library(onnx_import STATIC
        onnx.pb.cc
        attribute.cpp
        exceptions.hpp
        graph.cpp
        model.hpp
        node.cpp
        op/add.hpp
        op/batch_norm.hpp
        op/constant.cpp
        op/constant.hpp
        op/relu.hpp
        op/split.hpp
        ops_bridge.cpp
        tensor.hpp
        value_info.hpp)

add_dependencies(onnx_import onnx_import_interface)

if (NOT NGRAPH_USE_SYSTEM_PROTOBUF)
    add_dependencies(onnx_import_interface protobuf::libprotobuf)    
    add_dependencies(onnx_import protobuf::libprotobuf)
endif()

set_property(TARGET onnx_import PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(onnx_import PUBLIC ${CMAKE_CURRENT_BINARY_DIR} PRIVATE ${NGRAPH_INCLUDE_PATH} ${Protobuf_INCLUDE_DIR})
target_link_libraries(onnx_import PRIVATE ${Protobuf_LIBRARIES})

set_property(TARGET onnx_import_interface PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(onnx_import_interface PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
    ${NGRAPH_INCLUDE_PATH} ${Protobuf_INCLUDE_DIR})

if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Apple)?Clang$")
    target_compile_options(onnx_import PRIVATE -Wno-undef -Wno-reserved-id-macro -Wno-switch-enum
            -Wno-extended-offsetof -Wno-zero-as-null-pointer-constant -Wno-shorten-64-to-32 -Wno-unused-macros
            -Wno-missing-variable-declarations -Wno-unused-private-field)
    target_compile_options(onnx_import_interface PRIVATE -Wno-undef -Wno-reserved-id-macro -Wno-switch-enum
            -Wno-extended-offsetof -Wno-zero-as-null-pointer-constant -Wno-shorten-64-to-32 -Wno-unused-macros
            -Wno-missing-variable-declarations -Wno-unused-private-field)
endif()<commit_msg>[ONNX] Change compiler options (#1466)<commit_after># ******************************************************************************
# Copyright (c) 2017-2018 Intel Copyright
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by application law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************

set(ONNX_SOURCE_URL "https://raw.githubusercontent.com/onnx/onnx/v1.1.2/onnx/onnx.proto")

set_source_files_properties(onnx.pb.h onnx.pb.cc PROPERTIES GENERATED TRUE)

if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/onnx.proto")
    file(DOWNLOAD ${ONNX_SOURCE_URL} ${CMAKE_CURRENT_BINARY_DIR}/onnx.proto)
endif()

add_custom_command(OUTPUT onnx.pb.cc onnx.pb.h
        COMMAND protobuf::protoc --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/onnx.proto
        DEPENDS onnx.proto)

add_library(onnx_import_interface OBJECT
        onnx.cpp
        onnx.hpp
        onnx.pb.h
        onnx.proto)

add_library(onnx_import STATIC
        onnx.pb.cc
        attribute.cpp
        exceptions.hpp
        graph.cpp
        model.hpp
        node.cpp
        op/add.hpp
        op/batch_norm.hpp
        op/constant.cpp
        op/constant.hpp
        op/relu.hpp
        op/split.hpp
        ops_bridge.cpp
        tensor.hpp
        value_info.hpp)

add_dependencies(onnx_import onnx_import_interface)

if (NOT NGRAPH_USE_SYSTEM_PROTOBUF)
    add_dependencies(onnx_import_interface protobuf::libprotobuf)
    add_dependencies(onnx_import protobuf::libprotobuf)
endif()

set_property(TARGET onnx_import PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(onnx_import PUBLIC ${CMAKE_CURRENT_BINARY_DIR} PRIVATE ${NGRAPH_INCLUDE_PATH} ${Protobuf_INCLUDE_DIR})
target_link_libraries(onnx_import PRIVATE ${Protobuf_LIBRARIES})

set_property(TARGET onnx_import_interface PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(onnx_import_interface PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
    ${NGRAPH_INCLUDE_PATH} ${Protobuf_INCLUDE_DIR})

if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Apple)?Clang$")
    target_compile_options(onnx_import PRIVATE -Wno-undef -Wno-reserved-id-macro -Wno-switch-enum
            -Wno-extended-offsetof -Wno-shorten-64-to-32 -Wno-unused-macros -Wno-missing-variable-declarations
            -Wno-unused-private-field -Wno-shadow -Wno-deprecated)
    target_compile_options(onnx_import_interface PRIVATE -Wno-undef -Wno-reserved-id-macro -Wno-switch-enum
            -Wno-extended-offsetof -Wno-shorten-64-to-32 -Wno-unused-macros -Wno-missing-variable-declarations
            -Wno-unused-private-field -Wno-shadow -Wno-deprecated)
endif()
{'fraction_non_alphanumeric': 0.13825546164885982, 'fraction_numerical': 0.007973210014351778, 'mean_word_length': 4.1536565324568615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3740611', 'n_tokens_mistral': 2118, 'n_tokens_neox': 1994, 'n_words': 395}