aspect
aspect copied to clipboard
Error when building cmake latex manual
When I use cmake to make the pdf manual like so:
cmake .
make documentation
I get the following error no matter if my build directory is in-source or out-of-source:
cp: cannot create regular file '/home/rene/software/build-aspect/doc/benchmarks/yamauchi_takei_2016_anelasticity/doc/YT16_benchmark.png': No such file or directory
make[3]: *** [doc/CMakeFiles/build_image_benchmarksyamauchitakei2016anelasticitydocYT16benchmarkpng.dir/build.make:73: doc/benchmarks/yamauchi_takei_2016_anelasticity/doc/YT16_benchmark.png] Error 1
make[2]: *** [CMakeFiles/Makefile2:16298: doc/CMakeFiles/build_image_benchmarksyamauchitakei2016anelasticitydocYT16benchmarkpng.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:16359: doc/CMakeFiles/documentation.dir/rule] Error 2
make: *** [Makefile:7722: documentation] Error 2
Can you show the line before the error? I suspect that this is the result of this command:
ADD_CUSTOM_COMMAND(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/${_image}
COMMAND
cp
${CMAKE_SOURCE_DIR}/${_image}
${CMAKE_CURRENT_BINARY_DIR}/${_image}
DEPENDS
${CMAKE_SOURCE_DIR}/${_image}
COMMENT
"Copying ${_image} to build directory."
)
On thinking about this, I do not know how cmake treats this -- that is, whether it creates the directories into which OUTPUT is placed. Does it work if you remove the ${CMAKE_CURRENT_BINARY_DIR}/ from before ${_image}?
This is the complete output:
rene@rene-laptop:~/software/aspect/build$ make documentation
[ 0%] Copying benchmarks/yamauchi_takei_2016_anelasticity/doc/YT16_benchmark.png to build directory.
cp: cannot create regular file '/home/rene/software/aspect/build/doc/benchmarks/yamauchi_takei_2016_anelasticity/doc/YT16_benchmark.png': No such file or directory
make[3]: *** [doc/CMakeFiles/build_image_benchmarksyamauchitakei2016anelasticitydocYT16benchmarkpng.dir/build.make:73: doc/benchmarks/yamauchi_takei_2016_anelasticity/doc/YT16_benchmark.png] Error 1
make[2]: *** [CMakeFiles/Makefile2:16270: doc/CMakeFiles/build_image_benchmarksyamauchitakei2016anelasticitydocYT16benchmarkpng.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:16331: doc/CMakeFiles/documentation.dir/rule] Error 2
make: *** [Makefile:7709: documentation] Error 2
And no, the error stays the same if I remove ${CMAKE_CURRENT_BINARY_DIR}/.
No longer relevant.