Relative files paths in doxygen-generated documentation - doxygen

I am using Doxygen 1.7.4 for Windows.
In the File List page of generated documentation I'd like to see relative paths.
I have set FULL_PATH_NAMES = YES, to have something more, than just filename without path, but this gives full, absolute paths.
I want only paths relative to project directory. I know, that I can use STRIP_FROM_PATH but I have problem with wildcards. I need that kind of path-stripping, because this project is made on multiple PCs (as git repo), so paths can be different.
Is it possible to use wildcards for this setting, or do I have to set doxyfile for each workstation with part of absolute path to strip?
Edit:
I've found something like what I need on the doxygen website: STRIP_FROM_PATH = $(QTDIR)/
Maybe it is possible to use one of doxyfile's variables?

I'm not sure about Windows, but on Linux and OS X I can produce outputs in the file list like
src/Utils.cpp [code]
src/Utils.h [code]
src/VectorMath.h [code]
test/src/test.cpp [code]
By setting FULL_PATH_NAMES to YES and STRIP_FROM_PATH to ../.. (i.e. the directory path of project's root which is two directories up from where I'm building the docs). You may need to swap the directory separator to the windows one.
You'll also need to watch out that you update the Doxyfile if you move the docs around.

Related

Is there a way to change the default paths for visualstudiocode?

Settings, plugins are held in these predefined locations, for example on Windows it's
%APPDATA%\Code\
It is possible to override this path and maybe set it relative to the installation or working directory?
Thank you for any answers.
Just as a reference if someone finds this issue again:
There is a command line option to set the data folder: --user-data-dir <dir>
https://code.visualstudio.com/docs/editor/command-line#_advanced-cli-options
VS Code supports Portable Mode, which will keep data in folders local to the installation.
You can refer to the documentation here for how to configure it.

have ccache link against the same file in different directories

I'm using ccache with git-worktree. So many of the same files are shared across multiple directories. Problem is that ccache doesn't check if the file is the same, and is compiled again. Is there a ccache option that would allow it to check the cache across multiple source directories?
ccache (by default since version 3.3) adds the current working directory to the hash if -g is used, which only makes it possible to get cache hits within the same source directory. Another similar issue is if you use absolute paths in compiler arguments, then you need to use the base_dir configuration setting.
More details from the "Compiling in different directories" section in the ccache manual:
If you build with -g (or similar) to add debug information to the object file, you must either:
use the -fdebug-prefix-map=old=new option for relocating debug info to a common prefix (e.g. -fdebug-prefix-map=$PWD=.); or
set hash_dir = false.
If you use absolute paths anywhere on the command line (e.g. the source code file path or an argument to compiler options like -I and -MF), you must to set base_dir to an absolute path to a “base directory”. ccache will then rewrite absolute paths under that directory to relative before computing the hash.

error using doxygen and graphViz: problems opening map file

I'm using Doxygen-1.8.7, which i have downloaded from official website in dmg version. I'm using 10.9.3 MacOS. I have installed graphviz 2.38.0.0 via macports.
I use Doxygen GUI to configure it and run. Everything works great, if i choose "use build-in diagram generator". But when i use dot tool, i get this:
error: problems opening map file
/Users/pavelantonov/qtProjects/doxygen/result/11-06
1207/html/inherit_graph_21.map for inclusion in the docs!
I've tried to change SHORT_NAMES and FULL_PATH_NAMES as i find in solution from 2008, but it doesn't help.
GraphViz/bin is in paths.
There are no white spaces in *.dot names.
I got this message 'problem opening map file for inclusion in the docs', if doxygen is not able to find graphviz/dot in the path.
Try setting the path explicitly using DOT_PATH in the doxyfile.
As albert, already mentioned remove any whitespace in the path to the output path.
Another good idea is to completely remove your output directory, e.g. html, and regenerate your documentation.
It also seems that doxygen is for activating dot.exe space sensitive. Make sure your path is like this or at least without whitespaces:
D:/Graphviz2.38/bin
based on experience of Graphviz 2.38 on windows 10
The following method worked for me on Windows 10 with Doxygen 1.8.14.
Open cmd and type dot -c. Then, delete the doxygen output folder and regenerate it.
Make sure you have graphviz in your path. My graphviz is installed at C:\Program Files\Graphviz 2.44.1. So, there is no problem, even if spaces are there.

Do Doxygen config files support variables?

For instance I set the source code path as c:\code\testapp\src. Is this then available as a var I can use - for instance so I can spit out a tag file in a location relative to this, not relative to the working dir of doxygen? I think I'm looking for something like how Ant defines vars for just about everything and these can be re-used; does Doxygen have special vars for any of the config values?
I'm thinking like $PROJECT-NAME or %VERSION% or whatever...
You can use environment variables in the configuration file; the syntax is the same as in a makefile, i.e. $(VAR_NAME)
I am not sure, but I have seen people use variables as part of their build process. For example the lemon graph library uses cmake, sets a variable for the absolute file path in cmake and the doxygen config file includes variables such as #abs_top_srcdir#. Through the build process these variables are replaced with the relevant text.

Specifying relative paths in SPSS 18

In SPSS 11 it was possible to specify relative paths. Example:
FILE HANDLE myfile='..\..\data\current.txt' /LRECL=533.
DATA LIST FILE=myfile /
...
This worked because apparently, SPSS 11 set the working folder to the path where the source .SPS file is saved. It seems that SPSS 18 always sets it's working folder to the installation folder of SPSS itself. Which is not at all the same thing.
Is there an option to change this behaviour? Or am I stuck with changing everything to absolute filenames?
Instead of a relative path, you could define a directory path and use it inside other file handle declarations to save typing:
FILE HANDLE directoryPath /NAME='C:\Directory\Path\' .
FILE HANDLE myFile /NAME='directoryPath/fileName.xyz' .
GET FILE='myFile' .
This will get the file: C:\Directory\Path\fileName.xyz.
The direction of the slashes may be important.
(Works in version 17)
If you use the INSERT command to run an sps file, it has an option to change the working directory to that location.
You could use the HOST command to SUBST a drive letter (on PCs) and reference everything through that.
You could define a FILE HANDLE to the common root location and use that in file references.
You could use Python programmability to find the path to the active syntax window and issue an SPSS CD command to set the backend working directory appropriately.
HTH,
Jon Peck
With Python, you can get the full path of the current syntax window (or any other one) and get its path. Using that you can issue an SPSS cd command to change the backend working directory accordingly.
If you define an environment variable, though, you can use that in file specifications within SPSS.
p.s. SPSS has an extensive set of apis and helper modules for Python (as well as for R and .NET languages). You can get information about this from SPSS Developer Central, www.spss.com/devcentral. All the language extensions are free once you have the base SPSS Statistics product.
Regards,
Jon Peck
Or use "CD" command to change your default working directory. See also:
http://www.spss-tutorials.com/change-your-working-directory/
For example, if your default directory is C:\project, then GET FILE 'data\data_file.sav'. will open data_file.sav from C:\project\data.
And then, a few minutes later, i came across this little python script from jignesh-sutar (see here: SPSS syntax - use path of the file.
With his python code you can use the path of the syntax file as starting point for all the paths in your syntax.