Skip to content

Commit 71cf028

Browse files
Krithik Raoogalbxela
authored andcommitted
user: ext_libs: Upgrade muparser library to the most recent released
This change upgrades muparser library. Library source code now corresponds to: https://github.com/beltoforion/muparser (HEAD, tag: refs/tags/v2.3.4) Rationale for the change: - used version (2.2.5) is way outdated (dated Apr,2015) - flood of compilation warnings similar to: ext_libs/muparser/muParserToken.h:71:10: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations] std::auto_ptr<ParserCallback> m_pCallback; Testing done: $ bazel test //ext_libs/muparser:muparser-lib-test INFO: Analyzed target //ext_libs/muparser:muparser-lib-test (0 packages loaded, 0 targets configured). INFO: Found 1 test target... Target //ext_libs/muparser:muparser-lib-test up-to-date: bazel-bin/ext_libs/muparser/muparser-lib-test INFO: Elapsed time: 0.578s, Critical Path: 0.42s INFO: 2 processes: 2 linux-sandbox. INFO: Build completed successfully, 2 total actions //ext_libs/muparser:muparser-lib-test PASSED in 0.4s Executed 1 out of 1 test: 1 test passes. $ Signed-off-by: Alex Blago <[email protected]>
1 parent 8e33968 commit 71cf028

26 files changed

+9873
-10364
lines changed

ext_libs/muparser/BUILD

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
2+
#
3+
# This software is available to you under a choice of one of two
4+
# licenses. You may choose to be licensed under the terms of the GNU
5+
# General Public License (GPL) Version 2, available from the file
6+
# COPYING in the main directory of this source tree, or the
7+
# OpenIB.org BSD license below:
8+
#
9+
# Redistribution and use in source and binary forms, with or
10+
# without modification, are permitted provided that the following
11+
# conditions are met:
12+
#
13+
# - Redistributions of source code must retain the above
14+
# copyright notice, this list of conditions and the following
15+
# disclaimer.
16+
#
17+
# - Redistributions in binary form must reproduce the above
18+
# copyright notice, this list of conditions and the following
19+
# disclaimer in the documentation and/or other materials
20+
# provided with the distribution.
21+
#
22+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
26+
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27+
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29+
# SOFTWARE.
30+
31+
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
32+
33+
cc_library(
34+
name = "muparser-lib",
35+
srcs = [
36+
"muParser.cpp",
37+
"muParserBase.cpp",
38+
"muParserBytecode.cpp",
39+
"muParserCallback.cpp",
40+
"muParserError.cpp",
41+
"muParserInt.cpp",
42+
"muParserTokenReader.cpp",
43+
],
44+
hdrs = [
45+
"muParser.h",
46+
"muParserBase.h",
47+
"muParserBytecode.h",
48+
"muParserCallback.h",
49+
"muParserDef.h",
50+
"muParserError.h",
51+
"muParserFixes.h",
52+
"muParserInt.h",
53+
"muParserTemplateMagic.h",
54+
"muParserToken.h",
55+
"muParserTokenReader.h",
56+
],
57+
include_prefix = "muparser",
58+
linkopts = ["-lm"],
59+
visibility = [
60+
"//pkg:__pkg__",
61+
"//support/bazel/examples:__pkg__",
62+
"//user/mlxconfig:__pkg__",
63+
],
64+
)
65+
66+
cc_test(
67+
name = "muparser-lib-test",
68+
size = "small",
69+
srcs = [
70+
"muParserTest.cpp",
71+
"muParserTest.h",
72+
"t_ParserTest.cpp",
73+
],
74+
deps = [
75+
":muparser-lib",
76+
],
77+
)

ext_libs/muparser/Makefile.am

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#--
2-
# Copyright (c) 2004-2010 Mellanox Technologies LTD. All rights reserved.
1+
# Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
32
#
43
# This software is available to you under a choice of one of two
54
# licenses. You may choose to be licensed under the terms of the GNU
@@ -28,17 +27,28 @@
2827
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2928
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3029
# SOFTWARE.
31-
#--
32-
33-
# Makefile.am -- Process this file with automake to produce Makefile.in
3430

3531
AM_CFLAGS = -w -g -MP -MD ${COMPILER_FPIC}
3632
AM_CXXFLAGS = -w -g -MP -MD ${COMPILER_FPIC}
3733

3834
noinst_LTLIBRARIES = libmuparser.la
39-
noinst_HEADERS = muParser.h muParserBase.h muParserBytecode.h muParserCallback.h muParserDef.h muParserError.h muParserFixes.h muParserStack.h muParserToken.h muParserTokenReader.h muParserTemplateMagic.h
4035

4136
libmuparser_la_SOURCES = \
42-
muParserBase.cpp muParserBytecode.cpp muParserCallback.cpp muParser.cpp muParserError.cpp muParserTokenReader.cpp \
43-
muParser.h muParserBase.h muParserBytecode.h muParserCallback.h muParserDef.h muParserError.h muParserFixes.h muParserStack.h muParserToken.h muParserTokenReader.h muParserTemplateMagic.h
44-
37+
muParser.cpp \
38+
muParser.h \
39+
muParserBase.cpp \
40+
muParserBase.h \
41+
muParserBytecode.cpp \
42+
muParserBytecode.h \
43+
muParserCallback.cpp \
44+
muParserCallback.h \
45+
muParserDef.h \
46+
muParserError.cpp \
47+
muParserError.h \
48+
muParserFixes.h \
49+
muParserInt.cpp \
50+
muParserInt.h \
51+
muParserTemplateMagic.h \
52+
muParserToken.h \
53+
muParserTokenReader.cpp \
54+
muParserTokenReader.h

0 commit comments

Comments
 (0)