Skip to content

Commit

Permalink
Pick up LLVM_PACKAGE_VERSION correctly in unified builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmccall committed Nov 17, 2015
1 parent a653f71 commit 5203a68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/modules/SwiftSharedCMakeConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ macro(swift_common_unified_build_config product)
set(CLANG_BUILD_INCLUDE_DIR "${CMAKE_BINARY_DIR}/tools/clang/include")
set(${product}_NATIVE_LLVM_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
set(${product}_NATIVE_CLANG_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
set(LLVM_PACKAGE_VERSION ${PACKAGE_VERSION})

# If cmark was checked out into tools/cmark, expect to build it as
# part of the unified build.
Expand Down
5 changes: 5 additions & 0 deletions stdlib/public/SwiftShims/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ add_custom_command_target(unused_var
DEPENDS "${sources}"
COMMENT "Copying SwiftShims module to ${output_dir}")

if ("${LLVM_PACKAGE_VERSION}" STREQUAL "")
message(FATAL_ERROR
"LLVM_PACKAGE_VERSION must be set before including subdirectories")
endif()

# Symlink in the Clang headers.
# First extract the "version" used for Clang's resource directory.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
Expand Down

0 comments on commit 5203a68

Please sign in to comment.