Skip to content

out-of-tree CMake build broken #17

@ftynse

Description

@ftynse

Out-of-tree clean CMake build is broken

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/usr
make

results in

.../clan/source/scop.c:58:10: fatal error: 'source/parser.h' file not found
#include <source/parser.h>

This is caused by the fact that CMake (version 3.3.2) puts Bison-generated file parser.h in the build directory instead of source.

The error does not appear if the Clan was built at least once with autotools from the same source tree since the file parser.h was created. However, in this case, CMake silently uses an outdated file source/parser.h instead of the newly generated once creating room for tricky errors.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions