Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMake] Include CMAKE_CURRENT_BINARY_DIR in lib/Basic #3222

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Basic/CMakeLists.txt
Expand Up @@ -55,6 +55,7 @@ generate_revision_inc(llvm_revision_inc LLVM "${LLVM_MAIN_SRC_DIR}")
generate_revision_inc(clang_revision_inc Clang "${CLANG_MAIN_SRC_DIR}")
generate_revision_inc(swift_revision_inc Swift "${SWIFT_SOURCE_DIR}")

include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(version_inc_files
${llvm_revision_inc} ${clang_revision_inc} ${swift_revision_inc})

Expand Down
6 changes: 6 additions & 0 deletions lib/Basic/Version.cpp
Expand Up @@ -45,12 +45,18 @@

#if __has_include("LLVMRevision.inc")
# include "LLVMRevision.inc"
#else
#warning "LLVMRevision.inc" is missing.
#endif
#if __has_include("ClangRevision.inc")
# include "ClangRevision.inc"
#else
#warning "ClangRevision.inc" is missing.
#endif
#if __has_include("SwiftRevision.inc")
# include "SwiftRevision.inc"
#else
#warning "SwiftRevision.inc" is missing.
#endif

namespace swift {
Expand Down