Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit aea420f

Browse files
committed
build: Explicitly list cpptest source files.
This is because I couldn't find a completely portable command to list files matching a specific pattern in a subdirectory (or even a decent substitute on Windows for `ls -1 path/to/*.cpp`). This isn't a massive loss because we already explicitly list all of our other C++ source files.
1 parent 65f5f5a commit aea420f

File tree

8 files changed

+31
-6
lines changed

8 files changed

+31
-6
lines changed

config/cpptest.gypi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'variables':
33
{
44
'module_test_dependencies%': '',
5-
'module_test_additional_sources%': '',
5+
'module_test_sources%': '',
66
'module_test_include_dirs%': '',
77
'module_test_defines%': '',
88
},
@@ -33,8 +33,7 @@
3333

3434
'sources':
3535
[
36-
'<!@(ls -1 test/*.cpp)',
37-
'<@(module_test_additional_sources)',
36+
'<@(module_test_sources)',
3837
],
3938

4039
'include_dirs': [ '<@(module_test_include_dirs)', ],

engine/engine-sources.gypi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,13 @@
964964
[
965965
'src/browser.lcb',
966966
],
967+
968+
# Engine cpptest source files
969+
'engine_test_source_files':
970+
[
971+
'test/test_lextable.cpp',
972+
'test/test_new.cpp',
973+
],
967974
},
968975

969976
'target_defaults':

engine/kernel-development.gyp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
'../libfoundation/libfoundation.gyp:libFoundation',
1010
'../libgraphics/libgraphics.gyp:libGraphics',
1111
],
12-
'module_test_additional_sources':
12+
'module_test_sources':
1313
[
14+
'<@(engine_test_source_files)',
1415
'<(SHARED_INTERMEDIATE_DIR)/src/startupstack.cpp',
1516
],
1617
'module_test_include_dirs':

engine/kernel-installer.gyp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
'src',
1616
],
1717
'module_test_defines': [ 'MODE_INSTALLER', ],
18+
'module_test_sources':
19+
[
20+
'<@(engine_test_source_files)',
21+
],
1822
},
1923

2024
'includes':

engine/kernel-server.gyp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
'../libfoundation/libfoundation.gyp:libFoundation',
99
'../libgraphics/libgraphics.gyp:libGraphics',
1010
],
11-
'module_test_additional_sources':
11+
'module_test_sources':
1212
[
13-
'<@(engine_security_source_files)'
13+
'<@(engine_test_source_files)',
14+
'<@(engine_security_source_files)',
1415
],
1516
'module_test_include_dirs':
1617
[

engine/kernel-standalone.gyp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
'src',
1616
],
1717
'module_test_defines': [ 'MODE_STANDALONE', ],
18+
'module_test_sources':
19+
[
20+
'<@(engine_test_source_files)',
21+
],
1822
},
1923

2024
'includes':

libcpptest/libcpptest.gyp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
'variables':
33
{
44
'module_name': 'libcpptest',
5+
'module_test_sources':
6+
[
7+
'test/trivial.cpp',
8+
],
59
},
610

711
'includes':

libfoundation/libfoundation.gyp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
[
77
'libFoundation',
88
],
9+
'module_test_sources':
10+
[
11+
'test/environment.cpp',
12+
'test/test_string.cpp',
13+
],
914
},
1015

1116

0 commit comments

Comments
 (0)