@@ -350,12 +350,13 @@ jobs:
350
350
351
351
# MSVC 2022
352
352
- {
353
- name : " Windows MSVC 2022 Debug (C++17)" , artifact: "Windows-MSVC.tar.xz",
353
+ name : " Windows MSVC 2022 Debug (C++17) / ASAN " , artifact: "Windows-MSVC.tar.xz",
354
354
os : windows-latest,
355
355
build_type : Debug,
356
356
cc : " cl" , cxx: "cl",
357
357
environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
358
358
cxx_standard : 17,
359
+ cxx_asan : true,
359
360
}
360
361
- {
361
362
name : " Windows MSVC 2022 Release (C++17)" , artifact: "Windows-MSVC.tar.xz",
@@ -366,12 +367,13 @@ jobs:
366
367
cxx_standard : 17,
367
368
}
368
369
- {
369
- name : " Windows MSVC 2022 Debug (C++20)" , artifact: "Windows-MSVC.tar.xz",
370
+ name : " Windows MSVC 2022 Debug (C++20) / ASAN " , artifact: "Windows-MSVC.tar.xz",
370
371
os : windows-latest,
371
372
build_type : Debug,
372
373
cc : " cl" , cxx: "cl",
373
374
environment_script : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" ,
374
375
cxx_standard : 20,
376
+ cxx_asan : true,
375
377
}
376
378
- {
377
379
name : " Windows MSVC 2022 Release (C++20)" , artifact: "Windows-MSVC.tar.xz",
@@ -469,7 +471,7 @@ jobs:
469
471
COMMAND "${{ matrix.config.environment_script }}" && set
470
472
OUTPUT_FILE environment_script_output.txt
471
473
)
472
- set(cxx_flags "/permissive- /EHsc")
474
+ set(cxx_flags "/nologo / permissive- /EHsc")
473
475
file(STRINGS environment_script_output.txt output_lines)
474
476
foreach(line IN LISTS output_lines)
475
477
if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
@@ -495,14 +497,23 @@ jobs:
495
497
endif()
496
498
497
499
if ("x${{ matrix.config.cxx_asan }}" STREQUAL "xtrue")
498
- set(cxx_flags "${cxx_flags} -fsanitize=address -fno-omit-frame-pointer")
500
+ set(cxx_flags "${cxx_flags} -fsanitize=address")
501
+ if ("${{ runner.os }}" STREQUAL "Windows")
502
+ set(link_flags "${link_flags} /INFERASANLIBS /INCREMENTAL:NO")
503
+ else()
504
+ set(cxx_flags "${cxx_flags} -fno-omit-frame-pointer")
505
+ endif()
499
506
endif()
500
507
501
508
set(cxx_concepts ON)
502
509
if ("x${{ matrix.config.cxx_concepts }}" STREQUAL "xfalse")
503
510
set(cxx_concepts OFF)
504
511
endif()
505
512
513
+ if ("${{ runner.os }}" STREQUAL "Windows")
514
+ set(link_flags "${link_flags} /NOLOGO")
515
+ endif()
516
+
506
517
execute_process(
507
518
COMMAND ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/cmake
508
519
-S .
@@ -562,6 +573,15 @@ jobs:
562
573
563
574
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
564
575
576
+ if ("${{ runner.os }}" STREQUAL "Windows" AND NOT "x${{ matrix.config.environment_script }}" STREQUAL "x")
577
+ file(STRINGS environment_script_output.txt output_lines)
578
+ foreach(line IN LISTS output_lines)
579
+ if (line MATCHES "^([a-zA-Z0-9_-]+)=(.*)$")
580
+ set(ENV{${CMAKE_MATCH_1}} "${CMAKE_MATCH_2}")
581
+ endif()
582
+ endforeach()
583
+ endif()
584
+
565
585
execute_process(
566
586
COMMAND ${{ steps.cmake_and_ninja.outputs.cmake_dir }}/ctest --verbose -j ${N}
567
587
WORKING_DIRECTORY build
0 commit comments