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 )
# MSVC doesn't like _DEBUG on release builds. See PR 4379.
if( NOT MSVC )
endif()
else()
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
- add_definitions( -DNDEBUG )
+ if( NOT MSVC_IDE AND NOT XCODE )
+ add_definitions( -DNDEBUG )
+ endif()
endif()
endif()
else(CYGWIN)
set(LLVM_ON_WIN32 1)
set(LLVM_ON_UNIX 0)
+
+ # This is effective only on Win32 hosts to use gnuwin32 tools.
+ set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools")
endif(CYGWIN)
set(LTDL_SHLIB_EXT ".dll")
set(EXEEXT ".exe")