This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 880af308ee Simplify Windows CMake Command (#16656)
880af308ee is described below
commit 880af308ee125c0fbf6b94abb4dc43a46819514b
Author: Kyle Leaders <[email protected]>
AuthorDate: Mon Mar 4 05:56:40 2024 -0800
Simplify Windows CMake Command (#16656)
This sets the arguments recommended previously in the docs as the
default windows build args for the cmake generate step.
Instead of needing to say:
```bash
cmake -A x64 -Thost=x64 ..
```
Its now the same as linux and mac:
```bash
cmake ..
```
---
cmake/config.cmake | 6 ++++++
docs/install/from_source.rst | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/cmake/config.cmake b/cmake/config.cmake
index 8caaeb7e1e..e175902f2d 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -445,3 +445,9 @@ set(USE_UMA OFF)
# Set custom Alloc Alignment for device allocated memory ndarray points to
set(USE_KALLOC_ALIGNMENT 64)
+
+# Set Windows Visual Studio default Architecture (equivalent to -A x64)
+SET(CMAKE_VS_PLATFORM_NAME_DEFAULT "x64")
+
+# Set Windows Visual Studio default host (equivalent to -Thost=x64)
+SET(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE "x64")
diff --git a/docs/install/from_source.rst b/docs/install/from_source.rst
index a25a27c563..4dc14863a8 100644
--- a/docs/install/from_source.rst
+++ b/docs/install/from_source.rst
@@ -259,7 +259,7 @@ get an activated tvm-build environment. Then you can run
the following command t
mkdir build
cd build
- cmake -A x64 -Thost=x64 ..
+ cmake ..
cd ..
The above command generates the solution file under the build directory.