Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 1 | set( LLVM_USED_LIBS |
Jeffrey Yasskin | 0a86d44 | 2011-02-11 23:46:38 +0000 | [diff] [blame] | 2 | clangAST |
| 3 | clangAnalysis |
| 4 | clangBasic |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 5 | clangCodeGen |
Jeffrey Yasskin | 0a86d44 | 2011-02-11 23:46:38 +0000 | [diff] [blame] | 6 | clangDriver |
| 7 | clangFrontend |
| 8 | clangFrontendTool |
| 9 | clangIndex |
| 10 | clangLex |
John McCall | 1951085 | 2010-08-20 18:27:03 +0000 | [diff] [blame] | 11 | clangParse |
Jeffrey Yasskin | 0a86d44 | 2011-02-11 23:46:38 +0000 | [diff] [blame] | 12 | clangRewrite |
Chandler Carruth | e89d1d5 | 2010-01-29 10:03:42 +0000 | [diff] [blame] | 13 | clangSema |
Jeffrey Yasskin | 0a86d44 | 2011-02-11 23:46:38 +0000 | [diff] [blame] | 14 | clangSerialization |
Argyrios Kyrtzidis | e817771 | 2011-02-14 18:13:01 +0000 | [diff] [blame] | 15 | clangStaticAnalyzerFrontend |
Ted Kremenek | 2114258 | 2010-12-23 19:38:26 +0000 | [diff] [blame] | 16 | clangStaticAnalyzerCheckers |
| 17 | clangStaticAnalyzerCore |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 18 | ) |
| 19 | |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 20 | set( LLVM_LINK_COMPONENTS |
| 21 | ${LLVM_TARGETS_TO_BUILD} |
| 22 | asmparser |
| 23 | bitreader |
| 24 | bitwriter |
| 25 | codegen |
Nick Lewycky | e8ba8d7 | 2011-04-21 23:44:07 +0000 | [diff] [blame^] | 26 | instrumentation |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 27 | ipo |
| 28 | selectiondag |
| 29 | ) |
| 30 | |
| 31 | add_clang_executable(clang |
| 32 | driver.cpp |
| 33 | cc1_main.cpp |
| 34 | cc1as_main.cpp |
| 35 | ) |
| 36 | |
Douglas Gregor | 8435bf9 | 2011-02-25 19:24:02 +0000 | [diff] [blame] | 37 | set_target_properties(clang PROPERTIES VERSION ${CLANG_EXECUTABLE_VERSION}) |
| 38 | |
Douglas Gregor | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 39 | if(UNIX) |
| 40 | set(CLANGXX_LINK_OR_COPY create_symlink) |
| 41 | else() |
| 42 | set(CLANGXX_LINK_OR_COPY copy) |
| 43 | endif() |
| 44 | |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 45 | # Create the clang++ symlink in the build directory. |
Oscar Fuentes | aadd04c | 2011-02-06 15:33:08 +0000 | [diff] [blame] | 46 | set(clang_pp "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}") |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 47 | add_custom_target(clang++ ALL |
Douglas Gregor | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 48 | ${CMAKE_COMMAND} -E ${CLANGXX_LINK_OR_COPY} |
Oscar Fuentes | aadd04c | 2011-02-06 15:33:08 +0000 | [diff] [blame] | 49 | "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" |
Oscar Fuentes | 839e61a | 2011-02-05 21:37:37 +0000 | [diff] [blame] | 50 | "${clang_pp}" |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 51 | DEPENDS clang) |
Oscar Fuentes | a3f787c | 2011-02-20 22:06:44 +0000 | [diff] [blame] | 52 | set_target_properties(clang++ PROPERTIES FOLDER "Clang executables") |
Douglas Gregor | 8435bf9 | 2011-02-25 19:24:02 +0000 | [diff] [blame] | 53 | |
Oscar Fuentes | 839e61a | 2011-02-05 21:37:37 +0000 | [diff] [blame] | 54 | set_property(DIRECTORY APPEND |
| 55 | PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${clang_pp}) |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 56 | |
Douglas Gregor | 7f7b748 | 2009-08-23 05:28:29 +0000 | [diff] [blame] | 57 | install(TARGETS clang |
| 58 | RUNTIME DESTINATION bin) |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 59 | |
| 60 | # Create the clang++ symlink at installation time. |
Oscar Fuentes | fbfe899 | 2010-10-17 16:10:32 +0000 | [diff] [blame] | 61 | install(SCRIPT clang_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\") |