mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improve handling of ThirdParty packages
- generalize some of the library extensions (.so vs .dylib).
Provide as wmake 'sysFunctions'
- added note about unsupported/incomplete system support
- centralize detection of ThirdParty packages into wmake/ subdirectory
by providing a series of scripts in the spirit of GNU autoconfig.
For example,
have_boost, have_readline, have_scotch, ...
Each of the `have_<package>` scripts will generally provide the
following type of functions:
have_<package> # detection
no_<package> # reset
echo_<package> # echoing
and the following type of variables:
HAVE_<package> # unset or 'true'
<package>_ARCH_PATH # root for <package>
<package>_INC_DIR # include directory for <package>
<package>_LIB_DIR # library directory for <package>
This simplifies the calling scripts:
if have_metis
then
wmake metisDecomp
fi
As well as reducing clutter in the corresponding Make/options:
EXE_INC = \
-I$(METIS_INC_DIR) \
-I../decompositionMethods/lnInclude
LIB_LIBS = \
-L$(METIS_LIB_DIR) -lmetis
Any additional modifications (platform-specific or for an external build
system) can now be made centrally.
This commit is contained in:
@ -55,10 +55,11 @@ Description
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#ifdef HAS_READLINE
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
|
||||
static const char* historyFile = ".setSet";
|
||||
#endif
|
||||
|
||||
using namespace Foam;
|
||||
@ -66,11 +67,6 @@ using namespace Foam;
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
#ifdef HAS_READLINE
|
||||
static const char* historyFile = ".setSet";
|
||||
#endif
|
||||
|
||||
|
||||
// Write set to VTK readable files
|
||||
void writeVTK
|
||||
(
|
||||
@ -790,7 +786,7 @@ int main(int argc, char *argv[])
|
||||
printAllSets(mesh, Info);
|
||||
|
||||
// Read history if interactive
|
||||
#ifdef HAS_READLINE
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
if (!batch && !read_history((runTime.path()/historyFile).c_str()))
|
||||
{
|
||||
Info<< "Successfully read history from " << historyFile << endl;
|
||||
@ -872,7 +868,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef HAS_READLINE
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
{
|
||||
char* linePtr = readline("readline>");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user