From 22926dd6512ca817ea2d1f2f79d4f06a6c0da618 Mon Sep 17 00:00:00 2001 From: Andrey Pokrovskiy Date: Wed, 22 Apr 2015 12:55:01 -0700 Subject: Allow CMAKE_TOOLCHAIN_FILE to be an empty string Do not try to include() an empty string in the generated CMakeSystem module. --- Modules/CMakeDetermineSystem.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v0.12