Files
clang-p2996/clang-tools-extra/pseudo/tool/CMakeLists.txt
Michael Kruse c87a7b3bdb [clang-tools-extra] Revise IDE folder structure (#89744)
Update the folder titles for targets in the monorepository that have not
seen taken care of for some time. These are the folders that targets are
organized in Visual Studio and XCode
(`set_property(TARGET <target> PROPERTY FOLDER "<title>")`)
when using the respective CMake's IDE generator.

 * Ensure that every target is in a folder
 * Use a folder hierarchy with each LLVM subproject as a top-level folder
 * Use consistent folder names between subprojects
 * When using target-creating functions from AddLLVM.cmake, automatically
deduce the folder. This reduces the number of
`set_property`/`set_target_property`, but are still necessary when
`add_custom_target`, `add_executable`, `add_library`, etc. are used. A
LLVM_SUBPROJECT_TITLE definition is used for that in each subproject's
root CMakeLists.txt.
2024-05-25 23:27:33 +02:00

31 lines
930 B
CMake

set(LLVM_LINK_COMPONENTS support)
add_clang_tool(clang-pseudo
ClangPseudo.cpp
HTMLForest.cpp
)
clang_target_link_libraries(clang-pseudo
PRIVATE
clangBasic
)
target_link_libraries(clang-pseudo
PRIVATE
clangPseudo
clangPseudoGrammar
clangPseudoCLI
)
add_custom_command(OUTPUT HTMLForestResources.inc
COMMAND "${Python3_EXECUTABLE}" ${CLANG_SOURCE_DIR}/utils/bundle_resources.py
${CMAKE_CURRENT_BINARY_DIR}/HTMLForestResources.inc
HTMLForest.css HTMLForest.js HTMLForest.html
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Bundling HTMLForest resources"
DEPENDS ${CLANG_SOURCE_DIR}/utils/bundle_resources.py HTMLForest.css HTMLForest.js HTMLForest.html
VERBATIM)
add_custom_target(clang-pseudo-resources DEPENDS HTMLForestResources.inc)
set_target_properties(clang-pseudo-resources PROPERTIES FOLDER "Clang Tools Extra/Resources")
add_dependencies(clang-pseudo clang-pseudo-resources)