[PATCH] D16130: Don't try to build Burg if yacc isn't installed.

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 00:11:59 PST 2016


Hi Matthias,

This sounds a good idea. I can’t do this myself because any file generated with GNU/Bison will have a license that needs to be thrown at our legal team. This is why I didn’t do this originally.

If someone without legal worries would like to do this, I’m all for it.

James
> On 13 Jan 2016, at 03:38, Matthias Braun <mbraun at apple.com> wrote:
>
> What if we just commit the files generated by yacc so we are independent of missing yacc and independent of possible performance changes between yacc versions and implementations?
>
> - Matthias
>
>> On Jan 12, 2016, at 6:56 PM, Justin Lebar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> jlebar created this revision.
>> jlebar added reviewers: rengolin, cmatthews, jmolloy, beanz.
>> jlebar added a subscriber: llvm-commits.
>>
>> Without this patch, ninja test-suite dies with
>>
>> CMake Error at MultiSource/Applications/Burg/CMakeLists.txt:17 (add_yacc_parser):
>>   Unknown CMake command "add_yacc_parser".
>>
>> I have no idea what I'm doing here in CMake world, please be gentle.
>>
>> http://reviews.llvm.org/D16130
>>
>> Files:
>> MultiSource/Applications/Burg/CMakeLists.txt
>>
>> Index: MultiSource/Applications/Burg/CMakeLists.txt
>> ===================================================================
>> --- MultiSource/Applications/Burg/CMakeLists.txt
>> +++ MultiSource/Applications/Burg/CMakeLists.txt
>> @@ -14,7 +14,11 @@
>> set(Source ${ExtraSource} ${TMP1})
>>
>> include_directories(${CMAKE_CURRENT_BINARY_DIR})
>> -add_yacc_parser(burg_parser gram.y ${CMAKE_CURRENT_BINARY_DIR}/y.tab.c ${CMAKE_CURRENT_BINARY_DIR}/y.tab.h)
>> -    llvm_multisource()
>> +
>> +# Only build Burg if yacc is installed.
>> +if(YACC_EXECUTABLE)
>> +  add_yacc_parser(burg_parser gram.y ${CMAKE_CURRENT_BINARY_DIR}/y.tab.c ${CMAKE_CURRENT_BINARY_DIR}/y.tab.h)
>> +  llvm_multisource()
>> +endif(YACC_EXECUTABLE)
>>
>> llvm_add_subdirectories(${DIRS} ${PARALLEL_DIRS})
>>
>>
>> <D16130.44702.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.



More information about the llvm-commits mailing list