summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-04 19:04:37 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-04 19:04:37 +0000
commit275f686e3b16566a4633641df3e657a298db9d9d (patch)
treee878bd50610d8b7f1cef201c4e4e0c3ca2dce903 /CMakeLists.txt
parentc8f399d0c78c8f6575e582378c5c0b5d16c97048 (diff)
downloadllvm-275f686e3b16566a4633641df3e657a298db9d9d.tar.gz
llvm-275f686e3b16566a4633641df3e657a298db9d9d.tar.bz2
llvm-275f686e3b16566a4633641df3e657a298db9d9d.tar.xz
build/cmake: Tidy up specification of build/include options for (tools, runtime,
examples, and tests). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt36
1 files changed, 21 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba425d34a2..03ad6e2354 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,10 +158,6 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF)
endif()
-# Define an option controlling whether or not we include the test targets in the
-# project.
-option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
-
# Define the default arguments to use with 'lit', and an option for the user to
# override.
set(LIT_ARGS_DEFAULT "-sv")
@@ -184,6 +180,27 @@ if( MSVC_IDE AND ( MSVC90 OR MSVC10 ) )
"Number of parallel compiler jobs. 0 means use all processors. Default is 0.")
endif()
+# Define options to control the inclusion and default build behavior for
+# components which may not strictly be necessary (tools, runtime, examples, and
+# tests).
+#
+# This is primarily to support building smaller or faster project files.
+option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON)
+option(LLVM_BUILD_TOOLS
+ "Build the LLVM tools. If OFF, just generate build targets." ON)
+
+option(LLVM_INCLUDE_RUNTIME "Generate build targets for the LLVM runtimes" ON)
+option(LLVM_BUILD_RUNTIME
+ "Build the LLVM runtime libraries. If OFF, just generate build targets." ON)
+
+option(LLVM_BUILD_EXAMPLES
+ "Build the LLVM example programs. If OFF, just generate build targets." OFF)
+option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON)
+
+option(LLVM_BUILD_TESTS
+ "Build LLVM unit tests. If OFF, just generate build targets." OFF)
+option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
+
# All options referred to from HandleLLVMOptions have to be specified
# BEFORE this include, otherwise options will not be correctly set on
# first cmake run
@@ -241,29 +258,18 @@ add_subdirectory(utils/llvm-lit)
add_subdirectory(projects)
-option(LLVM_BUILD_TOOLS
- "Build the LLVM tools. If OFF, just generate build targets." ON)
-option(LLVM_INCLUDE_TOOLS "Generate build targets for the LLVM tools." ON)
if( LLVM_INCLUDE_TOOLS )
add_subdirectory(tools)
endif()
-option(LLVM_BUILD_RUNTIME
- "Build the LLVM runtime libraries. If OFF, just generate build targets." ON)
-option(LLVM_INCLUDE_RUNTIME "Generate build targets for the LLVM runtimes" ON)
if( LLVM_INCLUDE_RUNTIME )
add_subdirectory(runtime)
endif()
-option(LLVM_BUILD_EXAMPLES
- "Build the LLVM example programs. If OFF, just generate build targets." OFF)
-option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON)
if( LLVM_INCLUDE_EXAMPLES )
add_subdirectory(examples)
endif()
-option(LLVM_BUILD_TESTS
- "Build LLVM unit tests. If OFF, just generate build targets." OFF)
if( LLVM_INCLUDE_TESTS )
add_subdirectory(test)
add_subdirectory(utils/unittest)