Skip to content
Snippets Groups Projects
Commit cb6d11d3 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

CONFIG: add LIBO_LIBS support into wmake rules

- provides an additional hook when linking OSspecific

CONFIG: apply quiet flag to wmkdepend

- suppresses "could not open FileName" warnings in quiet mode

FIX: reinstate selection of strict/non-strict deprecation

- accidentally removed in cf2b305b.
- extend with a _STRICTER version as well.
parent ad037ac7
Branches
No related tags found
No related merge requests found
...@@ -94,6 +94,7 @@ export WM_COMPILE_OPTION=Opt ...@@ -94,6 +94,7 @@ export WM_COMPILE_OPTION=Opt
# +ccache : use ccache # +ccache : use ccache
# +xcrun : use xcrun and native compilers [MacOS] # +xcrun : use xcrun and native compilers [MacOS]
# +strict : more deprecation warnings (may generate *many* warnings) # +strict : more deprecation warnings (may generate *many* warnings)
# ++strict : even more deprecation warnings
# ccache=... : ccache command (unquoted, single/double or <> quoted) # ccache=... : ccache command (unquoted, single/double or <> quoted)
# version=... : compiler suffix (eg, version=11 -> gcc-11) # version=... : compiler suffix (eg, version=11 -> gcc-11)
# lnInclude-extra : add '-extra' option for wmakeLnInclude # lnInclude-extra : add '-extra' option for wmakeLnInclude
......
...@@ -94,6 +94,7 @@ setenv WM_COMPILE_OPTION Opt ...@@ -94,6 +94,7 @@ setenv WM_COMPILE_OPTION Opt
# +ccache : use ccache # +ccache : use ccache
# +xcrun : use xcrun and native compilers [MacOS] # +xcrun : use xcrun and native compilers [MacOS]
# +strict : more deprecation warnings (may generate *many* warnings) # +strict : more deprecation warnings (may generate *many* warnings)
# ++strict : even more deprecation warnings
# ccache=... : ccache command (unquoted, single/double or <> quoted) # ccache=... : ccache command (unquoted, single/double or <> quoted)
# version=... : compiler suffix (eg, version=11 -> gcc-11) # version=... : compiler suffix (eg, version=11 -> gcc-11)
# lnInclude-extra : add '-extra' option for wmakeLnInclude # lnInclude-extra : add '-extra' option for wmakeLnInclude
......
...@@ -46,7 +46,20 @@ Description ...@@ -46,7 +46,20 @@ Description
#define FOAM_DEPRECATED(since) [[deprecated("Since " #since)]] #define FOAM_DEPRECATED(since) [[deprecated("Since " #since)]]
#define FOAM_DEPRECATED_FOR(since, replacement) [[deprecated("Since " #since "; use " #replacement)]] #define FOAM_DEPRECATED_FOR(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
#define FOAM_DEPRECATED_STRICT(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
#ifdef FOAM_COMPILE_STRICT
# define FOAM_DEPRECATED_STRICT(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
# if (FOAM_COMPILE_STRICT > 1)
# define FOAM_DEPRECATED_STRICTER(since, replacement) [[deprecated("Since " #since "; use " #replacement)]]
# endif
#endif
#ifndef FOAM_DEPRECATED_STRICT
#define FOAM_DEPRECATED_STRICT(since, replacement)
#endif
#ifndef FOAM_DEPRECATED_STRICTER
#define FOAM_DEPRECATED_STRICTER(since, replacement)
#endif
// Branch prediction helpers. With C++20 can use [[likely]], [[unlikely]] // Branch prediction helpers. With C++20 can use [[likely]], [[unlikely]]
#if defined(__GNUC__) || defined(__clang__) #if defined(__GNUC__) || defined(__clang__)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation # Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2019-2023 OpenCFD Ltd. # Copyright (C) 2019-2025 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
...@@ -23,6 +23,13 @@ ...@@ -23,6 +23,13 @@
# WM_COMPILE_CONTROL (~openfoam) # WM_COMPILE_CONTROL (~openfoam)
# WM_OSTYPE (windows) # WM_OSTYPE (windows)
# #
# User modification entries. Usually specified in Make/options
#
# EXE_INC : defines/includes etc for executable or library targets
# EXE_LIBS : linking for executables
# LIB_LIBS : linking for libraries (.so)
# LIBO_LIBS : linking for object libraries (.o)
#
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
...@@ -74,6 +81,7 @@ endif ...@@ -74,6 +81,7 @@ endif
EXE_INC = EXE_INC =
EXE_LIBS = EXE_LIBS =
LIB_LIBS = LIB_LIBS =
LIBO_LIBS =
# Project include/libraries # Project include/libraries
PROJECT_INC = \ PROJECT_INC = \
...@@ -229,7 +237,7 @@ $(LIB).o: $(OBJECTS) ...@@ -229,7 +237,7 @@ $(LIB).o: $(OBJECTS)
@$(WM_SCRIPTS)/makeTargetDir $(LIB) @$(WM_SCRIPTS)/makeTargetDir $(LIB)
@rm -f $(LIB).o @rm -f $(LIB).o
$(call QUIET_MESSAGE,ld,$(LIB).o) $(call QUIET_MESSAGE,ld,$(LIB).o)
$E $(LD) -r -o $(LIB).o $(OBJECTS) $E $(LD) -r -o $(LIB).o $(OBJECTS) $(LIBO_LIBS)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
......
...@@ -34,7 +34,11 @@ endif ...@@ -34,7 +34,11 @@ endif
# Enable additional compile-time checks # Enable additional compile-time checks
ifneq (,$(findstring +strict,$(WM_COMPILE_CONTROL))) ifneq (,$(findstring +strict,$(WM_COMPILE_CONTROL)))
GFLAGS += -DFOAM_COMPILE_STRICT ifneq (,$(findstring ++strict,$(WM_COMPILE_CONTROL)))
GFLAGS += -DFOAM_COMPILE_STRICT=2
else
GFLAGS += -DFOAM_COMPILE_STRICT
endif
endif endif
# Default compilation is 'Opt' - never permit an empty value # Default compilation is 'Opt' - never permit an empty value
......
...@@ -11,6 +11,10 @@ WMKDEP := $(WMAKE_BIN)/wmkdepend ...@@ -11,6 +11,10 @@ WMKDEP := $(WMAKE_BIN)/wmkdepend
WMKDEP_FLAGS := -eWM_PROJECT_DIR -eWM_THIRD_PARTY_DIR WMKDEP_FLAGS := -eWM_PROJECT_DIR -eWM_THIRD_PARTY_DIR
ifneq (,$(strip $(WM_QUIET)))
WMKDEP_FLAGS += -q
endif
ifneq (,$(strip $(WM_QUIET))) ifneq (,$(strip $(WM_QUIET)))
E=@ E=@
define QUIET_MESSAGE define QUIET_MESSAGE
......
...@@ -270,7 +270,8 @@ do ...@@ -270,7 +270,8 @@ do
;; ;;
-strict) -strict)
opt_strict="+strict" # Generate +strict (single use), ++strict (multiple use)
opt_strict="+${opt_strict:-strict}"
;; ;;
-build-root=*) -build-root=*)
...@@ -529,16 +530,9 @@ esac ...@@ -529,16 +530,9 @@ esac
# Handle -strict flag(s) # Handle -strict flag(s)
if [ -n "$opt_strict" ] if [ -n "$opt_strict" ]
then then
# Add +strict into WM_COMPILE_CONTROL # Add +strict, ++strict, ... into WM_COMPILE_CONTROL
opt_strict="${WM_COMPILE_CONTROL:+ }+strict" WM_COMPILE_CONTROL="${WM_COMPILE_CONTROL} ${opt_strict}"
case "$WM_COMPILE_CONTROL" in export WM_COMPILE_CONTROL
(*+strict*)
# Appears to have already been added
;;
(*)
export WM_COMPILE_CONTROL="${WM_COMPILE_CONTROL}${opt_strict}"
;;
esac
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment