Moved more stuff to HandleLLVMOptions.cmake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Oscar Fuentes 2011-02-05 19:08:42 +00:00
parent 479b4b9ef0
commit 5a858e3416
2 changed files with 21 additions and 21 deletions

View File

@ -34,20 +34,6 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
Please delete them.") Please delete them.")
endif() endif()
# Run-time build mode; It is used for unittests.
if(MSVC_IDE)
# Expect "$(Configuration)", "$(OutDir)", etc.
# It is expanded by msbuild or similar.
set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}")
elseif(NOT CMAKE_BUILD_TYPE STREQUAL "")
# Expect "Release" "Debug", etc.
# Or unittests could not run.
set(RUNTIME_BUILD_MODE ${CMAKE_BUILD_TYPE})
else()
# It might be "."
set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}")
endif()
string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
@ -118,13 +104,6 @@ set(FFI_INCLUDE_DIR "" CACHE PATH "Additional directory, where CMake should sear
set(LLVM_TARGET_ARCH "host" set(LLVM_TARGET_ARCH "host"
CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.") CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.")
set(LIT_ARGS_DEFAULT "-sv")
if (MSVC OR XCODE)
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
endif()
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"
CACHE STRING "Default options for lit")
option(LLVM_ENABLE_THREADS "Use threads if available." ON) option(LLVM_ENABLE_THREADS "Use threads if available." ON)
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )

View File

@ -1,5 +1,26 @@
include(AddLLVMDefinitions) include(AddLLVMDefinitions)
# Run-time build mode; It is used for unittests.
if(MSVC_IDE)
# Expect "$(Configuration)", "$(OutDir)", etc.
# It is expanded by msbuild or similar.
set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}")
elseif(NOT CMAKE_BUILD_TYPE STREQUAL "")
# Expect "Release" "Debug", etc.
# Or unittests could not run.
set(RUNTIME_BUILD_MODE ${CMAKE_BUILD_TYPE})
else()
# It might be "."
set(RUNTIME_BUILD_MODE "${CMAKE_CFG_INTDIR}")
endif()
set(LIT_ARGS_DEFAULT "-sv")
if (MSVC OR XCODE)
set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
endif()
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}"
CACHE STRING "Default options for lit")
if( LLVM_ENABLE_ASSERTIONS ) if( LLVM_ENABLE_ASSERTIONS )
# MSVC doesn't like _DEBUG on release builds. See PR 4379. # MSVC doesn't like _DEBUG on release builds. See PR 4379.
if( NOT MSVC ) if( NOT MSVC )