FluidityProject / fluidity

Fluidity
http://fluidity-project.org
Other
362 stars 113 forks source link

BUG: Fix paths for generated headers for out-of-source builds #353

Closed adigitoleo closed 2 years ago

adigitoleo commented 2 years ago

By default, configure_file looks for the input files in CMAKE_CURRENT_SOURCE_DIR, but the generated headers are placed in CMAKE_BINARY_DIR.

In the case of out-of-source builds the specified /include dirs also don't exist. This causes cmake to treat /include as a filename instead of a directory. The commit changes configure_file directives to always specify a file path.

To reproduce the bug (run in source tree root):

mkdir build
cd build
cmake ..
adigitoleo commented 2 years ago

Will send to Thomas as patch instead.