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

"make doc" does not work #94

Closed
vegnesh opened this issue Jul 29, 2019 · 6 comments
Closed

"make doc" does not work #94

vegnesh opened this issue Jul 29, 2019 · 6 comments
Assignees

Comments

@vegnesh
Copy link

vegnesh commented Jul 29, 2019

Typing "make doc" in the build directory does not work (instruction given in INSTALL.md)

I generated a build directory in doc folder and did cmake .. and make and that gave the following error
/bin/sh: 1:/path_to_doc_dir/build/Doxyfile: Permission denied

Is there anything I am missing out?

@dellaert dellaert assigned dellaert and varunagrawal and unassigned dellaert Jul 30, 2019
@dellaert
Copy link
Member

dellaert commented Aug 1, 2019

Is doxygen installed? cmake checks that..

@vegnesh
Copy link
Author

vegnesh commented Aug 1, 2019

I have Doxygen installed, however there is no target named doc in the makefile generated using CMake.Is there a flag that needs to be enabled while creating the makefile to generate documentation?

@dellaert
Copy link
Member

dellaert commented Aug 1, 2019

This par of the cmake code is quite old, and I'm no expert. It could be, or could be broken. If you do some digging and find out (or whomever is watching this) it would be highly appreciated. Probably a simple issue...

@acxz
Copy link
Contributor

acxz commented Aug 3, 2019

@vegnesh

Note you need to call the CMakeLists.txt of the entire project, not the one in the doc/ folder to create all the make targets like doc. The project wide CMakeLists.txt would be called by cmake ../.. if you have a build folder inside the doc/ folder, instead of cmake .. which is what you did.

I just tried the following on my system:

git clone https://github.com/borglab/gtsam
cd gtsam/doc
mkdir build
cd build
cmake ../..
make doc

and that generated the docs properly.
I get the exact error based on the procedure you mentioned, which is fine since that process is not expected to work.

@jlblancoc
Copy link
Member

To avoid users falling into these errors (which seem common when starting with cmake?), there is a solution: introducing an include(...) to the top of each CMakeLists.txt file except the root one, to do a check like this one.

Pros: avoids this kind of error.
Cons: it's "visually unpleasant" to see that include polluting the cmake files at all subdirectories! ;-)

Is it worth? I don't know :-)

@vegnesh
Copy link
Author

vegnesh commented Aug 5, 2019

@acxz Your method works. I had done what you had suggested previously. However, at that point doxygen was not installed in my machine and hence there was no target for 'doc' generated in the Makefile. Now, it seems to work. Sorry for creating confusion

@vegnesh vegnesh closed this as completed Aug 5, 2019
varunagrawal added a commit that referenced this issue Apr 20, 2021
b2144a712 Merge pull request #95 from borglab/feature/empty-str-default-arg
9f1e727d8 Merge pull request #96 from borglab/fix/cmake
97ee2ff0c fix CMake typo
64a599827 support empty strings as default args
7b14ed542 Merge pull request #94 from borglab/fix/cmake-messages
0978641fe clean up
5b9272557 Merge pull request #91 from borglab/feature/enums
56e6f48b3 Merge pull request #93 from borglab/feature/better-template
27cc7cebf better cmake messages
a6318b567 fix tests
b7f60463f remove export_values()
38304fe0a support for class nested enums
348160740 minor fixes
5b6d66a97 use cpp_class and correct module name
2f7ae0676 add newlines and formatting
6e7cecc50 remove support for enum value assignment
c1dc925a6 formatting
798732598 better pybind template
f6dad2959 pybind_wrapper fixes with formatting
7b4a06560 Merge branch 'master' into feature/enums
1982b7131 more comprehensive tests for enums
3a0eafd66 code for wrapping enums
398780982 tests for enum support

git-subtree-dir: wrap
git-subtree-split: b2144a712953dcc3e001c97c2ace791149c97278
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

5 participants