mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Do not build protobuf twice
This commit is contained in:
parent
3ce2d4f38f
commit
05349ce7a6
@ -12,13 +12,13 @@ macro (add_warning flag)
|
|||||||
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${flag}")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${flag}")
|
||||||
else ()
|
else ()
|
||||||
message (WARNING "Flag -W${flag} is unsupported")
|
message (STATUS "Flag -W${flag} is unsupported")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (SUPPORTS_CFLAG_${underscored_flag})
|
if (SUPPORTS_CFLAG_${underscored_flag})
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W${flag}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W${flag}")
|
||||||
else ()
|
else ()
|
||||||
message (WARNING "Flag -W${flag} is unsupported")
|
message (STATUS "Flag -W${flag} is unsupported")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
endmacro ()
|
endmacro ()
|
||||||
@ -39,7 +39,7 @@ macro (target_add_warning target flag)
|
|||||||
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
||||||
target_compile_options (${target} PRIVATE "-W${flag}")
|
target_compile_options (${target} PRIVATE "-W${flag}")
|
||||||
else ()
|
else ()
|
||||||
message (WARNING "Flag -W${flag} is unsupported")
|
message (STATUS "Flag -W${flag} is unsupported")
|
||||||
endif ()
|
endif ()
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
||||||
|
@ -211,7 +211,9 @@ add_library(protobuf::libprotoc ALIAS libprotoc)
|
|||||||
|
|
||||||
set(protoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc)
|
set(protoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc)
|
||||||
|
|
||||||
if (NOT CMAKE_CROSSCOMPILING)
|
if (CMAKE_HOST_SYSTEM_NAME STREQUAL CMAKE_SYSTEM_NAME
|
||||||
|
AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR)
|
||||||
|
|
||||||
add_executable(protoc ${protoc_files})
|
add_executable(protoc ${protoc_files})
|
||||||
target_link_libraries(protoc libprotoc libprotobuf pthread)
|
target_link_libraries(protoc libprotoc libprotobuf pthread)
|
||||||
add_executable(protobuf::protoc ALIAS protoc)
|
add_executable(protobuf::protoc ALIAS protoc)
|
||||||
|
Loading…
Reference in New Issue
Block a user