Skip to content

Commit

Permalink
Add MSVC flags only on windows
Browse files Browse the repository at this point in the history
Accidentally added them without a OS check earlier
  • Loading branch information
9prady9 committed Mar 25, 2019
1 parent 61a3ea6 commit 6d7a4f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ function(add_example target_name source backend)
string(TOLOWER ${backend} lowerCaseBackend)

if (${lowerCaseBackend} STREQUAL "cuda")
set(native_cc_flags
"-Xcompiler /wd4275 -Xcompiler /bigobj -Xcompiler /EHsc")
set(native_cc_flags "")
if (WIN32)
set(native_cc_flags
"-Xcompiler /wd4275 -Xcompiler /bigobj -Xcompiler /EHsc")
endif ()
cuda_add_executable(${target} ${source}
OPTIONS "${native_cc_flags} -Xcudafe \"--diag_suppress=1388\""
)
Expand Down

0 comments on commit 6d7a4f8

Please sign in to comment.