mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: adjusted wording and messages for wmake
- add an additional test for wmake pre-processing
This commit is contained in:
committed by
Andrew Heather
parent
baaf8d6bc9
commit
939144233c
10
applications/test/wmake1/Make/files
Normal file
10
applications/test/wmake1/Make/files
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Test-wmake1.C
|
||||||
|
|
||||||
|
/* #if OPENFOAM == 1812 */
|
||||||
|
#if OPENFOAM > 1812
|
||||||
|
newStub.C
|
||||||
|
#else
|
||||||
|
oldStub.C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/Test-wmake1
|
||||||
2
applications/test/wmake1/Make/options
Normal file
2
applications/test/wmake1/Make/options
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
EXE_INC =
|
||||||
|
EXE_LIBS =
|
||||||
56
applications/test/wmake1/Test-wmake1.C
Normal file
56
applications/test/wmake1/Test-wmake1.C
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
Test-wmake1
|
||||||
|
|
||||||
|
Description
|
||||||
|
Some tests for wmake features.
|
||||||
|
For example, testing how robust or fragile version-dependent conditional
|
||||||
|
compilation works.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "argList.H"
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
void printTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
using namespace Foam;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
printTest();
|
||||||
|
|
||||||
|
Info<< "\nEnd\n" << nl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
13
applications/test/wmake1/newStub.C
Normal file
13
applications/test/wmake1/newStub.C
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Some test code
|
||||||
|
|
||||||
|
#include "foamVersion.H"
|
||||||
|
#include "IOstreams.H"
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
void printTest()
|
||||||
|
{
|
||||||
|
Info<< nl;
|
||||||
|
foamVersion::printBuildInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
17
applications/test/wmake1/oldStub.C
Normal file
17
applications/test/wmake1/oldStub.C
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Some test code
|
||||||
|
|
||||||
|
#include "IOstreams.H"
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
void printTest()
|
||||||
|
{
|
||||||
|
Info<< nl << "Using old stub" << nl;
|
||||||
|
|
||||||
|
#if OPENFOAM
|
||||||
|
Info<< "OPENFOAM=" << OPENFOAM << nl;
|
||||||
|
#else
|
||||||
|
Info<< "OPENFOAM is undefined" << nl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -175,7 +175,7 @@ lib: $(LIB).a | silent
|
|||||||
$(LIB).a: $(OBJECTS)
|
$(LIB).a: $(OBJECTS)
|
||||||
@$(WM_SCRIPTS)/makeTargetDir $(LIB)
|
@$(WM_SCRIPTS)/makeTargetDir $(LIB)
|
||||||
@rm -f $(LIB).a
|
@rm -f $(LIB).a
|
||||||
$(call QUIET_MESSAGE,ar,$(LIB))
|
$(call QUIET_MESSAGE,ar,$(LIB).a)
|
||||||
$E $(AR) $(ARFLAGS) $(LIB).a $(OBJECTS)
|
$E $(AR) $(ARFLAGS) $(LIB).a $(OBJECTS)
|
||||||
$(call QUIET_MESSAGE,ranlib,$(notdir $(LIB)))
|
$(call QUIET_MESSAGE,ranlib,$(notdir $(LIB)))
|
||||||
$E $(RANLIB) $(LIB).a
|
$E $(RANLIB) $(LIB).a
|
||||||
|
|||||||
@ -43,16 +43,13 @@ include $(GENERAL_RULES)/general
|
|||||||
# Display information
|
# Display information
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
export WM_VERSION
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: compile
|
.PHONY: compile
|
||||||
compile:
|
compile:
|
||||||
@echo "$(strip $(CC) $(c++FLAGS))"
|
@echo "$(strip $(CC) $(c++FLAGS))"
|
||||||
|
|
||||||
.PHONY: api
|
.PHONY: api
|
||||||
api:
|
api:
|
||||||
@echo "$${WM_VERSION#*=}"
|
@echo "$(WM_VERSION)" | sed -e 's/^.*=//'
|
||||||
|
|
||||||
.PHONY: c
|
.PHONY: c
|
||||||
c:
|
c:
|
||||||
|
|||||||
18
wmake/wmake
18
wmake/wmake
@ -70,18 +70,16 @@ options:
|
|||||||
-s | -silent Quiet mode (does not echo commands)
|
-s | -silent Quiet mode (does not echo commands)
|
||||||
-a | -all wmake all sub-directories, running Allwmake if present
|
-a | -all wmake all sub-directories, running Allwmake if present
|
||||||
-q | -queue wmakeCollect all sub-directories, running Allwmake if present
|
-q | -queue wmakeCollect all sub-directories, running Allwmake if present
|
||||||
-k | -keep-going Keep going without stopping when errors occur (-non-stop)
|
-k | -keep-going Keep going even when errors occur (-non-stop)
|
||||||
-j Compile using all local cores/hyperthreads
|
-j Compile using all local cores/hyperthreads
|
||||||
-jN or -j N Compile using N cores/hyperthreads
|
-jN | -j N Compile using N cores/hyperthreads
|
||||||
-no-scheduler Disable scheduled parallel compilation
|
-no-scheduler Disable scheduled parallel compilation
|
||||||
-pwd Print root directory containing a Make/ directory and exit
|
-pwd Print root directory containing a Make/ directory
|
||||||
-update Update lnInclude directories, dep files, remove deprecated
|
-update Update lnInclude dirs, dep files, remove deprecated files/dirs
|
||||||
files and directories
|
-show-api Print api value
|
||||||
-show Identical to -show-compile
|
-show-compile Print C++ compiler value and flags (shortcut: -show)
|
||||||
-show-api Print api value and exit
|
-show-cxx Print C++ compiler value
|
||||||
-show-compile Print C++ compiler value/flags and exit
|
-show-cxxflags Print C++ compiler flags
|
||||||
-show-cxx Print C++ compiler value and exit
|
|
||||||
-show-cxxflags Print C++ compiler flags and exit
|
|
||||||
-h | -help Print the usage
|
-h | -help Print the usage
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user