Mike Stump | a43a21e | 2009-03-24 17:52:34 +0000 | [diff] [blame] | 1 | set(LLVM_NO_RTTI 1) |
| 2 | |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 3 | set( LLVM_USED_LIBS |
Peter Collingbourne | 1b7255d | 2010-08-24 00:31:22 +0000 | [diff] [blame] | 4 | clangFrontendTool |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 5 | clangFrontend |
Chandler Carruth | e89d1d5 | 2010-01-29 10:03:42 +0000 | [diff] [blame] | 6 | clangDriver |
Sebastian Redl | 8572813 | 2010-08-17 20:43:28 +0000 | [diff] [blame] | 7 | clangSerialization |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 8 | clangCodeGen |
John McCall | 1951085 | 2010-08-20 18:27:03 +0000 | [diff] [blame] | 9 | clangParse |
Chandler Carruth | e89d1d5 | 2010-01-29 10:03:42 +0000 | [diff] [blame] | 10 | clangSema |
Ted Kremenek | 3a8f40e | 2010-12-23 07:22:02 +0000 | [diff] [blame] | 11 | clangEntoCheckers |
| 12 | clangEntoCore |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 13 | clangAnalysis |
Zhongxing Xu | 5a9ac23 | 2010-07-17 11:59:16 +0000 | [diff] [blame] | 14 | clangIndex |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 15 | clangRewrite |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 16 | clangAST |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 17 | clangLex |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 18 | clangBasic |
| 19 | ) |
| 20 | |
Michael J. Spencer | 560a921 | 2010-09-13 23:54:41 +0000 | [diff] [blame] | 21 | set( LLVM_LINK_COMPONENTS |
| 22 | ${LLVM_TARGETS_TO_BUILD} |
| 23 | asmparser |
| 24 | bitreader |
| 25 | bitwriter |
| 26 | codegen |
| 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 | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 37 | if(UNIX) |
| 38 | set(CLANGXX_LINK_OR_COPY create_symlink) |
| 39 | else() |
| 40 | set(CLANGXX_LINK_OR_COPY copy) |
| 41 | endif() |
| 42 | |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 43 | # Create the clang++ symlink in the build directory. |
| 44 | add_custom_target(clang++ ALL |
Douglas Gregor | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 45 | ${CMAKE_COMMAND} -E ${CLANGXX_LINK_OR_COPY} |
Douglas Gregor | 234e162 | 2009-11-19 07:59:29 +0000 | [diff] [blame] | 46 | "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" |
| 47 | "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}" |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 48 | DEPENDS clang) |
| 49 | |
Douglas Gregor | 7f7b748 | 2009-08-23 05:28:29 +0000 | [diff] [blame] | 50 | install(TARGETS clang |
| 51 | RUNTIME DESTINATION bin) |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 52 | |
| 53 | # Create the clang++ symlink at installation time. |
Oscar Fuentes | fbfe899 | 2010-10-17 16:10:32 +0000 | [diff] [blame] | 54 | install(SCRIPT clang_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\") |