Allow CMAKE_TOOLCHAIN_FILE to be an empty string

Do not try to include() an empty string in the generated CMakeSystem
module.
This commit is contained in:
Andrey Pokrovskiy 2015-04-22 12:55:01 -07:00 committed by Brad King
parent 6189cdda79
commit 22926dd651
1 changed files with 1 additions and 1 deletions

View File

@ -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()