X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=CMakeLists.txt;h=df781f52cdd289ae41b9390ae1babf04e940cb80;hb=59e6586ee00ec145be50f9eb2f71ed308fb5e60a;hp=bb64db91bc6764142ce3292b46cbb6868038da4a;hpb=cf23bd3d8f7e7dec6331043295dbf1ec92fedb4f;p=oota-llvm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index bb64db91bc6..df781f52cdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,6 +99,9 @@ else( MSVC ) CACHE STRING "Semicolon-separated list of targets to build, or \"all\".") endif( MSVC ) +set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "" + CACHE STRING "Semicolon-separated list of experimental targets to build.") + option(BUILD_SHARED_LIBS "Build all libraries as shared libraries instead of static" OFF) @@ -125,10 +128,15 @@ if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} ) endif() +set(LLVM_TARGETS_TO_BUILD + ${LLVM_TARGETS_TO_BUILD} + ${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}) + set(LLVM_ENUM_TARGETS "") foreach(c ${LLVM_TARGETS_TO_BUILD}) list(FIND LLVM_ALL_TARGETS ${c} idx) - if( idx LESS 0 ) + list(FIND LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ${c} idy) + if( idx LESS 0 AND idy LESS 0 ) message(FATAL_ERROR "The target `${c}' does not exist. It should be one of\n${LLVM_ALL_TARGETS}") else() @@ -241,6 +249,14 @@ option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON) # BEFORE this include, otherwise options will not be correctly set on # first cmake run include(config-ix) + +# By default, we target the host, but this can be overridden at CMake +# invocation time. +set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING + "Default target for which LLVM will generate code." ) +set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE STRING + "Default target for which LLVM will generate code." ) + include(HandleLLVMOptions) # Verify that we can find a Python interpreter, @@ -402,6 +418,7 @@ add_subdirectory(utils/not) add_subdirectory(utils/llvm-lit) add_subdirectory(utils/yaml-bench) add_subdirectory(utils/obj2yaml) +add_subdirectory(utils/yaml2obj) add_subdirectory(projects)