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

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 19:38:34 PST 2016


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



More information about the llvm-commits mailing list