OLD | NEW |
1 # See docs/CMake.html for instructions about how to build LLVM with CMake. | 1 # See docs/CMake.html for instructions about how to build LLVM with CMake. |
2 | 2 |
3 cmake_minimum_required(VERSION 2.8.8) | 3 cmake_minimum_required(VERSION 2.8.8) |
4 | 4 |
5 # FIXME: It may be removed when we use 2.8.12. | 5 # FIXME: It may be removed when we use 2.8.12. |
6 if(CMAKE_VERSION VERSION_LESS 2.8.12) | 6 if(CMAKE_VERSION VERSION_LESS 2.8.12) |
7 # Invalidate a couple of keywords. | 7 # Invalidate a couple of keywords. |
8 set(cmake_2_8_12_INTERFACE) | 8 set(cmake_2_8_12_INTERFACE) |
9 set(cmake_2_8_12_PRIVATE) | 9 set(cmake_2_8_12_PRIVATE) |
10 else() | 10 else() |
(...skipping 207 matching lines...) Loading... |
218 | 218 |
219 set(LLVM_TARGET_ARCH "host" | 219 set(LLVM_TARGET_ARCH "host" |
220 CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic det
ection.") | 220 CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic det
ection.") |
221 | 221 |
222 option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON) | 222 option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON) |
223 | 223 |
224 option(LLVM_ENABLE_THREADS "Use threads if available." ON) | 224 option(LLVM_ENABLE_THREADS "Use threads if available." ON) |
225 | 225 |
226 option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." O
N) | 226 option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." O
N) |
227 | 227 |
| 228 set(SUBZERO_TARGETS_TO_BUILD "none" |
| 229 CACHE STRING "Semicolon-separated list of targets to build, or \"none\".") |
| 230 |
| 231 if( SUBZERO_TARGETS_TO_BUILD STREQUAL "none" ) |
| 232 set( SUBZERO_TARGETS_TO_BUILD "" ) |
| 233 endif() |
| 234 |
228 if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) | 235 if( LLVM_TARGETS_TO_BUILD STREQUAL "all" ) |
229 set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} ) | 236 set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} ) |
230 endif() | 237 endif() |
231 | 238 |
232 set(LLVM_TARGETS_TO_BUILD | 239 set(LLVM_TARGETS_TO_BUILD |
233 ${LLVM_TARGETS_TO_BUILD} | 240 ${LLVM_TARGETS_TO_BUILD} |
234 ${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}) | 241 ${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}) |
235 list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD) | 242 list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD) |
236 | 243 |
237 include(AddLLVMDefinitions) | 244 include(AddLLVMDefinitions) |
(...skipping 212 matching lines...) Loading... |
450 if( EXISTS ${td}/AsmParser/CMakeLists.txt ) | 457 if( EXISTS ${td}/AsmParser/CMakeLists.txt ) |
451 set(LLVM_ENUM_ASM_PARSERS | 458 set(LLVM_ENUM_ASM_PARSERS |
452 "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n") | 459 "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n") |
453 endif() | 460 endif() |
454 if( EXISTS ${td}/Disassembler/CMakeLists.txt ) | 461 if( EXISTS ${td}/Disassembler/CMakeLists.txt ) |
455 set(LLVM_ENUM_DISASSEMBLERS | 462 set(LLVM_ENUM_DISASSEMBLERS |
456 "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n") | 463 "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n") |
457 endif() | 464 endif() |
458 endforeach(t) | 465 endforeach(t) |
459 | 466 |
| 467 set(SUBZERO_ENUM_TARGETS "") |
| 468 foreach(t ${SUBZERO_TARGETS_TO_BUILD}) |
| 469 set(SUBZERO_ENUM_TARGETS "${SUBZERO_ENUM_TARGETS}SUBZERO_TARGET(${t})\n") |
| 470 endforeach(t) |
| 471 |
460 # Produce the target definition files, which provide a way for clients to easily | 472 # Produce the target definition files, which provide a way for clients to easily |
461 # include various classes of targets. | 473 # include various classes of targets. |
462 configure_file( | 474 configure_file( |
463 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in | 475 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmPrinters.def.in |
464 ${LLVM_INCLUDE_DIR}/llvm/Config/AsmPrinters.def | 476 ${LLVM_INCLUDE_DIR}/llvm/Config/AsmPrinters.def |
465 ) | 477 ) |
466 configure_file( | 478 configure_file( |
467 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in | 479 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in |
468 ${LLVM_INCLUDE_DIR}/llvm/Config/AsmParsers.def | 480 ${LLVM_INCLUDE_DIR}/llvm/Config/AsmParsers.def |
469 ) | 481 ) |
470 configure_file( | 482 configure_file( |
471 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in | 483 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Disassemblers.def.in |
472 ${LLVM_INCLUDE_DIR}/llvm/Config/Disassemblers.def | 484 ${LLVM_INCLUDE_DIR}/llvm/Config/Disassemblers.def |
473 ) | 485 ) |
474 configure_file( | 486 configure_file( |
| 487 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/SZTargets.def.in |
| 488 ${LLVM_INCLUDE_DIR}/llvm/Config/SZTargets.def |
| 489 ) |
| 490 configure_file( |
475 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Targets.def.in | 491 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/Targets.def.in |
476 ${LLVM_INCLUDE_DIR}/llvm/Config/Targets.def | 492 ${LLVM_INCLUDE_DIR}/llvm/Config/Targets.def |
477 ) | 493 ) |
478 | 494 |
479 # Configure the three LLVM configuration header files. | 495 # Configure the three LLVM configuration header files. |
480 configure_file( | 496 configure_file( |
481 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake | 497 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake |
482 ${LLVM_INCLUDE_DIR}/llvm/Config/config.h) | 498 ${LLVM_INCLUDE_DIR}/llvm/Config/config.h) |
483 configure_file( | 499 configure_file( |
484 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake | 500 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake |
(...skipping 162 matching lines...) Loading... |
647 PATTERN "*.def" | 663 PATTERN "*.def" |
648 PATTERN "*.h" | 664 PATTERN "*.h" |
649 PATTERN "*.gen" | 665 PATTERN "*.gen" |
650 PATTERN "*.inc" | 666 PATTERN "*.inc" |
651 # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def" | 667 # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def" |
652 PATTERN "CMakeFiles" EXCLUDE | 668 PATTERN "CMakeFiles" EXCLUDE |
653 PATTERN "config.h" EXCLUDE | 669 PATTERN "config.h" EXCLUDE |
654 PATTERN ".svn" EXCLUDE | 670 PATTERN ".svn" EXCLUDE |
655 ) | 671 ) |
656 endif() | 672 endif() |
OLD | NEW |