summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndrey Pokrovskiy <pokroa@amazon.com>2015-04-22 19:55:01 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-22 20:06:44 (GMT)
commit22926dd6512ca817ea2d1f2f79d4f06a6c0da618 (patch)
tree035dff431015e66a104f0560cc2149dce099f662 /Modules
parent6189cdda796296babe425b48272da17045052dbf (diff)
downloadCMake-22926dd6512ca817ea2d1f2f79d4f06a6c0da618.zip
CMake-22926dd6512ca817ea2d1f2f79d4f06a6c0da618.tar.gz
CMake-22926dd6512ca817ea2d1f2f79d4f06a6c0da618.tar.bz2
Allow CMAKE_TOOLCHAIN_FILE to be an empty string
Do not try to include() an empty string in the generated CMakeSystem module.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineSystem.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index fe292ea..fa14641 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -179,7 +179,7 @@ if(CMAKE_BINARY_DIR)
# if a toolchain file is used, it needs to be included in the configured file,
# so settings done there are also available if they don't go in the cache and in try_compile()
set(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED)
- if(DEFINED CMAKE_TOOLCHAIN_FILE)
+ if(CMAKE_TOOLCHAIN_FILE)
set(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "include(\"${CMAKE_TOOLCHAIN_FILE}\")")
endif()