2013-04-05 04:19:58 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS support)
|
|
|
|
|
2013-09-05 01:35:07 +08:00
|
|
|
set (ClangModernizeSources
|
|
|
|
ClangModernize.cpp
|
2013-04-05 04:19:58 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# FIXME: Lib-ify the transforms to simplify the build rules.
|
|
|
|
|
|
|
|
# For each transform subdirectory.
|
|
|
|
file(GLOB_RECURSE LoopConvertSources "../LoopConvert/*.cpp")
|
2013-09-05 01:35:07 +08:00
|
|
|
list(APPEND ClangModernizeSources ${LoopConvertSources})
|
2013-04-05 04:19:58 +08:00
|
|
|
|
|
|
|
file(GLOB_RECURSE UseNullptrSources "../UseNullptr/*.cpp")
|
2013-09-05 01:35:07 +08:00
|
|
|
list(APPEND ClangModernizeSources ${UseNullptrSources})
|
2013-04-05 04:19:58 +08:00
|
|
|
|
|
|
|
file(GLOB_RECURSE UseAutoSources "../UseAuto/*.cpp")
|
2013-09-05 01:35:07 +08:00
|
|
|
list(APPEND ClangModernizeSources ${UseAutoSources})
|
2013-04-05 04:19:58 +08:00
|
|
|
|
2013-04-10 04:49:49 +08:00
|
|
|
file(GLOB_RECURSE AddOverrideSources "../AddOverride/*.cpp")
|
2013-09-05 01:35:07 +08:00
|
|
|
list(APPEND ClangModernizeSources ${AddOverrideSources})
|
2013-04-10 04:49:49 +08:00
|
|
|
|
2013-08-29 21:42:13 +08:00
|
|
|
file(GLOB_RECURSE PassByValueSources "../PassByValue/*.cpp")
|
2013-09-05 01:35:07 +08:00
|
|
|
list(APPEND ClangModernizeSources ${PassByValueSources})
|
2013-08-29 21:42:13 +08:00
|
|
|
|
2013-07-03 21:21:24 +08:00
|
|
|
file(GLOB_RECURSE ReplaceAutoPtrSources "../ReplaceAutoPtr/*.cpp")
|
2013-09-05 01:35:07 +08:00
|
|
|
list(APPEND ClangModernizeSources ${ReplaceAutoPtrSources})
|
2013-07-03 21:21:24 +08:00
|
|
|
|
2013-09-05 01:35:07 +08:00
|
|
|
add_clang_executable(clang-modernize
|
|
|
|
${ClangModernizeSources}
|
2013-04-05 04:19:58 +08:00
|
|
|
)
|
|
|
|
|
2013-09-05 01:35:07 +08:00
|
|
|
add_dependencies(clang-modernize
|
2013-10-16 02:01:06 +08:00
|
|
|
clang-headers clang-apply-replacements
|
2013-04-05 04:19:58 +08:00
|
|
|
)
|
|
|
|
|
2013-09-05 01:35:07 +08:00
|
|
|
target_link_libraries(clang-modernize
|
|
|
|
modernizeCore
|
2013-04-05 04:19:58 +08:00
|
|
|
)
|
2013-06-14 19:25:50 +08:00
|
|
|
|
2013-09-05 01:35:07 +08:00
|
|
|
install(TARGETS clang-modernize
|
2013-06-14 19:25:50 +08:00
|
|
|
RUNTIME DESTINATION bin)
|