diff --git a/Allwmake-scan b/Allwmake-scan index eeb7c274ad65d5dfc399be5347c734756f202215..064ff08459e1a41ca10b4547cbf739bd197b7be1 100755 --- a/Allwmake-scan +++ b/Allwmake-scan @@ -1,8 +1,8 @@ #!/bin/sh # Allwmake with scan-build (clang) -c_compiler="$(command -v $WM_CC)" -cxx_compiler"$(command -v $WM_CXX)" +c_compiler="$(command -v "$(wmake -show-c)")" +cxx_compiler="$(command -v "$(wmake -show-cxx)")" set -x diff --git a/bin/foamInstallationTest b/bin/foamInstallationTest index 1530e68439bfbf6422be844b88872bdc673adc40..94753f55a35dd2930c5dc41330615761c298ba31 100755 --- a/bin/foamInstallationTest +++ b/bin/foamInstallationTest @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -236,10 +236,13 @@ reportExecutable() | sed -ne 's/^.*Version: *\([^ ][^ ]*\).*/\1/p') ;; flex) - VERSION=$($APP_NAME --version /dev/null 2>&1 \ + VERSION=$(flex --version /dev/null 2>&1 \ | sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p') ;; - gcc* | g++*) + wmake) + VERSION="$(wmake -show-api 2> /dev/null)" + ;; + *gcc* | *g++*) VERSION=$($APP_NAME -v 2>&1 \ | sed -ne 's/^gcc version \([0-9][0-9.]*\).*/\1/p') @@ -424,8 +427,9 @@ hline echo "$(fixlen Software 9) $(fixlen Version 10) $(fixlen Location 10)" hline reportExecutable flex -reportExecutable "$WM_CC" -reportExecutable "$WM_CXX" +reportExecutable wmake +reportExecutable "$(wmake -show-c)" +reportExecutable "$(wmake -show-cxx)" reportExecutable gzip if [ "$OSTYPE" = Linux ] then diff --git a/wmake/scripts/cmakeFunctions b/wmake/scripts/cmakeFunctions index 877d81f140de4004aa67c72ebda03740e11d55f6..d7f6f8a5b7f5f25394de0410671534b6df2493e5 100644 --- a/wmake/scripts/cmakeFunctions +++ b/wmake/scripts/cmakeFunctions @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -17,10 +17,12 @@ #------------------------------------------------------------------------------ . $WM_PROJECT_DIR/wmake/scripts/wmakeFunctions # Require some wmake functions -# Ensure CMake gets the correct C/C++ compilers -[ -n "$WM_CC" ] && export CC="$WM_CC" -[ -n "$WM_CXX" ] && export CXX="$WM_CXX" +# Export compiler information for cmake +export CC="$(wmake -show-c)" +export CXX="$(wmake -show-cxx)" +export CFLAGS="$(wmake -show-cflags)" +export CXXFLAGS="$(wmake -show-cxxflags)" #------------------------------------------------------------------------------ diff --git a/wmake/scripts/sysFunctions b/wmake/scripts/sysFunctions index a11f58c3c4eca62657a23683ce52853a9febc73a..3771a90d5dfe9432b8bd7bfeb05de43398e09d27 100644 --- a/wmake/scripts/sysFunctions +++ b/wmake/scripts/sysFunctions @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -34,16 +34,19 @@ then # Load once, but do not rely on this variable elsewhere WMAKE_SCRIPTS_SYSFUNCTIONS=loaded - # Static library extension. Default=.a + # Static library extension (default=".a") extLiba=".a" - # Shared library extension. Default=.so + # Shared library extension (default=".so") + extLibso=".so" + + # Adjustments case "$(uname -s 2>/dev/null)" in Darwin) extLibso=".dylib" ;; *) - extLibso=".so" + ## Other. Eg, extLibso=".dll" or extLibso=".dll.a" ;; esac @@ -59,7 +62,7 @@ then # Uses cached value from libso extension isWindows() { - test "$extLibso" = ".dll" + test "$extLibso" = ".dll" || "$extLibso" = ".dll.a" }