Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5029790

Browse files
committed
Update the tests for VS 16.4.
1 parent 6c9c41e commit 5029790

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ jobs:
257257
fi
258258
259259
- name: install package
260+
# creating the package can take a while so do this only when we've pushed some tags for a release
260261
if: startsWith(github.ref, 'refs/tags/')
261262
shell: bash
262263
run: |

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,28 @@ target_cpp_header_units(test B.h)
5252
how to build it (after installing the cpp_modules CMake extension):
5353
* with ninja / clang-9 on Ubuntu
5454
```bash
55-
export CXX=clang++-9; export CC=clang-9;
56-
export CXXFLAGS="-stdlib=libc++"; export LDFLAGS="-stdlib=libc++ -fuse-ld=lld";
55+
export CXX=clang++-9;
5756
mkdir build && cd build
58-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../
57+
cmake -G Ninja ..
5958
cmake --build .
6059
```
6160
* with ninja / msvc (in a Developer Command Prompt or after running vcvarsall.bat)
6261
``` bash
6362
mkdir build && cd build
64-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../
63+
cmake -G Ninja ..
6564
cmake --build .
6665
```
6766
* with msbuild / msvc (in a Developer Command Prompt or after running vcvarsall.bat)
6867
```bash
6968
mkdir build && cd build
70-
cmake -G "Visual Studio 16 2019" -A "X64" ../
69+
cmake -G "Visual Studio 16 2019" -A "X64" ..
7170
cmake --build . --parallel --config Debug
7271
```
7372
* with ninja / clang-cl (in a Developer Command Prompt or after running vcvarsall.bat)
7473
```bash
7574
mkdir build && cd build
7675
set PATH=%PATH%;C:\Program Files\LLVM\bin
77-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang-cl.exe ../
76+
cmake -G Ninja -DCMAKE_CXX_COMPILER=clang-cl.exe ..
7877
cmake --build .
7978
```
8079
See `/tests/` for examples with more modules, header units, generated headers/sources.

src/scanner/scanner.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -962,15 +962,14 @@ struct ScannerImpl {
962962
// todo: currently, if the scan fails then we don't update the item
963963
// so it never gets saved in failed state
964964
// and so if it's up to date then it must've succeeded last time
965-
// but maybe we should should save the errors ?
965+
// but maybe we should save the errors ?
966966
bool success = (item_ood[idx] == ood_state::up_to_date || got_result[idx]);
967967
ret.push_back({ item_ood[idx],
968968
success ? scan_state::success : scan_state::failed });
969969
}
970970
return ret;
971971
}
972972

973-
// note: all of the input paths are required to be normalized already
974973
auto scan(Scanner::Type tool_type, std::string_view tool_path,
975974
std::string_view db_path, std::string_view int_dir, std::string_view item_root_path,
976975
bool commands_contain_item_path, span_map<cmd_idx_t, std::string_view> commands,
@@ -1123,7 +1122,7 @@ vector_map<scan_item_idx_t, Scanner::Result> Scanner::scan(const ConfigView & cc
11231122
throw std::invalid_argument(fmt::format("target_idx {} for {} is out of range [0..{}-1]",
11241123
(uint32_t)item.target_idx, item.path, (uint32_t)c.item_set.targets.size()));
11251124
if (item.command_idx >= c.item_set.commands.size())
1126-
throw std::invalid_argument(fmt::format("target_idx {} for {} is out of range [0..{}-1]",
1125+
throw std::invalid_argument(fmt::format("command_idx {} for {} is out of range [0..{}-1]",
11271126
(uint32_t)item.command_idx, item.path, (uint32_t)c.item_set.commands.size()));
11281127
}
11291128

src/test/gen_ninja.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ TEST_CASE("ninja generator system test", "[ninja]") {
123123

124124
for (std::string& test : get_run_set("", ninja_run_set)) {
125125
full_clean_one(test);
126-
bool verbose_scan = false;
127126
run_one(test, { .generator = "Ninja", .compiler = compiler });
128127
run_one(test, { .generator = "Ninja", .compiler = compiler,
129128
.expect_no_work_to_do = true, .expect_out_of_date = false });

tests/dag/B3.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
#ifdef __clang__
21
module;
32
#include <D5.hpp>
4-
#endif
53
export module B3;
64

7-
#ifndef __clang__
8-
extern "C++" {
9-
#include <D5.hpp>
10-
}
11-
#endif
12-
135
import std.core;
146

157
import B2;

0 commit comments

Comments
 (0)