forked from OSchip/llvm-project
unittests/CMakeLists.txt: Tweak unittests' layout to be identical to GNU build.
llvm-svn: 121117
This commit is contained in:
parent
65e364e5da
commit
7291ebc353
|
@ -1,10 +1,11 @@
|
|||
function(add_llvm_unittest test_name)
|
||||
function(add_llvm_unittest test_dirname)
|
||||
string(REGEX MATCH "([^/]+)$" test_name ${test_dirname})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
${LLVM_BINARY_DIR}/unittests/${test_name}/${CMAKE_BUILD_TYPE})
|
||||
${LLVM_BINARY_DIR}/unittests/${test_dirname}/${CMAKE_BUILD_TYPE})
|
||||
else()
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
||||
${LLVM_BINARY_DIR}/unittests/${test_name})
|
||||
${LLVM_BINARY_DIR}/unittests/${test_dirname})
|
||||
endif()
|
||||
if( NOT LLVM_BUILD_TESTS )
|
||||
set(EXCLUDE_FROM_ALL ON)
|
||||
|
@ -79,13 +80,13 @@ if(MSVC)
|
|||
list(APPEND JITTestsSources ExecutionEngine/JIT/JITTests.def)
|
||||
endif()
|
||||
|
||||
add_llvm_unittest(JIT ${JITTestsSources})
|
||||
add_llvm_unittest(ExecutionEngine/JIT ${JITTestsSources})
|
||||
|
||||
if(MINGW)
|
||||
set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
|
||||
endif()
|
||||
|
||||
add_llvm_unittest(Transforms
|
||||
add_llvm_unittest(Transforms/Utils
|
||||
Transforms/Utils/Cloning.cpp
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue