Skip to content

Commit 880af30

Browse files
authored
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 .. ```
1 parent 31bb4b5 commit 880af30

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cmake/config.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,9 @@ set(USE_UMA OFF)
445445

446446
# Set custom Alloc Alignment for device allocated memory ndarray points to
447447
set(USE_KALLOC_ALIGNMENT 64)
448+
449+
# Set Windows Visual Studio default Architecture (equivalent to -A x64)
450+
SET(CMAKE_VS_PLATFORM_NAME_DEFAULT "x64")
451+
452+
# Set Windows Visual Studio default host (equivalent to -Thost=x64)
453+
SET(CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE "x64")

docs/install/from_source.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ get an activated tvm-build environment. Then you can run the following command t
259259
260260
mkdir build
261261
cd build
262-
cmake -A x64 -Thost=x64 ..
262+
cmake ..
263263
cd ..
264264
265265
The above command generates the solution file under the build directory.

0 commit comments

Comments
 (0)