[lldb] Add ability to hide the root name of a value
[llvm-project.git] / flang / unittests / CMakeLists.txt
blob1b4fb986f6e3913189b6a5b217dc8314f0b8f475
1 add_custom_target(FlangUnitTests)
2 set_target_properties(FlangUnitTests PROPERTIES FOLDER "Flang Unit Tests")
4 function(add_flang_unittest test_dirname)
5   add_unittest(FlangUnitTests ${test_dirname} ${ARGN})
6 endfunction()
8 if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)
9   add_compile_options("-Wno-suggest-override")
10 endif()
12 function(add_flang_nongtest_unittest test_name)
13   cmake_parse_arguments(ARG
14     "SLOW_TEST"
15     ""
16     ""
17     ${ARGN})
19   if(ARG_SLOW_TEST)
20       set(suffix .slow)
21   else()
22       set(suffix .test)
23   endif()
25   add_executable(${test_name}${suffix} ${test_name}.cpp)
27   if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
28     set(llvm_libs LLVM)
29   else()
30     llvm_map_components_to_libnames(llvm_libs Support)
31   endif()
32   target_link_libraries(${test_name}${suffix} ${llvm_libs} ${ARG_UNPARSED_ARGUMENTS})
34   if(NOT ARG_SLOW_TEST)
35     add_dependencies(FlangUnitTests ${test_name}${suffix})
36   endif()
37 endfunction()
39 add_subdirectory(Optimizer)
40 add_subdirectory(Common)
41 add_subdirectory(Decimal)
42 add_subdirectory(Evaluate)
43 add_subdirectory(Runtime)
44 add_subdirectory(Frontend)