Commit Graph

57 Commits

Author SHA1 Message Date
Mark Olesen
cdc1a34bab CONFIG: add top-level Allwmake-modules, Allwmake-plugins scripts 2024-06-19 15:00:51 +02:00
Mark Olesen
f903707e4a STYLE: Allwmake report api/patch directly from META-INFO
- avoid dependency on etc/openfoam (location may change)
2023-03-23 12:22:00 +01:00
Bernhard Gschaider
762c095f4e COMP: WM_SCHEDULER breaks compilation (fixes #2439)
- only wrap compiler calls (not things like flex/bison)
- avoid single quoted '&&' (causes syntax errors)

STYLE: report WM_COMPILE_CONTROL value in top-level Allwmake
2022-05-10 21:15:39 +02:00
Mark Olesen
2f07de03ff COMP: add -pthread for AMD compiler rule
- https://github.com/spack/spack/pull/27949

COMP: respect FOAM_BUILDROOT for wmake -queue

STYLE: fix stray paraview setting
2021-12-15 19:13:27 +01:00
Mark Olesen
742a2c8a49 BUG: foamPackRelease detects wrong build information
- was taking from the current head instead from specified commit-ish

ENH: add -debian=NUM convenience option to foamPackRelease

STYLE: relocate compile begin/end messages

COMP: suppress more clang warnings (needed for boost)
2021-11-04 19:56:01 +01:00
Mark Olesen
c2697f466d CONFIG: update c++ standard, some compiler rules (partially addresses #2209)
- migrate to c++14 for most compilers *except* gcc.
  There are still many systems in use with gcc-4.8.5, which does not
  support c++14.

- initial rules for nvidia compilers (pgi is will soon be defunct).
  Not fully tested...

CONFIG: provide fallback value for the user directory name

- in containers may have an unset USER env variable.
  Default to 'user' to prevent ugly looking directory names.
2021-10-21 15:31:05 +02:00
Mark Olesen
e681c127f2 CONFIG: accept module-prefix 'none' as equivalent to 'false' (ie, disabled) 2021-05-31 11:14:49 +02:00
Mark Olesen
1d544540d9 ENH: handle wmake -debug option via FOAM_EXTRA_CXX_FLAGS
- ensures that subsequent Allwmake scripts know about it.

ENH: add bin/tools/query-detect wrapper for wmake have_* scripts

CONFIG: use project/ThirdParty without additional sanity checks

- no need to test for Allwmake or platforms/ if ThirdParty is located
  within the project directory itself.

COMP: add simple mpi test to 00-dummy

- for testing library linkage, etc.
2020-11-04 15:17:28 +01:00
Mark Olesen
0b41521d98 CONFIG: avoid triggering dash expansion bug (fixes #1757)
- use long form to avoid dash 0.5.8 error (ubuntu bionic)

- consolidate the prefix handling into modules/Allwmake
2020-07-01 16:20:13 +02:00
Mark Olesen
934d0bd743 ENH: support FOAM_MODULE_PREFIX to guide location of module builds (#1721)
- When compiling additional modules or user code, we need more control
  for the installation locations beyond the usual FOAM_USER_LIBBIN,
  FOAM_SITE_LIBBIN, FOAM_LIBBIN, and wish to have these values be
  modifiable without editing files.

- provide wmake rules for handling standard defaults:
    * GENERAL_RULES/module-path-user
    * GENERAL_RULES/module-path-group
    * GENERAL_RULES/module-path-project
  which are incorporated as follows:

  Make/options:
      include $(GENERAL_RULES)/module-path-user

  Make/files:
      LIB = $(FOAM_MODULE_LIBBIN)/libMyLibrary

  By default these would compile into FOAM_USER_{APPBIN,LIBBIN} but
  could be adjusted at compilation time. For example,

```
wmake -module-prefix=/path/my-install-location
```
Or
```
./Allwmake -module-prefix=/path/my-install-location
./Allwmake -prefix=/path/my-install-location
```
Or
```
FOAM_MODULE_PREFIX=/path/my-install-location ./Allwmake
```

ENH: add -no-recursion option for AllwmakeParseArguments

- more descriptive naming than the -fromWmake option (still supported)

- remove wmake/scripts/wmake.{cmake,wmake}-args since the -prefix
  handling and -no-recursion is now directly handled by AllwmakeParseArguments
2020-06-08 13:51:26 +02:00
Mark Olesen
8d1f32641c CONFIG: ignore possible compilation errors in modules
- now treating as an optional component
2020-05-22 21:53:42 +02:00
Mark Olesen
9e3d06853e ENH: add 'subcommand' handling to wmake (#1693)
- initial split of wmake-related commands into "plumbing" and
  "porcelain" akin to how git handles things.

- wmakeBuildInfo (very low-level), now relocated to the wmake/scripts
  and accessible for the user as "wmake -build-info".

  This satisfies a long-standing desire to access build information
  in a fashion similar to the api/patch information.

CONFIG: avoid git information when building with a debian/ directory

- when a 'debian/' directory exists, there is a high probability that
  the '.git/' directory is from debian and not from OpenFOAM (ie,
  useless here). This corresponds to an implicit '-no-git', which has
  no effect when building from pristine sources.

ENH: wmakeCheckPwd becomes scripts/wmake-check-dir

- accessible for the user as "wmake -check-dir" and with 1 or 2
  directory names. A wmakeCheckPwd symlink left for compatibility.
2020-05-12 10:05:24 +02:00
Mark Olesen
9cfa5fe454 Merge remote-tracking branch 'origin/master' into develop 2020-04-21 15:07:35 +02:00
Mark Olesen
aa2f932b75 CONFIG: additional packaging helpers, tutorial test helper
- bin/tools/create-mpi-config to query/write values for system openmpi.
  In some cases this can be used to avoid an mpicc requirement at runtime.

- adjust openfoam session to include -test-tutorial forwarding to the
  tutorials/AutoTest. This helps with writing installation tests.

- adjust foamConfigurePaths to latest version

- removal of gperftools default config, as per develop
2020-04-21 14:59:07 +02:00
Mark Olesen
816e96e0f2 ENH: tuning wmake behaviour (#1647)
- preferentially handle Allwmake.override, which allows packaging
  tools to define alternative make scripts, or selectively disable
  components.

- remove legacy handling of 'Optional' directory.
  Conditionals have since migrated into scripts themselves and/or
  use the wmake/scripts/have_* framework.

BUG: missed passing -debug for Allwmake scripts
2020-03-25 10:41:29 +01:00
Mark Olesen
d483123cef STYLE: limit foamEtcFile -show-api to querying the META-INFO/api-info
- simplifies code, covers most cases.
  Can use wmake -show-api or wmakeBuildInfo to query the make rules.

STYLE: Allwmake script adjustments

- use bin/foamEtcFile instead of relying on PATH.
  The make environment may not have the OpenFOAM bin/ in it.

- simpler shell syntax
2020-02-12 17:48:09 +01:00
Mark Olesen
dd465052fe CONFIG: report compiler path and version from top-level build
- previously just reported gcc/clang versions, but these are not
  necessarily the ones actually being used (eg, clang-9 vs clang).
  Now use the path from `wmake -show-path-cxx` to improve the accuracy,
  and also support other compiler types.
2019-12-19 22:17:53 +01:00
Mark Olesen
bc0b02c651 CONFIG: permit an empty value for WM_COMPILE_OPTION, WM_COMPILER_TYPE
- an empty WM_COMPILE_OPTION is treated internally (in make rules)
  like "Opt"

- an empty WM_COMPILER_TYPE is treated like "system" (system compiler)
2019-12-17 15:17:14 +01:00
Mark Olesen
98467036b3 STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
Mark Olesen
3a964c04f3 COMP: report locations of build tools (such as flex, m4 etc)
- can assist diagnosing when things have gone wrong
2019-11-10 11:24:07 +01:00
Mark Olesen
5dd8b73933 STYLE: use foamEtcFile instead of wmakeBuildInfo when reporting api 2019-06-24 18:19:59 +02:00
Mark Olesen
53b88d99a3 COMP: only compile wmake toolchain for host when cross-compiling
- no use having wmkdepend on the target architecture when it will only
  be needed on the host architecture.
2019-06-09 19:21:27 +02:00
Mark Olesen
a44e59502f STYLE: additional information at end of top-level Allwmake
- report api, patch as well as the number of entries in the
  FOAM_APPBIN, FOAM_LIBBIN for a quick visual sanity check
2018-12-09 23:27:47 +01:00
Mark Olesen
b8c257d6ad CONFIG: adjustments to environment
- provide default WM_DIR if not already set, to improve robustness if a
  reduced environment is used

- add etc/ to WM_PROJECT_SITE search. This makes the site directory
  structure consistent with the OpenFOAM structure.
  Eg,

      WM_PROJECT_SITE/etc/..
      WM_PROJECT_SITE/bin/..
      WM_PROJECT_SITE/platforms/..

- Don't set/export WM_OSTYPE.  The default is POSIX and is properly
  defaulted throughout, including in CMakeLists-OpenFOAM.txt (also for
  Catalyst)
2018-12-03 09:50:48 +01:00
Mark Olesen
973a940028 COMP: provide Allmake script for wmake tools
- convenient when bootstrapping some systems
2018-11-22 09:35:17 +01:00
Mark Olesen
253dd183f9 STYLE: include mpirun path information in top-level Allwmake
- provides some feedback about which mpi is being used
2018-11-21 08:39:26 +01:00
Mark Olesen
414d78a32c STYLE: include gcc/clang version in top-level Allwmake 2018-11-06 17:13:49 +01:00
Mark Olesen
b4d38ab468 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.
2018-04-24 14:51:19 +02:00
Mark Olesen
4c81ee202d CONFIG: update for gcc-4.9.4, and cfmesh module 2017-12-18 10:51:53 +01:00
Mark Olesen
ffc1c5aca0 CONFIG: add additional modules/ directory and Module namespace
- any code placed here should provide Allwmake and Allwclean scripts
  and normally have compilation targets into FOAM_APPBIN, FOAM_LIBBIN

  Since there is no standardize places for sources or applications,
  a simultaneous build of a module's doxygen documentation requires
  a minor bit of manual effort. Add (via symlink) the sources into
  the modules/doc/ directory to have them included in the normal
  OpenFOAM doxygen documentation generation.

  A makelink.example file is provided there as an example.
2017-12-13 17:36:35 +01:00
Mark Olesen
dd78e042fe ENH: reduce reliance on FOAM_EXT_LIBBIN during builds
- just check WM_PROJECT_DIR instead.

- provide a fallback value when FOAM_EXT_LIBBIN might actually be needed.

Only strictly need FOAM_EXT_LIBBIN for scotch/metis decomposition, and
when these are actually supplied by ThirdParty.
All other ThirdParty dependencies are referenced by BOOST_ARCH_PATH etc.

Can therefore drop the FOAM_EXT_LIBBIN dependency for VTK-related
things, which do not use scotch/metis anyhow.
2017-04-04 15:28:42 +02:00
Mark Olesen
446b8e7188 STYLE: respect WM_DIR value when building wmake tools
- minor bug: 'wclean empty' may have had issues with logical vs physical path
2017-03-29 13:49:15 +02:00
Mark Olesen
8db517bfbb CONFIG: provide Clang38, Clang39 compiler settings
- easier to test or use different versions

- change WM_CXXFLAGS to -std=c++11 instead of -std=c++0x
2017-03-10 18:13:49 +01:00
Mark Olesen
3e5307111c STYLE: unify cd, check for the cwd and error message 2017-02-06 09:13:59 +01:00
Mark Olesen
195a37cdb5 STYLE: avoid specifying the path to 'date' (issue #364)
- this is apparently not uniform across systems

STYLE: unify the date format in logfile
2016-12-23 08:03:09 +01:00
Mark Olesen
608bb5d83b COMP: update lnInclude directories when building (issue #364)
- Could be related to interrupted builds.
  So if there are any parts of the build that rely on an explicit
  'wmakeLnInclude', make sure that the contents are properly updated.

--

ENH: improved feedback from top-level Allwmake

- Report which section (libraries, applications) is being built.

- Provide final summary of date, version, etc, which can be helpful
  for later diagnosis or record keeping.

- The -log=XXX option for Allwmake now accepts a directory name
  and automatically appends an appropriate log name.
  Eg,
      ./Allwmake -log=logs/  ->> logs/log.linux64GccDPInt32Opt

  The default name is built from the value of WM_OPTIONS.

--

BUG: shell not exiting properly in combination with -log option

- the use of 'tee' causes the shell to hang around.
  Added an explicit exit to catch this.

--

- Detecting the '-k' (-non-stop) option at the top-level Allwmake, which
  may improve robustness.

- Explicit continue-on-error for foamyMesh (as optional component)

- unify format of script messages for better readability

COMP: reduce warnings when building Pstream (old-style casts in openmpi)
2016-12-22 11:26:29 +01:00
Henry Weller
8abdc36398 Allwmake: Simplified by removing 'doc' option
It is better to run doc/Allwmake or doc/Doxygen/Allwmake and provide the
required options.
2016-07-04 22:28:19 +01:00
Henry Weller
dea6a3c6e8 wmake/Allwmake: Completed support for targetType 'objects'
Patch contributed by Mattijs Janssens
2016-06-24 15:25:11 +01:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
8ed5d9fd33 Allwmake: Change test logic for building documentation to avoid return "fail" 2015-10-26 16:26:52 +00:00
Henry
844b283030 New version of wmake supporting out-of-tree object and dependency files 2014-12-14 21:42:18 +00:00
mattijs
15c433b337 ENH: wmake: 'wmake dep' to build dependencies and softlinks 2013-06-04 16:50:33 +01:00
Mark Olesen
171d7a35e5 ENH: relocate 3rd party libraries -> FOAM_EXT_LIBBIN
- place under $WM_THIRD_PARTY_DIR/lib/$WM_OPTIONS
- relocate FOAM_MPI_LIBBIN accordingly
2010-12-30 13:52:34 +01:00
Mark Olesen
5810f991d7 STYLE: report when skipping ThirdParty build 2010-07-02 09:06:04 +02:00
mattijs
5b01d2bf27 COMP: Allwmake : check for existence of Thirdparty 2010-06-22 17:28:52 +01:00
Mark Olesen
bdbdd25bac Allwmake and {applications,src}/Allwmake use wmake/wmakeCheckPwd
- solves problems that can occur when checking $PWD and links are involved
2009-08-07 20:24:11 +02:00
Mark Olesen
f763b00d08 spelling/grammar in Allwmake consistency checks 2009-07-30 11:51:58 +02:00
henry
2d58cdf8ca Added a consistency check for the location of the installation. 2009-07-29 12:52:06 +01:00
Mark Olesen
7fd14818e9 drop 'set -x' from top-level Allwmake - it's in the subordinate ones anyhow
- also gives better isolation between scripts
2009-07-27 08:46:43 +02:00
Mark Olesen
91157af10c All ThirdParty build-related stuff moved there. 2009-07-24 23:10:15 +02:00