Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit e201778c authored by Robert Maynard's avatar Robert Maynard

Merge branch 'help_msvc_out'

parents 8280fac1 2af64c40
......@@ -64,8 +64,10 @@ function(vtkm_add_header_build_test name dir_prefix use_cuda)
elseif (${cxxfiles_len} GREATER 0)
add_library(TestBuild_${name} ${cxxfiles} ${hfiles})
if(VTKm_EXTRA_COMPILER_WARNINGS)
set_target_properties(TestBuild_${name}
PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_WARN_EXTRA})
set_property(TARGET ${test_prog}
APPEND PROPERTY COMPILE_FLAGS
${CMAKE_CXX_FLAGS_WARN_EXTRA}
)
endif(VTKm_EXTRA_COMPILER_WARNINGS)
endif ()
set_source_files_properties(${hfiles}
......@@ -191,18 +193,29 @@ function(vtkm_unit_tests)
cuda_add_executable(${test_prog} ${TestSources})
else (VTKm_UT_CUDA)
add_executable(${test_prog} ${TestSources})
if(VTKm_EXTRA_COMPILER_WARNINGS)
set_target_properties(${test_prog}
PROPERTIES COMPILE_FLAGS ${CMAKE_CXX_FLAGS_WARN_EXTRA})
set_property(TARGET ${test_prog}
APPEND PROPERTY COMPILE_FLAGS
${CMAKE_CXX_FLAGS_WARN_EXTRA}
)
endif(VTKm_EXTRA_COMPILER_WARNINGS)
if(MSVC)
#disable MSVC CRT and SCL warnings as they recommend using non standard
#c++ extensions
#enable bigobj support so that
set_property(TARGET ${test_prog}
APPEND PROPERTY COMPILE_DEFINITIONS
"_SCL_SECURE_NO_WARNINGS"
"_CRT_SECURE_NO_WARNINGS"
)
#enable large object support 2^32 addressable sections
set_property(TARGET ${test_prog}
APPEND PROPERTY COMPILE_FLAGS
"/bigobj"
)
endif()
endif (VTKm_UT_CUDA)
......@@ -339,14 +352,20 @@ function(vtkm_worklet_unit_tests device_adapter)
)
endforeach (test)
#disable MSVC CRT and SCL warnings as they recommend using non standard
#c++ extensions
if(MSVC)
#disable MSVC CRT and SCL warnings as they recommend using non standard
#c++ extensions
set_property(TARGET ${test_prog}
APPEND PROPERTY COMPILE_DEFINITIONS
"_SCL_SECURE_NO_WARNINGS"
"_CRT_SECURE_NO_WARNINGS"
)
#enable large object support 2^32 addressable sections
set_property(TARGET ${test_prog}
APPEND PROPERTY COMPILE_FLAGS
"/bigobj"
)
endif()
#increase warning level if needed, we are going to skip cuda here
......
......@@ -38,7 +38,11 @@
#include <vector>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#undef NOMINMAX
#undef WIN32_LEAN_AND_MEAN
#endif
namespace vtkm {
......
......@@ -23,7 +23,11 @@
#include <vtkm/cont/testing/Testing.h>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>
#undef NOMINMAX
#undef WIN32_LEAN_AND_MEAN
#endif
namespace {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment