Skip to content

Commit

Permalink
[HIPIFY][ROCm#1021][ROCm#1022][build][MSVS][fix][partial] Fix for `er…
Browse files Browse the repository at this point in the history
…ror C2365` occurred on VS 2019 with ToT clang 18.0.0git

+ Widen the range of `MSVC_VERSION` from 1930 (initial version of VS 2022 17.0.0) to 1920 (initial version of VS 2019 16.0.0)
+ [Reason] Conforming preprocessor is needed for LLVM 18.0.0git on VS 2019 as well
+ [Details]
  https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-170
  https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview?view=msvc-160
  • Loading branch information
emankov committed Sep 16, 2023
1 parent 8ffed11 commit 514e515
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if (NOT HIPIFY_CLANG_TESTS_ONLY)
if(MSVC)
target_link_libraries(hipify-clang PRIVATE version)
target_compile_options(hipify-clang PRIVATE ${STD} /Od /GR- /EHs- /EHc-)
if((LLVM_PACKAGE_VERSION VERSION_EQUAL "18.0.0" OR LLVM_PACKAGE_VERSION VERSION_GREATER "18.0.0") AND MSVC_VERSION VERSION_GREATER "1929")
if((LLVM_PACKAGE_VERSION VERSION_EQUAL "18.0.0" OR LLVM_PACKAGE_VERSION VERSION_GREATER "18.0.0") AND MSVC_VERSION VERSION_GREATER "1919")
target_compile_options(hipify-clang PRIVATE /Zc:preprocessor)
endif()
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} /SUBSYSTEM:WINDOWS")
Expand Down

0 comments on commit 514e515

Please sign in to comment.