1 # Returns the host triple.
4 function( get_target_triple var )
6 set( ${var} "i686-pc-win32" PARENT_SCOPE )
8 set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
9 execute_process(COMMAND sh ${config_guess}
11 OUTPUT_VARIABLE TT_OUT
12 OUTPUT_STRIP_TRAILING_WHITESPACE)
13 if( NOT TT_RV EQUAL 0 )
14 message(FATAL_ERROR "Failed to execute ${config_guess}")
15 endif( NOT TT_RV EQUAL 0 )
16 set( ${var} ${TT_OUT} PARENT_SCOPE )
17 message(STATUS "Target triple: ${${var}}")
19 endfunction( get_target_triple var )