diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -507,9 +507,6 @@ endif() set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit") -include(GetErrcMessages) -get_errc_messages(LLVM_LIT_ERRC_MESSAGES) - # On Win32 hosts, provide an option to specify the path to the GnuWin32 tools. if( WIN32 AND NOT CYGWIN ) set(LLVM_LIT_TOOLS_DIR "" CACHE PATH "Path to GnuWin32 tools") @@ -976,6 +973,10 @@ NO_INSTALL ALWAYS_CLEAN) endif() + + include(GetErrcMessages) + get_errc_messages(LLVM_LIT_ERRC_MESSAGES) + add_subdirectory(utils/lit) add_subdirectory(test) add_subdirectory(unittests) diff --git a/llvm/cmake/modules/GetErrcMessages.cmake b/llvm/cmake/modules/GetErrcMessages.cmake --- a/llvm/cmake/modules/GetErrcMessages.cmake +++ b/llvm/cmake/modules/GetErrcMessages.cmake @@ -4,7 +4,6 @@ # Messages are semi colon separated. # Keep amount, order and tested error codes in sync with llvm/utils/lit/lit/llvm/config.py. function(get_errc_messages outvar) - set(errc_test_code ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/getErrc.cpp) file(WRITE ${errc_test_code} "