Skip to content

Commit 00c17c8

Browse files
authored
Merge pull request #196903 from Homebrew/q-z-cpp-heredocs
q-z: Use C++ language-specific heredoc delimiters
2 parents 332e7f2 + fb0fed7 commit 00c17c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+148
-148
lines changed

Formula/q/qjson.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def install
3232
end
3333

3434
test do
35-
(testpath/"test.cpp").write <<~EOS
35+
(testpath/"test.cpp").write <<~CPP
3636
#include <qjson-qt5/parser.h>
3737
int main() {
3838
QJson::Parser parser;
3939
return 0;
4040
}
41-
EOS
41+
CPP
4242
flags = ["-I#{Formula["qt@5"].opt_include}"]
4343
flags += if OS.mac?
4444
[

Formula/q/[email protected]

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def caveats
371371
SOURCES += main.cpp
372372
EOS
373373

374-
(testpath/"main.cpp").write <<~EOS
374+
(testpath/"main.cpp").write <<~CPP
375375
#include <QCoreApplication>
376376
#include <QDebug>
377377
@@ -381,7 +381,7 @@ def caveats
381381
qDebug() << "Hello World!";
382382
return 0;
383383
}
384-
EOS
384+
CPP
385385

386386
# Work around "error: no member named 'signbit' in the global namespace"
387387
ENV.delete "CPATH"

Formula/q/qtkeychain.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def install
3333
end
3434

3535
test do
36-
(testpath/"test.cpp").write <<~EOS
36+
(testpath/"test.cpp").write <<~CPP
3737
#include <qt6keychain/keychain.h>
3838
int main() {
3939
QKeychain::ReadPasswordJob job(QLatin1String(""));
4040
return 0;
4141
}
42-
EOS
42+
CPP
4343
flags = ["-I#{Formula["qt"].opt_include}"]
4444
flags += if OS.mac?
4545
[

Formula/q/quazip.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ def install
5050
QMAKE_RPATHDIR += #{lib}
5151
EOS
5252

53-
(testpath/"test.cpp").write <<~EOS
53+
(testpath/"test.cpp").write <<~CPP
5454
#include <quazip/quazip.h>
5555
int main() {
5656
QuaZip zip;
5757
return 0;
5858
}
59-
EOS
59+
CPP
6060

6161
system Formula["qt"].bin/"qmake", "test.pro"
6262
system "make"

Formula/q/quill.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def install
2222
end
2323

2424
test do
25-
(testpath/"test.cpp").write <<~EOS
25+
(testpath/"test.cpp").write <<~CPP
2626
#include "quill/Backend.h"
2727
#include "quill/Frontend.h"
2828
#include "quill/LogMacros.h"
@@ -50,7 +50,7 @@ def install
5050
LOG_TRACE_L2(logger, "Positional arguments are {1} {0} ", "too", "supported");
5151
LOG_TRACE_L3(logger, "Support for floats {:03.2f}", 1.23456);
5252
}
53-
EOS
53+
CPP
5454

5555
system ENV.cxx, "-std=c++17", "test.cpp", "-I#{include}", "-o", "test", "-pthread"
5656
system "./test"

Formula/q/qwt-qt5.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ def install
5656
end
5757

5858
test do
59-
(testpath/"test.cpp").write <<~EOS
59+
(testpath/"test.cpp").write <<~CPP
6060
#include <qwt_plot_curve.h>
6161
int main() {
6262
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
6363
return (curve1 == NULL);
6464
}
65-
EOS
65+
CPP
6666
if OS.mac?
6767
system ENV.cxx, "test.cpp", "-o", "out",
6868
"-std=c++11",

Formula/q/qwt.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def install
5454
end
5555

5656
test do
57-
(testpath/"test.cpp").write <<~EOS
57+
(testpath/"test.cpp").write <<~CPP
5858
#include <qwt_plot_curve.h>
5959
int main() {
6060
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
6161
return (curve1 == NULL);
6262
}
63-
EOS
63+
CPP
6464
qt = Formula["qt"]
6565
if OS.mac?
6666
system ENV.cxx, "test.cpp", "-o", "out",

Formula/q/qxmpp.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def install
5454
QMAKE_RPATHDIR += #{lib}
5555
EOS
5656

57-
(testpath/"test.cpp").write <<~EOS
57+
(testpath/"test.cpp").write <<~CPP
5858
#include <QXmppQt6/QXmppClient.h>
5959
int main() {
6060
QXmppClient client;
6161
return 0;
6262
}
63-
EOS
63+
CPP
6464

6565
system "#{Formula["qt"].bin}/qmake", "test.pro"
6666
system "make"

Formula/r/r3.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ def install
4747
end
4848

4949
test do
50-
(testpath/"test.cpp").write <<~EOS
50+
(testpath/"test.cpp").write <<~CPP
5151
#include "r3.h"
5252
int main() {
5353
node * n = r3_tree_create(1);
5454
r3_tree_free(n);
5555
return 0;
5656
}
57-
EOS
57+
CPP
5858
system ENV.cc, "test.cpp", "-o", "test",
5959
"-L#{lib}", "-lr3", "-I#{include}/r3"
6060
system "./test"

Formula/r/range-v3.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def install
2525
end
2626

2727
test do
28-
(testpath/"test.cpp").write <<~EOS
28+
(testpath/"test.cpp").write <<~CPP
2929
#include <range/v3/all.hpp>
3030
#include <iostream>
3131
#include <string>
@@ -35,7 +35,7 @@ def install
3535
ranges::for_each( s, [](char c){ std::cout << c << " "; });
3636
std::cout << std::endl;
3737
}
38-
EOS
38+
CPP
3939
stdlib_ldflag = OS.mac? ? "-lc++" : "-lstdc++"
4040
flags = [stdlib_ldflag]
4141
flags << "-stdlib=libc++" if OS.mac?

0 commit comments

Comments
 (0)