-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
TLDR:
- Some projects use the sequence
find_project(LLVM) ; include(HandleLLVMOptions)to set directory-scoped cMake compilation options based on CMake variables provided byLLVMConfig.cmake. This includes compiler options, linker options, and compiler definitions. HandleLLVMOptionswill then also setLLVM_DEFINITIONSto the set of definitions in the top-level CMake scope.- Downstream projects are also invoking
add_definitions(${LLVM_DEFINITIONS})but they are unaware that a) LLVM_DEFINITIONS is a space-separated list and needs to be pre-processed and b) has different effects depending on ordering withHandleLLVMOptionsand c) can cause duplication of compiler definitions
Metadata
Metadata
Assignees
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!