[PATCH] D107898: [CMake] Fix recompile all .inc files with LLVM_OPTIMIZED_TABLEGEN in Visual Studio.

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 22:02:14 PDT 2021


beanz added inline comments.


================
Comment at: llvm/cmake/modules/CrossCompile.cmake:107
 
+  if (CMAKE_GENERATOR MATCHES "Visual Studio")
+    set(output_path ${output_path}.exe)
----------------
smeenai wrote:
> Shouldn't this be something like `if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")`? The `.exe` suffix will be present whenever your native system is Windows.
Better yet, use `CMAKE_EXECUTABLE_SUFFIX`:
https://cmake.org/cmake/help/latest/variable/CMAKE_EXECUTABLE_SUFFIX.html


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107898/new/

https://reviews.llvm.org/D107898



More information about the llvm-commits mailing list