[CMake] Fix set_output_directory to do nothing if *_OUTPUT_INTDIR was not given.

llvm-svn: 212313
This commit is contained in:
NAKAMURA Takumi 2014-07-04 04:23:15 +00:00
parent 6ba3a64e70
commit 38d45a2dc2
1 changed files with 5 additions and 0 deletions

View File

@ -150,6 +150,11 @@ endfunction(add_dead_strip)
# Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more,
# or a certain builder, for eaxample, msbuild.exe, would be confused.
function(set_output_directory target bindir libdir)
# Do nothing if *_OUTPUT_INTDIR is empty.
if("${bindir}" STREQUAL "")
return()
endif()
if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
foreach(build_mode ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${build_mode}" CONFIG_SUFFIX)