Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building cmake latex manual #4827

Closed
gassmoeller opened this issue May 24, 2022 · 3 comments
Closed

Error when building cmake latex manual #4827

gassmoeller opened this issue May 24, 2022 · 3 comments

Comments

@gassmoeller
Copy link
Member

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
@bangerth
Copy link
Contributor

bangerth commented Jun 1, 2022

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}?

@gassmoeller
Copy link
Member Author

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}/.

@bangerth
Copy link
Contributor

No longer relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants