| # Returns the host triple.
|
| function( get_target_triple var )
|
| set( value "x86_64-pc-win32" )
|
| set( value "i686-pc-win32" )
|
| elseif( MINGW AND NOT MSYS )
|
| if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
| set( value "x86_64-w64-mingw32" )
|
| set( value "i686-pc-mingw32" )
|
| set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
|
| execute_process(COMMAND sh ${config_guess}
|
| OUTPUT_STRIP_TRAILING_WHITESPACE)
|
| message(FATAL_ERROR "Failed to execute ${config_guess}")
|
| endif( NOT TT_RV EQUAL 0 )
|
| set( ${var} ${value} PARENT_SCOPE )
|
| message(STATUS "Target triple: ${value}")
|
| endfunction( get_target_triple var )
|