diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -332,10 +332,6 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") -if( CLANG_VENDOR ) - add_definitions( -DCLANG_VENDOR="${CLANG_VENDOR} " ) -endif() - set(CLANG_REPOSITORY_STRING "" CACHE STRING "Vendor-specific text for showing the repository the source is taken from.") diff --git a/clang/lib/Basic/CMakeLists.txt b/clang/lib/Basic/CMakeLists.txt --- a/clang/lib/Basic/CMakeLists.txt +++ b/clang/lib/Basic/CMakeLists.txt @@ -33,6 +33,11 @@ PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE) +if(CLANG_VENDOR) + set_source_files_properties(Version.cpp + PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"") +endif() + add_clang_library(clangBasic Attributes.cpp Builtins.cpp