mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 03:09:02 +08:00
3975146c8a
* [json-c] update to version 0.17 2023-08-12 * [json-c] update version database * [clamav] update to version 0.103.11 * [clamav] update version db * [clamav] add patch to compile isnt.cpp on windows * [clamav] update version db * [clamav] remove extra port version * [clamav] update version db * fix cmakelists.txt * update version * fix cmakelists.txt * update git-tree * remove fix-cmakelists.patch * update git-tree * format * update git-tree --------- Co-authored-by: Monica <liuyumei01@beyondsoft.com>
23 lines
1.2 KiB
Diff
23 lines
1.2 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0aa1b64..54e7b3d 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -295,7 +295,7 @@ message(STATUS "Wrote ${PROJECT_BINARY_DIR}/config.h")
|
|
configure_file(${PROJECT_SOURCE_DIR}/cmake/json_config.h.in ${PROJECT_BINARY_DIR}/json_config.h)
|
|
message(STATUS "Wrote ${PROJECT_BINARY_DIR}/json_config.h")
|
|
|
|
-if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
|
+if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" AND NOT MSVC)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
|
if ("${DISABLE_WERROR}" STREQUAL "OFF")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
|
@@ -316,7 +316,7 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
|
|
# Remove this for 1.0 when we can bump the ABI and actually fix these warnings.
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-shorten-64-to-32")
|
|
endif()
|
|
-elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|
+elseif (MSVC)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DEBUG")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4100")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996")
|