Disabled version.rc for clang-cl (#8139)

pull/8703/head
Jorge López Fueyo 4 years ago committed by GitHub
parent 8d8ba6acc3
commit 1ae531d73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      cmake/CMakeLists.txt
  2. 2
      cmake/libprotobuf-lite.cmake
  3. 2
      cmake/libprotobuf.cmake
  4. 2
      cmake/libprotoc.cmake
  5. 2
      cmake/protoc.cmake

@ -193,8 +193,10 @@ else (protobuf_BUILD_SHARED_LIBS)
endif (protobuf_BUILD_SHARED_LIBS)
if (MSVC)
# Build with multiple processes
add_definitions(/MP)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Build with multiple processes
add_definitions(/MP)
endif()
# MSVC warning suppressions
add_definitions(
/wd4018 # 'expression' : signed/unsigned mismatch
@ -222,12 +224,14 @@ if (MSVC)
# Suppress linker warnings about files with no symbols defined.
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
# Configure Resource Compiler
enable_language(RC)
# use English language (0x409) in resource compiler
set(rc_flags "/l0x409")
# fix rc.exe invocations because of usage of add_definitions()
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_flags} <DEFINES> /fo<OBJECT> <SOURCE>")
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Configure Resource Compiler
enable_language(RC)
# use English language (0x409) in resource compiler
set(rc_flags "/l0x409")
# fix rc.exe invocations because of usage of add_definitions()
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_flags} <DEFINES> /fo<OBJECT> <SOURCE>")
endif()
configure_file(version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
endif (MSVC)

@ -58,7 +58,7 @@ set(libprotobuf_lite_includes
${protobuf_source_dir}/src/google/protobuf/wire_format_lite.h
)
if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(libprotobuf_lite_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)

@ -107,7 +107,7 @@ set(libprotobuf_includes
${protobuf_source_dir}/src/google/protobuf/wrappers.pb.h
)
if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(libprotobuf_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)

@ -163,7 +163,7 @@ set(libprotoc_headers
${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
)
if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(libprotoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)

@ -2,7 +2,7 @@ set(protoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
)
if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(protoc_rc_files
${CMAKE_CURRENT_BINARY_DIR}/version.rc
)

Loading…
Cancel
Save