Mike Stump | a43a21e | 2009-03-24 17:52:34 +0000 | [diff] [blame] | 1 | set(LLVM_NO_RTTI 1) |
| 2 | |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 3 | set( LLVM_USED_LIBS |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 4 | clangFrontend |
Chandler Carruth | e89d1d5 | 2010-01-29 10:03:42 +0000 | [diff] [blame] | 5 | clangDriver |
Sebastian Redl | 8572813 | 2010-08-17 20:43:28 +0000 | [diff] [blame] | 6 | clangSerialization |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 7 | clangCodeGen |
John McCall | 1951085 | 2010-08-20 18:27:03 +0000 | [diff] [blame^] | 8 | clangParse |
Chandler Carruth | e89d1d5 | 2010-01-29 10:03:42 +0000 | [diff] [blame] | 9 | clangSema |
Ted Kremenek | 1309f9a | 2010-01-25 04:41:41 +0000 | [diff] [blame] | 10 | clangChecker |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 11 | clangAnalysis |
Zhongxing Xu | 5a9ac23 | 2010-07-17 11:59:16 +0000 | [diff] [blame] | 12 | clangIndex |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 13 | clangRewrite |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 14 | clangAST |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 15 | clangLex |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 16 | clangBasic |
| 17 | ) |
| 18 | |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 19 | set( LLVM_LINK_COMPONENTS |
| 20 | ${LLVM_TARGETS_TO_BUILD} |
Daniel Dunbar | 4cbbd94 | 2010-06-07 23:27:59 +0000 | [diff] [blame] | 21 | asmparser |
Daniel Dunbar | 2108577 | 2009-12-11 22:20:12 +0000 | [diff] [blame] | 22 | bitreader |
| 23 | bitwriter |
| 24 | codegen |
| 25 | ipo |
| 26 | selectiondag |
| 27 | ) |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 28 | |
Mike Stump | a43a21e | 2009-03-24 17:52:34 +0000 | [diff] [blame] | 29 | add_clang_executable(clang |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 30 | driver.cpp |
Daniel Dunbar | 217acbf | 2009-11-19 07:37:51 +0000 | [diff] [blame] | 31 | cc1_main.cpp |
Daniel Dunbar | 41b5b17 | 2010-05-20 17:49:16 +0000 | [diff] [blame] | 32 | cc1as_main.cpp |
Daniel Dunbar | cbcd98b | 2009-03-24 02:52:57 +0000 | [diff] [blame] | 33 | ) |
Douglas Gregor | fbc2836 | 2009-06-16 22:26:26 +0000 | [diff] [blame] | 34 | |
Douglas Gregor | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 35 | if(UNIX) |
| 36 | set(CLANGXX_LINK_OR_COPY create_symlink) |
Douglas Gregor | 40e7192 | 2010-04-27 16:14:06 +0000 | [diff] [blame] | 37 | set(CLANGXX_DESTDIR $ENV{DESTDIR}/) |
Douglas Gregor | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 38 | else() |
| 39 | set(CLANGXX_LINK_OR_COPY copy) |
| 40 | endif() |
| 41 | |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 42 | # Create the clang++ symlink in the build directory. |
| 43 | add_custom_target(clang++ ALL |
Douglas Gregor | 6cef99d | 2009-11-19 16:42:34 +0000 | [diff] [blame] | 44 | ${CMAKE_COMMAND} -E ${CLANGXX_LINK_OR_COPY} |
Douglas Gregor | 234e162 | 2009-11-19 07:59:29 +0000 | [diff] [blame] | 45 | "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" |
| 46 | "${LLVM_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/clang++${CMAKE_EXECUTABLE_SUFFIX}" |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 47 | DEPENDS clang) |
| 48 | |
Douglas Gregor | 7f7b748 | 2009-08-23 05:28:29 +0000 | [diff] [blame] | 49 | install(TARGETS clang |
| 50 | RUNTIME DESTINATION bin) |
Douglas Gregor | c720a4d | 2009-11-19 05:46:45 +0000 | [diff] [blame] | 51 | |
| 52 | # Create the clang++ symlink at installation time. |
Douglas Gregor | 40e7192 | 2010-04-27 16:14:06 +0000 | [diff] [blame] | 53 | install(CODE "execute_process(COMMAND \"${CMAKE_COMMAND}\" -E ${CLANGXX_LINK_OR_COPY} \"${CMAKE_INSTALL_PREFIX}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}\" \"${CLANGXX_DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}\")") |