@@ -4,50 +4,18 @@ include(LLVMProcessSources)
44include (LLVM-Config)
55include (DetermineGCCCompatible)
66
7- # Set ${outvar} to the title of the current LLVM subproject (Clang, Flang, MLIR ...)
7+ # get_subproject_title(titlevar)
8+ # Set ${outvar} to the title of the current LLVM subproject (Clang, MLIR ...)
89#
10+ # The title is set in the subproject's top-level using the variable
11+ # LLVM_SUBPROJECT_TITLE. If it does not exist, it is assumed it is LLVM itself.
12+ # The title is not semantically significant, but use to create folders in
13+ # CMake-generated IDE projects (Visual Studio/XCode).
914function (get_subproject_title outvar)
1015 if (LLVM_SUBPROJECT_TITLE)
1116 set (${outvar} "${LLVM_SUBPROJECT_TITLE} " PARENT_SCOPE)
1217 else ()
13- set (cur_rel_dir "${CMAKE_CURRENT_SOURCE_DIR} " )
14- set (topdir "${CMAKE_SOURCE_DIR} /.." )
15- cmake_path(NORMAL_PATH topdir)
16- cmake_path(RELATIVE_PATH cur_rel_dir BASE_DIRECTORY "${topdir} " )
17- string (REGEX REPLACE "/.*" "" cur_rel_topdir "${cur_rel_dir} " )
18-
19- set (subproject_title "Unknown ${cur_rel_topdir} " )
20- if (cur_rel_topdir STREQUAL "llvm" )
21- set (subproject_title "LLVM" )
22- #elseif (cur_rel_topdir STREQUAL "clang")
23- # set(subproject_title "Clang")
24- #elseif (cur_rel_topdir STREQUAL "mlir")
25- # set(subproject_title "MLIR")
26- #elseif (cur_rel_topdir STREQUAL "clang-tools-extra")
27- # set(subproject_title "Clang Tools Extra")
28- #elseif (cur_rel_topdir STREQUAL "flang")
29- # set(subproject_title "Flang")
30- #elseif (cur_rel_topdir STREQUAL "polly")
31- # set(subproject_title "Polly")
32- #elseif (cur_rel_topdir STREQUAL "cross-project-tests")
33- # set(subproject_title "Cross-Project")
34- #elseif (cur_rel_topdir STREQUAL "bolt")
35- # set(subproject_title "BOLT")
36- #elseif (cur_rel_topdir STREQUAL "lld")
37- # set(subproject_title "LLD")
38- #elseif (cur_rel_topdir STREQUAL "lldb")
39- # set(subproject_title "LLDB")
40- #elseif (cur_rel_topdir STREQUAL "libclc")
41- # set(subproject_title "libclc")
42- #elseif (cur_rel_topdir STREQUAL "openmp")
43- # set(subproject_title "OpenMP")
44- #elseif (cur_rel_topdir STREQUAL "compiler-rt")
45- # set(subproject_title "Compiler-RT")
46- else ()
47- message (WARNING "Unknown subproject: ${cur_rel_topdir} " )
48- endif ()
49-
50- set (${outvar} "${subproject_title} " PARENT_SCOPE)
18+ set (${outvar} "LLVM" PARENT_SCOPE)
5119 endif ()
5220endfunction (get_subproject_title)
5321
0 commit comments