diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake --- a/llvm/cmake/modules/CrossCompile.cmake +++ b/llvm/cmake/modules/CrossCompile.cmake @@ -104,6 +104,10 @@ set(output_path "${${PROJECT_NAME}_NATIVE_BUILD}/bin/${target}") endif() + if (CMAKE_GENERATOR MATCHES "Visual Studio") + set(output_path ${output_path}.exe) + endif() + llvm_ExternalProject_BuildCmd(build_cmd ${target} ${${PROJECT_NAME}_NATIVE_BUILD} CONFIGURATION Release) add_custom_command(OUTPUT "${output_path}"