January 2013

CMake with Flex and Bison (Yacc) : ADD_CUSTOM_COMMAND

In case I can not google it again. Here is this informative post. Following is the verbatim copy of this email. # Create target for the parser ADD_CUSTOM_TARGET(FooParser echo “Creating parser.c”) # Create custom command for flex/lex (note the outputs) ADD_CUSTOM_COMMAND( SOURCE ${Foo_SOURCE_DIR}/src/lexer.l COMMAND ${FLEX_EXECUTABLE} ARGS -o${Foo_BINARY_DIR}/src/lexer.c ${Foo_SOURCE_DIR}/src/lexer.l TARGET FooParser OUTPUTS ${Foo_BINARY_DIR}/src/lexer.c) # Create custom …

CMake with Flex and Bison (Yacc) : ADD_CUSTOM_COMMAND Read More »

Getting caught in a loop while traversing a (directed acyclic) graph

How to detect if you are getting caught inside a loop when you are traversing a directed graph. This is equivalent of checking if you graph is a Directed Acyclic Graph (DAG). Assume that each vertex of graph has a label such as A, B, C, etc. While you are traversing the graph, you keep …

Getting caught in a loop while traversing a (directed acyclic) graph Read More »

LD_LIBRARY_PATH is not working in Makefile

If LD_LIBRARY_PATH is exported in Makefile and makefile is not working as you have expected, then you should try updating LIBRARY_PATH. LIBRARY_PATH is used by gcc before compilation to search for directories containing libraries that need to be linked to your program. If you wish to link static libraries, you should update LIBRARY_PATH and not …

LD_LIBRARY_PATH is not working in Makefile Read More »

Scroll to Top