Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Fix windows build on newer MSVC #6732

Merged
merged 3 commits into from
Oct 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
simplify between platforms
  • Loading branch information
sharvilshah committed Oct 27, 2020
commit 46a9a393d7c3439b684ee618e40c76dbc5e1a008
14 changes: 4 additions & 10 deletions libraries/cmake/source/thrift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,14 @@ 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
if(DEFINED PLATFORM_WINDOWS)
target_compile_options(thirdparty_thrift PRIVATE
"${forced_include_file_flag}${CMAKE_CURRENT_SOURCE_DIR}/patches/random_shuffle.h"
)
else()
target_compile_options(thirdparty_thrift PRIVATE
"${forced_include_file_flag}" "${CMAKE_CURRENT_SOURCE_DIR}/patches/random_shuffle.h"
)
endif()
target_compile_options(thirdparty_thrift PRIVATE
"${forced_include_file_flag}${CMAKE_CURRENT_SOURCE_DIR}/patches/random_shuffle.h"
)

target_compile_definitions(thirdparty_thrift PRIVATE
THRIFT_STATIC_DEFINE
Expand Down