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.
Out-of-tree clean CMake build is broken
results in
This is caused by the fact that CMake (version 3.3.2) puts Bison-generated file
parser.hin the build directory instead ofsource.The error does not appear if the Clan was built at least once with autotools from the same source tree since the file
parser.hwas created. However, in this case, CMake silently uses an outdated filesource/parser.hinstead of the newly generated once creating room for tricky errors.