Skip to content

Commit

Permalink
Use conformance mode for MSVC build
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Nov 16, 2023
1 parent 5d9cbe2 commit 116bb27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ if(MSVC)
# - C26812 - Prefer 'enum class' over 'enum' (Code analysis warning)
target_compile_options(Diligent-BuildSettings INTERFACE /W4 /wd4100 /wd4201 /wd4505 /wd26812 /MP ${DILIGENT_MSVC_COMPILE_OPTIONS})

# Enable conformance mode
target_compile_options(Diligent-BuildSettings INTERFACE /permissive-)

# In all release modes also:
# - disable w4189 - local variable is initialized but not referenced
# - Disable RTTI (/GR-)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST(PipelineResourceSignatureBaseTest, Compatibility)
EXPECT_NE(CalculatePipelineResourceSignatureDescHash(NullDesc1), CalculatePipelineResourceSignatureDescHash(NullDesc2));
}

constexpr PipelineResourceDesc RefRes[] = //
const PipelineResourceDesc RefRes[] = //
{
{SHADER_TYPE_VERTEX | SHADER_TYPE_PIXEL, "Buff", 2u, SHADER_RESOURCE_TYPE_CONSTANT_BUFFER, SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE, PIPELINE_RESOURCE_FLAG_NO_DYNAMIC_BUFFERS | PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY},
{SHADER_TYPE_VERTEX | SHADER_TYPE_PIXEL, "Tex", 4u, SHADER_RESOURCE_TYPE_TEXTURE_SRV, SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC, PIPELINE_RESOURCE_FLAG_COMBINED_SAMPLER | PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY} //
Expand Down

0 comments on commit 116bb27

Please sign in to comment.