Browse Source

fix compiles fail with cmake version greater than 3.17 on windows

tags/v0.2.0-alpha
zhoufeng 5 years ago
parent
commit
c72bafaec9
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      README.md
  2. +4
    -0
      cmake/utils.cmake

+ 1
- 1
README.md View File

@@ -69,7 +69,7 @@ MindSpore offers build options across multiple backends:
| GPU CUDA 9.2 | Ubuntu-x86 | ✔️ | | GPU CUDA 9.2 | Ubuntu-x86 | ✔️ |
| GPU CUDA 10.1 | Ubuntu-x86 | ✔️ | | GPU CUDA 10.1 | Ubuntu-x86 | ✔️ |
| CPU | Ubuntu-x86 | ✔️ | | CPU | Ubuntu-x86 | ✔️ |
| CPU | Windows-x86 | ✔️ |
| | Windows-x86 | ✔️ |


For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an example: For installation using `pip`, take `CPU` and `Ubuntu-x86` build version as an example:




+ 4
- 0
cmake/utils.cmake View File

@@ -1,6 +1,10 @@
include(FetchContent) include(FetchContent)
set(FETCHCONTENT_QUIET OFF) set(FETCHCONTENT_QUIET OFF)


if (CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.17.0)
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll ${CMAKE_FIND_LIBRARY_SUFFIXES})
endif ()

function(mindspore_add_submodule_obj des_submodule_objs sub_dir submodule_name_obj) function(mindspore_add_submodule_obj des_submodule_objs sub_dir submodule_name_obj)


add_subdirectory(${sub_dir}) add_subdirectory(${sub_dir})


Loading…
Cancel
Save