include search paths

101 views
Skip to first unread message

Stephane Popinet

unread,
Nov 20, 2020, 7:08:53 AM11/20/20
to basilisk-fr
Dear all,

The latest version of Basilisk (and the web site) now allows for proper
specification of include search paths for Basilisk header files (using
either the standard -I compilation flag and/or the BASILISK_INCLUDE_PATH
environment variable).

On the website the path to sandbox/ has been added to the default search
path. This means that using header files located in other directories in
the sandbox/ is now much easier.

For example, before this change, I would have used something like

#include "../../Antoonvh/particle.h"

where "../.." is the relative path of the current directory to
"/sandbox". I can now simply use

#include "Antoonvh/particle.h"

irrespective of where the current directory is.

Note that the order of search is:

1) the current directory
2) the $BASILISK directory
3) the directories specified by -I (in the order in which they are
specified)
4) the column-separated directories in $BASILISK_INCLUDE_PATH (in order
of appearance).

Note also that this can be customised for a given directory by using the
-I option in the CFLAGS variable of the local Makefile.

cheers,

Stephane

Reply all
Reply to author
Forward
0 new messages