Skip to content

Commit

Permalink
Can't use /WX:NO and use function for scope
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 31, 2023
1 parent d47cfbc commit c0d00c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,8 @@ macro(prepare_fetchcontent)
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY TRUE)
set(CMAKE_COMPILE_WARNING_AS_ERROR FALSE)
if(MSVC)
string(APPEND CMAKE_C_FLAGS_DEBUG " /WX:NO")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " /WX:NO")
string(REPLACE "/WX" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REPLACE "/WX" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
else()
string(APPEND CMAKE_C_FLAGS_DEBUG " -Wno-error")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -Wno-error")
Expand Down Expand Up @@ -2095,7 +2095,7 @@ endif()
# ----------------------------------------------------------------------
# Google gtest

macro(build_gtest)
function(build_gtest)
message(STATUS "Building gtest from source")
set(GTEST_VENDORED TRUE)
fetchcontent_declare(googletest
Expand Down Expand Up @@ -2132,7 +2132,7 @@ macro(build_gtest)
add_library(arrow::GTest::gmock_main ALIAS gmock_main)
add_library(arrow::GTest::gtest ALIAS gtest)
add_library(arrow::GTest::gtest_main ALIAS gtest_main)
endmacro()
endfunction()

if(ARROW_TESTING)
set(GTestAlt_NEED_CXX_STANDARD_CHECK TRUE)
Expand Down

0 comments on commit c0d00c9

Please sign in to comment.