kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
406 stars 69 forks source link

Still cannot build mdspan under MSVC 2019 #26

Open KineticTheory opened 4 years ago

KineticTheory commented 4 years ago

@dhollman In the conclusion to our discussion related to issue #22, you expressed that you have a version of mdspan (master?) working in Visual Studio. You expressed the need to set the compiler option /Zc:__cplusplus, which I have done. Can you provide details concerning the working setup that you are using? I am still unable to build mdspan from Visual Studio 2019.

I am using Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28804.1 for x64 under Visual Studio 2019 v. 16.6.0 Preview 4.0.

The error I see is:

C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(64,1): error C2371: 'std::is_assignable_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(685): message : see declaration of 'std::is_assignable_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(65,1): error C2371: 'std::is_constructible_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(638): message : see declaration of 'std::is_constructible_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(66,1): error C2371: 'std::is_convertible_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(473): message : see declaration of 'std::is_convertible_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(67,1): error C2371: 'std::is_default_constructible_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(656): message : see declaration of 'std::is_default_constructible_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(68,1): error C2371: 'std::is_trivially_destructible_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(824): message : see declaration of 'std::is_trivially_destructible_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(69,1): error C2371: 'std::is_same_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\xtr1common(79): message : see declaration of 'std::is_same_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(70,1): error C2371: 'std::is_empty_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(536): message : see declaration of 'std::is_empty_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\trait_backports.hpp(71,1): error C2371: 'std::is_void_v': redefinition; different basic types 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\type_traits(156): message : see declaration of 'std::is_void_v' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]
C:\work\kinetictheory\draco\src\experimental\__p0009_bits\subspan.hpp(484,1): error C3546: '...': there are no parameter packs available to expand 
    tstFunction_Traits.cc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\xstring(4342,5): error C2976: 'std::_Compressed_pair': too few template arguments 
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\include\xmemory(1319): message : see declaration of 'std::_Compressed_pair' [C:\work\vs2019-x64-Debug\draco\src\experimental\test\Ut_experimental_tst_mdspan_exe.vcxproj]

I also attempted to build the examples provided in the mdspan repository. Using the attached CMakeSettings.json for option x64-Debug, I ran into the following errors:

CMakeSettings.json.txt


    Checking Build System
    ctest_extents_ctors.vcxproj -> C:\work\vs2019-x64-Debug\mdspan\compilation_tests\Debug\ctest_extents_ctors.exe
    ctest_constexpr_layouts.vcxproj -> C:\work\vs2019-x64-Debug\mdspan\compilation_tests\Debug\ctest_constexpr_layouts.exe
    ctest_constructor_sfinae.vcxproj -> C:\work\vs2019-x64-Debug\mdspan\compilation_tests\Debug\ctest_constructor_sfinae.exe
    Building Custom Rule C:/work/vs2019-x64-Debug/mdspan/tests/googletest-src/googletest/CMakeLists.txt
    ctest_constexpr_subspan.cpp
    ctest_standard_layout.cpp
    ctest_constexpr_dereference.cpp
    ctest_no_unique_address.cpp
    gtest.vcxproj -> C:\work\vs2019-x64-Debug\mdspan\lib\Debug\gtestd.lib
C:\work\kinetictheory\mdspan\compilation_tests\ctest_constexpr_dereference.cpp(80,1): fatal error C1001: Internal compiler error. 
    (compiler file 'msc1.cpp', line 1533)
     To work around this problem, try simplifying or changing the program near the locations listed above.
    If possible please provide a repro here: https://developercommunity.visualstudio.com
    Please choose the Technical Support command on the Visual C++
     Help menu, or open the Technical Support help file for more information
  C:\work\kinetictheory\mdspan\compilation_tests\ctest_constexpr_dereference.cpp(77,1): message : while evaluating constexpr function 'simple_static_sum_test_1' [C:\work\vs2019-x64-Debug\mdspan\compilation_tests\ctest_constexpr_dereference.vcxproj]
    INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\CL.exe'
        Please choose the Technical Support command on the Visual C++
        Help menu, or open the Technical Support help file for more information
crtrott commented 4 years ago

We didn't tet figure out how to get gtest on Windows so we disabled the tests which need that and only compiled the rest (which according to Bob didn't work, and we then fixed). So our json looked like this:

{
  "configurations": [
    {
      "name": "x64-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "-DCMAKE_CXX_FLAGS=\"-Wall /wd4514 /wd4643 /wd4577 /wd5045\"",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": "",
      "variables": [
        {
          "name": "MDSPAN_ENABLE_EXAMPLES",
          "value": "True",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_TESTS",
          "value": "False",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_COMP_TESTS",
          "value": "False",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_COMPILATION_TESTS",
          "value": "True",
          "type": "BOOL"
        }
      ]
    },
    {
      "name": "x64-Clang-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": "",
      "inheritEnvironments": [ "clang_cl_x64" ],
      "variables": [
        {
          "name": "MDSPAN_ENABLE_EXAMPLES",
          "value": "True",
          "type": "BOOL"
        }
      ]
    }
  ]
}
crtrott commented 4 years ago

Can you check out the https://github.com/kokkos/mdspan/tree/fix-msvc-gtest-tests branch and see if it works for you?

KineticTheory commented 4 years ago

Can you check out the https://github.com/kokkos/mdspan/tree/fix-msvc-gtest-tests branch and see if it works for you?

At least for my installation, it doesn't work with -DMDSPAN_ENABLE_TESTS=ON

>------ Build All started: Project: mdspan, Configuration: x64-Debug ------
  Microsoft (R) Build Engine version 16.6.0-preview-20208-15+2f58c1427 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.

    Checking Build System
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/examples/tiled_layout/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/examples/dot_product/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/examples/subspan/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/kinetictheory/mdspan/compilation_tests/CMakeLists.txt
    Building Custom Rule C:/work/vs2019-x64-Debug/mdspan/tests/googletest-src/googletest/CMakeLists.txt
    dot_product.cpp
    simple_tiled_layout.cpp
    ctest_no_unique_address.cpp
    ctest_constructor_sfinae.cpp
    ctest_constexpr_dereference.cpp
    ctest_extents_ctors.cpp
    ctest_standard_layout.cpp
    subspan.cpp
C:\work\kinetictheory\mdspan\compilation_tests\ctest_constexpr_dereference.cpp(80,1): fatal error C1001: Internal compiler error. 
    (compiler file 'msc1.cpp', line 1533)
     To work around this problem, try simplifying or changing the program near the locations listed above.
    If possible please provide a repro here: https://developercommunity.visualstudio.com
    Please choose the Technical Support command on the Visual C++
     Help menu, or open the Technical Support help file for more information
  C:\work\kinetictheory\mdspan\compilation_tests\ctest_constexpr_dereference.cpp(77,1): message : while evaluating constexpr function 'simple_static_sum_test_1' [C:\work\vs2019-x64-Debug\mdspan\compilation_tests\ctest_constexpr_dereference.vcxproj]
    INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\CL.exe'
        Please choose the Technical Support command on the Visual C++
        Help menu, or open the Technical Support help file for more information
    ctest_constexpr_subspan.cpp
KineticTheory commented 4 years ago

@crtrott I appreciate you looking at this. I have an appveyor MSVC build that shows the build issues I'm hitting at https://github.com/lanl/Draco/pull/814. Scroll down to the "AppVeyor build failed" block and dive on that hyper link to see the compile line and fatal error. If you are interested, I can probably help you setup a similar MSVC2019 CI for mdspan.

crtrott commented 4 years ago

Hm maybe this is the difference between MSVC 16.5 and 16.6

crtrott commented 4 years ago

For the record here is my json file:

{
  "configurations": [
    {
      "name": "x64-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "-DCMAKE_CXX_FLAGS=\"/wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625\"",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": "",
      "variables": [
        {
          "name": "MDSPAN_ENABLE_EXAMPLES",
          "value": "True",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_TESTS",
          "value": "True",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_COMP_TESTS",
          "value": "True",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_COMPILATION_TESTS",
          "value": "True",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_BENCHMARKS",
          "value": "False",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_COMP_BENCH",
          "value": "False",
          "type": "BOOL"
        }
      ]
    },
    {
      "name": "x64-Clang-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "buildRoot": "${projectDir}\\out\\build\\${name}",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "-v",
      "ctestCommandArgs": "",
      "inheritEnvironments": [ "clang_cl_x64" ],
      "variables": [
        {
          "name": "MDSPAN_ENABLE_EXAMPLES",
          "value": "True",
          "type": "BOOL"
        },
        {
          "name": "MDSPAN_ENABLE_TESTS",
          "value": "True",
          "type": "BOOL"
        }
      ]
    }
  ]
}
crtrott commented 4 years ago

This is with tests enabled and version 16.5.0 of MSVC. I am not 100% sure if I want to look at previews of MSVC, since it is already a painful compiler :-P

crtrott commented 4 years ago

I am installing 16.5.4 now see if this still works.

dhollman commented 4 years ago

You expressed the need to set the compiler option /Zc:__cplusplus, which I have done.

Sorry if I miscommunicated on that. You shouldn't do this by hand. We've fixed that part at least.

I also attempted to build the examples provided in the mdspan repository. Using the attached CMakeSettings.json for option x64-Debug, I ran into the following errors: [...]

Yeah this failure is effectively a stress test of the compiler, not really a test of correct functionality. It's more or less meant to see what the compiler can do without crashing. I should move this to a different section or something, but my CMake isn't really good enough to figure out how to do that. For now, we need to just put in a way to enable compilation tests separately from runtime tests (this was in there at some point; @crtrott did you mean to exclude that change from the pull request?).

crtrott commented 4 years ago

@dhollman I didn't exclude anything. We already merged the original stuff, but @KineticTheory enabled all tests, so I did too and commented the stuff out which failed. This still works with 16.5.4 btw.

Configure

1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\ceear\Source\Repos\mdspan\out\install\x64-Debug" -DMDSPAN_ENABLE_EXAMPLES:BOOL="True" -DMDSPAN_ENABLE_TESTS:BOOL="True" -DMDSPAN_ENABLE_COMP_TESTS:BOOL="True" -DMDSPAN_ENABLE_COMPILATION_TESTS:BOOL="True" -DMDSPAN_ENABLE_BENCHMARKS:BOOL="False" -DMDSPAN_ENABLE_COMP_BENCH:BOOL="False" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/HostX64/x64/cl.exe" -DCMAKE_CXX_FLAGS="/wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\ceear\Source\Repos\mdspan" 2>&1"
1> Working directory: C:\Users\ceear\Source\Repos\mdspan\out\build\x64-Debug
1> [CMake] -- The CXX compiler identification is MSVC 19.25.28614.0
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Detected support for C++20 standard
1> [CMake] -- Performing Test COMPILER_SUPPORTS_FCONCEPTS
1> [CMake] -- Performing Test COMPILER_SUPPORTS_FCONCEPTS - Failed
1> [CMake] -- Performing Test COMPILER_SUPPORTS_FCONCEPTS_TS
1> [CMake] -- Performing Test COMPILER_SUPPORTS_FCONCEPTS_TS - Failed
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/Users/ceear/source/repos/mdspan/out/build/x64-Debug/tests/googletest-download
1> [CMake] [1/9] Creating directories for 'googletest'
1> [CMake] [2/9] Performing download step (git clone) for 'googletest'
1> [CMake] Cloning into 'googletest-src'...
1> [CMake] Your branch is up to date with 'origin/master'.
1> [CMake] Already on 'master'
1> [CMake] [3/9] No patch step for 'googletest'
1> [CMake] [4/9] Performing update step for 'googletest'
1> [CMake] Current branch master is up to date.
1> [CMake] [5/9] No configure step for 'googletest'
1> [CMake] [6/9] No build step for 'googletest'
1> [CMake] [7/9] No install step for 'googletest'
1> [CMake] [8/9] No test step for 'googletest'
1> [CMake] [9/9] Completed 'googletest'
1> [CMake] -- The C compiler identification is MSVC 19.25.28614.0
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe -- works
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Found PythonInterp: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python37_64/python.exe (found version "3.7.5") 
1> [CMake] -- Looking for pthread.h
1> [CMake] -- Looking for pthread.h - not found
1> [CMake] -- Found Threads: TRUE  
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] CMake Warning:
1> [CMake]   Manually-specified variables were not used by the project:
1> [CMake] 
1> [CMake]     MDSPAN_ENABLE_COMPILATION_TESTS
1> [CMake]     MDSPAN_ENABLE_COMP_TESTS
1> [CMake] 
1> [CMake] 
1> [CMake] -- Build files have been written to: C:/Users/ceear/source/repos/mdspan/out/build/x64-Debug
1> [CMake] 
1> Extracted CMake variables.
1> Extracted includes paths.
1> Extracted source files and headers.
1> Extracted code model.
1> CMake generation finished.

Build:

>------ Build All started: Project: mdspan, Configuration: x64-Debug ------
  [1/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_constexpr_layouts.dir\ctest_constexpr_layouts.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_constexpr_layouts.dir\ /FS -c ..\..\..\compilation_tests\ctest_constexpr_layouts.cpp
  [2/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_constructor_sfinae.dir\ctest_constructor_sfinae.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_constructor_sfinae.dir\ /FS -c ..\..\..\compilation_tests\ctest_constructor_sfinae.cpp
  [3/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_constexpr_dereference.dir\ctest_constexpr_dereference.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_constexpr_dereference.dir\ /FS -c ..\..\..\compilation_tests\ctest_constexpr_dereference.cpp
  [4/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_standard_layout.dir\ctest_standard_layout.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_standard_layout.dir\ /FS -c ..\..\..\compilation_tests\ctest_standard_layout.cpp
  [5/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_extents_ctors.dir\ctest_extents_ctors.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_extents_ctors.dir\ /FS -c ..\..\..\compilation_tests\ctest_extents_ctors.cpp
  [6/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_constexpr_layouts.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_constexpr_layouts.dir\ctest_constexpr_layouts.cpp.obj  /out:compilation_tests\ctest_constexpr_layouts.exe /implib:compilation_tests\ctest_constexpr_layouts.lib /pdb:compilation_tests\ctest_constexpr_layouts.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [7/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_standard_layout.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_standard_layout.dir\ctest_standard_layout.cpp.obj  /out:compilation_tests\ctest_standard_layout.exe /implib:compilation_tests\ctest_standard_layout.lib /pdb:compilation_tests\ctest_standard_layout.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [8/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_constructor_sfinae.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_constructor_sfinae.dir\ctest_constructor_sfinae.cpp.obj  /out:compilation_tests\ctest_constructor_sfinae.exe /implib:compilation_tests\ctest_constructor_sfinae.lib /pdb:compilation_tests\ctest_constructor_sfinae.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [9/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_extents_ctors.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_extents_ctors.dir\ctest_extents_ctors.cpp.obj  /out:compilation_tests\ctest_extents_ctors.exe /implib:compilation_tests\ctest_extents_ctors.lib /pdb:compilation_tests\ctest_extents_ctors.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [10/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -Itests\googletest-src\googletest\include -Itests\googletest-src\googletest /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi -D_UNICODE -DUNICODE -DWIN32 -D_WIN32 -DSTRICT -DWIN32_LEAN_AND_MEAN -wd4702 -DGTEST_HAS_PTHREAD=0 -EHsc -D_HAS_EXCEPTIONS=1  -std:c++latest /showIncludes /Fotests\googletest-build\googletest\CMakeFiles\gtest_main.dir\src\gtest_main.cc.obj /Fdbin\gtest_maind.pdb /FS -c tests\googletest-src\googletest\src\gtest_main.cc
  [11/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_constexpr_dereference.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_constexpr_dereference.dir\ctest_constexpr_dereference.cpp.obj  /out:compilation_tests\ctest_constexpr_dereference.exe /implib:compilation_tests\ctest_constexpr_dereference.lib /pdb:compilation_tests\ctest_constexpr_dereference.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [12/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_no_unique_address.dir\ctest_no_unique_address.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_no_unique_address.dir\ /FS -c ..\..\..\compilation_tests\ctest_no_unique_address.cpp
  [13/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include -Itests\googletest-src\googletest\include -Itests\googletest-src\googletest /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Fotests\CMakeFiles\test_layout_stride.dir\test_layout_stride.cpp.obj /Fdtests\CMakeFiles\test_layout_stride.dir\ /FS -c ..\..\..\tests\test_layout_stride.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(354): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(347): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(__int64)'
  C:\Users\ceear\source\repos\mdspan\out\build\x64-Debug\tests\googletest-src\googletest\include\gtest/gtest-printers.h(260): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(__int64)' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(638): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
  [14/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Foexamples\tiled_layout\CMakeFiles\simple_tiled_layout.dir\simple_tiled_layout.cpp.obj /Fdexamples\tiled_layout\CMakeFiles\simple_tiled_layout.dir\ /FS -c ..\..\..\examples\tiled_layout\simple_tiled_layout.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(281): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(266): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
  ..\..\..\examples\tiled_layout\simple_tiled_layout.cpp(196): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(638): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
  [15/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_no_unique_address.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_no_unique_address.dir\ctest_no_unique_address.cpp.obj  /out:compilation_tests\ctest_no_unique_address.exe /implib:compilation_tests\ctest_no_unique_address.lib /pdb:compilation_tests\ctest_no_unique_address.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [16/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Foexamples\dot_product\CMakeFiles\dot_product.dir\dot_product.cpp.obj /Fdexamples\dot_product\CMakeFiles\dot_product.dir\ /FS -c ..\..\..\examples\dot_product\dot_product.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(281): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(266): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
  ..\..\..\examples\dot_product\dot_product.cpp(134): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(638): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
  [17/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include -Itests\googletest-src\googletest\include -Itests\googletest-src\googletest /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Fotests\CMakeFiles\test_contiguous_layouts.dir\test_contiguous_layouts.cpp.obj /Fdtests\CMakeFiles\test_contiguous_layouts.dir\ /FS -c ..\..\..\tests\test_contiguous_layouts.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(354): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(347): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(__int64)'
  C:\Users\ceear\source\repos\mdspan\out\build\x64-Debug\tests\googletest-src\googletest\include\gtest/gtest-printers.h(260): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(__int64)' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(638): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
  [18/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Focompilation_tests\CMakeFiles\ctest_constexpr_subspan.dir\ctest_constexpr_subspan.cpp.obj /Fdcompilation_tests\CMakeFiles\ctest_constexpr_subspan.dir\ /FS -c ..\..\..\compilation_tests\ctest_constexpr_subspan.cpp
  [19/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=examples\tiled_layout\CMakeFiles\simple_tiled_layout.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo examples\tiled_layout\CMakeFiles\simple_tiled_layout.dir\simple_tiled_layout.cpp.obj  /out:examples\tiled_layout\simple_tiled_layout.exe /implib:examples\tiled_layout\simple_tiled_layout.lib /pdb:examples\tiled_layout\simple_tiled_layout.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [20/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=examples\dot_product\CMakeFiles\dot_product.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo examples\dot_product\CMakeFiles\dot_product.dir\dot_product.cpp.obj  /out:examples\dot_product\dot_product.exe /implib:examples\dot_product\dot_product.lib /pdb:examples\dot_product\dot_product.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [21/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Foexamples\subspan\CMakeFiles\subspan.dir\subspan.cpp.obj /Fdexamples\subspan\CMakeFiles\subspan.dir\ /FS -c ..\..\..\examples\subspan\subspan.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(202): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(195): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(bool)'
  ..\..\..\examples\subspan\subspan.cpp(63): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(bool)' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(638): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
  [22/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=compilation_tests\CMakeFiles\ctest_constexpr_subspan.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo compilation_tests\CMakeFiles\ctest_constexpr_subspan.dir\ctest_constexpr_subspan.cpp.obj  /out:compilation_tests\ctest_constexpr_subspan.exe /implib:compilation_tests\ctest_constexpr_subspan.lib /pdb:compilation_tests\ctest_constexpr_subspan.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [23/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -Itests\googletest-src\googletest\include -Itests\googletest-src\googletest /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi -D_UNICODE -DUNICODE -DWIN32 -D_WIN32 -DSTRICT -DWIN32_LEAN_AND_MEAN -wd4702 -DGTEST_HAS_PTHREAD=0 -EHsc -D_HAS_EXCEPTIONS=1  -std:c++latest /showIncludes /Fotests\googletest-build\googletest\CMakeFiles\gtest.dir\src\gtest-all.cc.obj /Fdbin\gtestd.pdb /FS -c tests\googletest-src\googletest\src\gtest-all.cc
  [24/30] cmd.exe /C "cd . && C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /lib /nologo /machine:x64 /out:lib\gtestd.lib tests\googletest-build\googletest\CMakeFiles\gtest.dir\src\gtest-all.cc.obj  && cd ."
  [25/30] cmd.exe /C "cd . && C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /lib /nologo /machine:x64 /out:lib\gtest_maind.lib tests\googletest-build\googletest\CMakeFiles\gtest_main.dir\src\gtest_main.cc.obj  && cd ."
  [26/30] C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\HostX64\x64\cl.exe  /nologo /TP  -I..\..\..\include -Itests\googletest-src\googletest\include -Itests\googletest-src\googletest /wd4514 /wd4643 /wd4577 /wd5045 /wd4668 /wd4820 /wd4625 /MDd /Zi /Ob0 /Od /RTC1   -std:c++latest /showIncludes /Fotests\CMakeFiles\test_layout_ctors.dir\test_layout_ctors.cpp.obj /Fdtests\CMakeFiles\test_layout_ctors.dir\ /FS -c ..\..\..\tests\test_layout_ctors.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(354): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(347): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(__int64)'
  C:\Users\ceear\source\repos\mdspan\out\build\x64-Debug\tests\googletest-src\googletest\include\gtest/gtest-printers.h(260): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(__int64)' being compiled
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\ostream(638): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
  [27/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=examples\subspan\CMakeFiles\subspan.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo examples\subspan\CMakeFiles\subspan.dir\subspan.cpp.obj  /out:examples\subspan\subspan.exe /implib:examples\subspan\subspan.lib /pdb:examples\subspan\subspan.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [28/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=tests\CMakeFiles\test_layout_stride.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo tests\CMakeFiles\test_layout_stride.dir\test_layout_stride.cpp.obj  /out:tests\test_layout_stride.exe /implib:tests\test_layout_stride.lib /pdb:tests\test_layout_stride.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  lib\gtest_maind.lib  lib\gtestd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [29/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=tests\CMakeFiles\test_contiguous_layouts.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo tests\CMakeFiles\test_contiguous_layouts.dir\test_contiguous_layouts.cpp.obj  /out:tests\test_contiguous_layouts.exe /implib:tests\test_contiguous_layouts.lib /pdb:tests\test_contiguous_layouts.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  lib\gtest_maind.lib  lib\gtestd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
  [30/30] cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=tests\CMakeFiles\test_layout_ctors.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo tests\CMakeFiles\test_layout_ctors.dir\test_layout_ctors.cpp.obj  /out:tests\test_layout_ctors.exe /implib:tests\test_layout_ctors.lib /pdb:tests\test_layout_ctors.pdb /version:0.0  /machine:x64 /debug /INCREMENTAL /subsystem:console  lib\gtest_maind.lib  lib\gtestd.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."

Build All succeeded.

Test:

Test project C:/Users/ceear/source/repos/mdspan/out/build/x64-Debug
    Start 1: test_contiguous_layouts
1/3 Test #1: test_contiguous_layouts ..........   Passed    0.05 sec
    Start 2: test_layout_ctors
2/3 Test #2: test_layout_ctors ................   Passed    0.05 sec
    Start 3: test_layout_stride
3/3 Test #3: test_layout_stride ...............   Passed    0.04 sec
100% tests passed, 0 tests failed out of 3
Total Test time (real) =   0.15 sec
dhollman commented 4 years ago

@crtrott no, the extra flag for compilation tests that we added seems to be missing still: https://github.com/kokkos/mdspan/blob/1d44c628b3a7e89265f2f92591b5dad5734427d3/CMakeLists.txt#L155-L156

mhoemmen commented 4 years ago

Another data point: I get build errors when I try to build kokkos/stdBLAS with Visual Studio 19. They look like this:

...\pkg\mdspan\include\experimental\__p0009_bits\extents.hpp(191,1): error C2440: '': cannot convert from 'initializer list' to 'std::experimental::detail::__no_unique_address_emulation,0,void>'

...\pkg\mdspan\include\experimental\__p0009_bits\extents.hpp(191,24): message : Invalid aggregate initialization [...\bld\stdBLAS\test s\add.vcxproj]                                                                                                                                                                                 

...\pkg\mdspan\include\experimental\__p0009_bits/basic_mdspan.hpp(148): message : see reference to function template instantiation 'std::experimental::extents<-1>::extents(size_t) noexcept' being compiled
mhoemmen commented 4 years ago

My previous comment may have been an issue with kokkos/stdBLAS. My PR fixes the build errors. The fix was to pass run-time extents into basic_mdspan's constructor as ptrdiff_t, instead of relying on conversion from size_t. I'm not sure if that's a VS 2019 issue, or an issue with mdspan's implementation.

KineticTheory commented 4 years ago

I've created a mini-repository that shows the build issues we are having with MSVC 2019 (our compiles are limited to C++14, see CMakeLists.txt) at https://github.com/KineticTheory/mdspan-msvc2019. This simple test trips over the following backport traits in trait_backports.hpp so I disabled them with a local #ifdef. These definitions conflict with those provided in <type_traits>. MSVC error: trait_backports.hpp(64,1): error C2371: 'std::is_assignable_v': redefinition

#ifdef keepthis
/* disable for msvc, gcc needs these */
_MDSPAN_BACKPORT_TRAIT(is_assignable)
_MDSPAN_BACKPORT_TRAIT(is_constructible)
_MDSPAN_BACKPORT_TRAIT(is_convertible)
_MDSPAN_BACKPORT_TRAIT(is_default_constructible)
_MDSPAN_BACKPORT_TRAIT(is_trivially_destructible)
_MDSPAN_BACKPORT_TRAIT(is_same)
_MDSPAN_BACKPORT_TRAIT(is_empty)
_MDSPAN_BACKPORT_TRAIT(is_void)
#endif

When I add the #ifdef as shown above, the next error I run into is:

subspan.hpp(469,1): error C3546: '...': there are no parameter packs available to expand 

I'm not sure how to debug this one. Any suggestions?

crtrott commented 4 years ago

I will look into this.