Skip to content

Commit

Permalink
build: Fix windows build on newer MSVC (#6732)
Browse files Browse the repository at this point in the history
Correct how cmake passes the include for `random_shuffle`
  • Loading branch information
sharvilshah authored Oct 28, 2020
1 parent 22d614c commit ceeadb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/cmake/source/thrift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ function(thriftMain)
if(PLATFORM_WINDOWS)
set(forced_include_file_flag "/FI")
else()
set(forced_include_file_flag "-include")
set(forced_include_file_flag "--include")
endif()

# C++17 dropped support for random_shuffle. Add it back with a
# custom header
target_compile_options(thirdparty_thrift PRIVATE
"${forced_include_file_flag}" "${CMAKE_CURRENT_SOURCE_DIR}/patches/random_shuffle.h"
"${forced_include_file_flag}${CMAKE_CURRENT_SOURCE_DIR}/patches/random_shuffle.h"
)

target_compile_definitions(thirdparty_thrift PRIVATE
Expand Down

0 comments on commit ceeadb5

Please sign in to comment.