Skip to content

Commit

Permalink
Make sure that even in the standalone build configuration, we can bui…
Browse files Browse the repository at this point in the history
…ld doxygen documentation.

The issue is that this was originally done when in-tree builds were the
preferred way of building so LLVM_ENABLE_DOXYGEN would be defined and LLVM would
have found doxygen as well. When one is doing the current preferred standalone
install, the option LLVM_ENABLE_DOXYGEN is not discoverable to the user via an
option with a default argument and the doxygen package is never searched for.

This commit ensures that when building standalone:

1. LLVM_ENABLE_DOXYGEN is defined as an option with a default value of FALSE.
2. The cmake dtrace package is searched for and found.

When we are building standalone, we take these values from LLVM.
  • Loading branch information
gottesmm committed Jan 10, 2016
1 parent 2f4bec9 commit 6da11ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ if(LIBXML2_FOUND)
set(SWIFT_HAVE_LIBXML 1)
endif()

if (LLVM_ENABLE_DOXYGEN)
message(STATUS "Doxygen: enabled")
endif()

#
# Set up global CMake variables for API notes.
#
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/SwiftSharedCMakeConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ macro(swift_common_standalone_build_config product is_cross_compiling)

set(LLVM_INCLUDE_TESTS TRUE)
set(LLVM_INCLUDE_DOCS TRUE)

option(LLVM_ENABLE_DOXYGEN "Enable doxygen support" FALSE)
if (LLVM_ENABLE_DOXYGEN)
find_package(Doxygen REQUIRED)
endif()
endmacro()

# Common cmake project config for unified builds.
Expand Down

0 comments on commit 6da11ce

Please sign in to comment.