diff options
author | Erik Smistad <ersmistad@gmail.com> | 2018-09-20 15:56:34 +0200 |
---|---|---|
committer | Erik Smistad <ersmistad@gmail.com> | 2018-09-20 15:56:34 +0200 |
commit | 78e205d35b31aa49e8dac357d827900a165f0a21 (patch) | |
tree | ad1d920498ac00019d6aeeb775aa9e08c80a3028 /tensorflow/contrib | |
parent | 6890731b2693f6b71dedaca6b2eaf8b488226836 (diff) |
Added warning message if cmake version is below 3.8 or host toolset is not set to x64 on windows
Diffstat (limited to 'tensorflow/contrib')
-rw-r--r-- | tensorflow/contrib/cmake/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tensorflow/contrib/cmake/CMakeLists.txt b/tensorflow/contrib/cmake/CMakeLists.txt index 225c5e6227..a7a66472df 100644 --- a/tensorflow/contrib/cmake/CMakeLists.txt +++ b/tensorflow/contrib/cmake/CMakeLists.txt @@ -1,8 +1,14 @@ # Minimum CMake required +cmake_minimum_required(VERSION 3.5) + if(WIN32) - cmake_minimum_required(VERSION 3.8) -else() - cmake_minimum_required(VERSION 3.5) + if(${CMAKE_VERSION} VERSION_LESS "3.8") + message(WARNING "Your current cmake version is ${CMAKE_VERSION} which does not support setting the toolset architecture to x64. This may cause \"compiler out of heap space\" errors when building. Consider upgrading your cmake to > 3.8 and using the flag -Thost=x64 when running cmake.") + else() + if(NOT CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE OR NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "x64") + message(WARNING "Your current cmake generator is set to use 32 bit toolset architecture. This may cause \"compiler out of heap space\" errors when building. Consider using the flag -Thost=x64 when running cmake.") + endif() + endif() endif() # Project |