... | ... | @@ -17,6 +17,47 @@ Can use the usual types of settings: |
|
|
* mesa_llvm=system
|
|
|
|
|
|
|
|
|
### Direct access to compiler settings
|
|
|
|
|
|
Keywords: wmake -show options for compiler information
|
|
|
|
|
|
When building other libraries directly, with autoconfig or cmake, it
|
|
|
will be useful or necessary to use the same compiler and compiler
|
|
|
settings as are used by OpenFOAM itself. These are now obtained from the
|
|
|
`wmake` show options and can be used to set corresponding environment
|
|
|
variables. For example,
|
|
|
```
|
|
|
CC="$(wmake -show-c)" CFLAGS="$(wmake -show-cflags)" ./configure
|
|
|
```
|
|
|
|
|
|
Here is the correspondence to commonly used environment variables
|
|
|
|
|
|
| Env variable | Obtaining from wmake | Meaning |
|
|
|
|-------------------|---------------------------|-----------------------|
|
|
|
| CC | wmake -show-c | C compiler |
|
|
|
| CFLAGS | wmake -show-cflags | C compiler flags |
|
|
|
| CXX | wmake -show-cxx | C++ compiler |
|
|
|
| CXXFLAGS | wmake -show-cxxflags | C++ compiler flags |
|
|
|
| | wmake -show-cflags-arch | Architecture information when linking |
|
|
|
| | wmake -show-cxxflags-arch | Architecture information when linking |
|
|
|
|
|
|
|
|
|
In some situations it can also be useful to have the compiler and flags
|
|
|
together (similar to `mpicc -show` and `mpicxx -show`):
|
|
|
```
|
|
|
wmake -show-compile-c
|
|
|
wmake -show-compile-cxx
|
|
|
```
|
|
|
|
|
|
This system replaces the additional environment variables (WM_CC,
|
|
|
WM_CFLAGS, WM_CXX, WM_CXXFLAGS, WM_LDFLAGS) used in previous versions,
|
|
|
but which have been proved to be inadequate for a number of reasons:
|
|
|
* fragile to maintain
|
|
|
* not guaranteed to be consistent
|
|
|
* does not provided the full compilation flags
|
|
|
* annoying clutter for the environment
|
|
|
|
|
|
|
|
|
### Space characters in fileName
|
|
|
|
|
|
Allowing a space char in fileName is now user-configurable.
|
... | ... | |