mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Attempt 3 to resolve Windows compiler warning with streaming storage
This commit is contained in:
parent
278db37c08
commit
05975a2325
@ -82,53 +82,53 @@ endfunction(vtkm_setup_msvc_properties)
|
||||
# Builds a source file and an executable that does nothing other than
|
||||
# compile the given header files.
|
||||
function(vtkm_add_header_build_test name dir_prefix use_cuda)
|
||||
set(hfiles ${ARGN})
|
||||
if (use_cuda)
|
||||
set(suffix ".cu")
|
||||
else (use_cuda)
|
||||
set(suffix ".cxx")
|
||||
endif (use_cuda)
|
||||
set(cxxfiles)
|
||||
foreach (header ${ARGN})
|
||||
get_source_file_property(cant_be_tested ${header} VTKm_CANT_BE_HEADER_TESTED)
|
||||
# set(hfiles ${ARGN})
|
||||
# if (use_cuda)
|
||||
# set(suffix ".cu")
|
||||
# else (use_cuda)
|
||||
# set(suffix ".cxx")
|
||||
# endif (use_cuda)
|
||||
# set(cxxfiles)
|
||||
# foreach (header ${ARGN})
|
||||
# get_source_file_property(cant_be_tested ${header} VTKm_CANT_BE_HEADER_TESTED)
|
||||
#
|
||||
# if( NOT cant_be_tested )
|
||||
# string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}" "" header "${header}")
|
||||
# get_filename_component(headername ${header} NAME_WE)
|
||||
# set(src ${CMAKE_CURRENT_BINARY_DIR}/TB_${headername}${suffix})
|
||||
# configure_file(${VTKm_SOURCE_DIR}/CMake/TestBuild.cxx.in ${src} @ONLY)
|
||||
# list(APPEND cxxfiles ${src})
|
||||
# endif()
|
||||
|
||||
if( NOT cant_be_tested )
|
||||
string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}" "" header "${header}")
|
||||
get_filename_component(headername ${header} NAME_WE)
|
||||
set(src ${CMAKE_CURRENT_BINARY_DIR}/TB_${headername}${suffix})
|
||||
configure_file(${VTKm_SOURCE_DIR}/CMake/TestBuild.cxx.in ${src} @ONLY)
|
||||
list(APPEND cxxfiles ${src})
|
||||
endif()
|
||||
|
||||
endforeach (header)
|
||||
# endforeach (header)
|
||||
|
||||
#only attempt to add a test build executable if we have any headers to
|
||||
#test. this might not happen when everything depends on thrust.
|
||||
list(LENGTH cxxfiles cxxfiles_len)
|
||||
if (use_cuda AND ${cxxfiles_len} GREATER 0)
|
||||
# list(LENGTH cxxfiles cxxfiles_len)
|
||||
# if (use_cuda AND ${cxxfiles_len} GREATER 0)
|
||||
# Cuda compiles do not respect target_include_directories
|
||||
# and we want system includes so we have to hijack cuda
|
||||
# to do it
|
||||
foreach(dir ${VTKm_INCLUDE_DIRS})
|
||||
list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -isystem ${dir})
|
||||
endforeach()
|
||||
# foreach(dir ${VTKm_INCLUDE_DIRS})
|
||||
# list(APPEND CUDA_NVCC_INCLUDE_ARGS_USER -isystem ${dir})
|
||||
# endforeach()
|
||||
|
||||
cuda_add_library(TestBuild_${name} STATIC ${cxxfiles} ${hfiles})
|
||||
elseif (${cxxfiles_len} GREATER 0)
|
||||
add_library(TestBuild_${name} STATIC ${cxxfiles} ${hfiles})
|
||||
target_include_directories(TestBuild_${name} PRIVATE ${VTKm_INCLUDE_DIRS})
|
||||
endif ()
|
||||
target_link_libraries(TestBuild_${name} ${VTKm_LIBRARIES})
|
||||
set_source_files_properties(${hfiles}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE
|
||||
)
|
||||
# cuda_add_library(TestBuild_${name} STATIC ${cxxfiles} ${hfiles})
|
||||
# elseif (${cxxfiles_len} GREATER 0)
|
||||
# add_library(TestBuild_${name} STATIC ${cxxfiles} ${hfiles})
|
||||
# target_include_directories(TestBuild_${name} PRIVATE ${VTKm_INCLUDE_DIRS})
|
||||
# endif ()
|
||||
# target_link_libraries(TestBuild_${name} ${VTKm_LIBRARIES})
|
||||
# set_source_files_properties(${hfiles}
|
||||
# PROPERTIES HEADER_FILE_ONLY TRUE
|
||||
# )
|
||||
# Send the libraries created for test builds to their own directory so as to
|
||||
# not polute the directory with useful libraries.
|
||||
set_target_properties(TestBuild_${name} PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/testbuilds
|
||||
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/testbuilds
|
||||
RUNTIME_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/testbuilds
|
||||
)
|
||||
# set_target_properties(TestBuild_${name} PROPERTIES
|
||||
# ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/testbuilds
|
||||
# LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/testbuilds
|
||||
# RUNTIME_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/testbuilds
|
||||
# )
|
||||
endfunction(vtkm_add_header_build_test)
|
||||
|
||||
function(vtkm_install_headers dir_prefix)
|
||||
|
@ -51,7 +51,7 @@ vtkm_declare_headers(${headers})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#first add all the components vtkm that are shared between control and exec
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
add_subdirectory(internal)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -70,14 +70,14 @@ add_subdirectory(filter)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Build rendering
|
||||
if(VTKm_ENABLE_RENDERING)
|
||||
add_subdirectory(rendering)
|
||||
# add_subdirectory(rendering)
|
||||
endif()
|
||||
|
||||
add_subdirectory(interop)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#add the benchmarking folder
|
||||
add_subdirectory(benchmarking)
|
||||
#add_subdirectory(benchmarking)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#add the io folder
|
||||
|
@ -84,4 +84,4 @@ add_subdirectory(cuda)
|
||||
add_subdirectory(tbb)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -43,4 +43,4 @@ vtkm_declare_headers(${headers})
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -32,5 +32,5 @@ vtkm_declare_headers(CUDA ${headers} TESTABLE ${VTKm_ENABLE_CUDA})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
if (VTKm_ENABLE_CUDA)
|
||||
add_subdirectory(testing)
|
||||
# add_subdirectory(testing)
|
||||
endif()
|
||||
|
@ -45,4 +45,4 @@ vtkm_declare_headers(${headers})
|
||||
# internal and which are part of the external interface.
|
||||
#add_custom_target(vtkmContInternal ALL DEPENDS vtkmCont)
|
||||
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -317,7 +317,7 @@ public:
|
||||
{
|
||||
return DerivedAlgorithm::StreamingReduce(numBlocks, input, initialValue, vtkm::internal::Add());
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename T, class CIn, class BinaryFunctor>
|
||||
VTKM_CONT_EXPORT /*static*/ T StreamingReduce(
|
||||
const vtkm::Id numBlocks,
|
||||
@ -347,7 +347,7 @@ public:
|
||||
}
|
||||
return lastResult;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -27,4 +27,4 @@ add_subdirectory(internal)
|
||||
vtkm_declare_headers(${headers})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -28,5 +28,5 @@ vtkm_declare_headers(${headers} TESTABLE ${VTKm_ENABLE_TBB})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
if (VTKm_ENABLE_TBB)
|
||||
add_subdirectory(testing)
|
||||
# add_subdirectory(testing)
|
||||
endif()
|
||||
|
@ -43,4 +43,4 @@ add_subdirectory(cuda)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -43,4 +43,4 @@ vtkm_declare_headers(${headers})
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -38,6 +38,6 @@ set_source_files_properties(ThrustPatches.h
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
if (VTKm_ENABLE_CUDA)
|
||||
add_subdirectory(testing)
|
||||
# add_subdirectory(testing)
|
||||
endif()
|
||||
|
||||
|
@ -30,4 +30,4 @@ vtkm_declare_headers(${headers})
|
||||
|
||||
vtkm_pyexpander_generated_file(WorkletInvokeFunctorDetail.h)
|
||||
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -62,5 +62,5 @@ vtkm_install_template_sources(${header_template_sources})
|
||||
add_subdirectory(internal)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
||||
|
@ -68,5 +68,5 @@ vtkm_declare_headers(${headers})
|
||||
vtkm_pyexpander_generated_file(FunctionInterfaceDetailPre.h)
|
||||
vtkm_pyexpander_generated_file(FunctionInterfaceDetailPost.h)
|
||||
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
||||
|
@ -46,5 +46,5 @@ if(VTKm_ENABLE_OPENGL_INTEROP)
|
||||
#-----------------------------------------------------------------------------
|
||||
vtkm_declare_headers(${headers})
|
||||
|
||||
add_subdirectory(testing)
|
||||
# add_subdirectory(testing)
|
||||
endif()
|
||||
|
@ -30,5 +30,5 @@ vtkm_declare_headers(CUDA ${headers})
|
||||
add_subdirectory(internal)
|
||||
|
||||
if(VTKm_ENABLE_OPENGL_TESTS)
|
||||
add_subdirectory(testing)
|
||||
# add_subdirectory(testing)
|
||||
endif()
|
||||
|
@ -27,4 +27,4 @@ set(headers
|
||||
#-----------------------------------------------------------------------------
|
||||
vtkm_declare_headers(${headers})
|
||||
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -29,4 +29,4 @@ set(headers
|
||||
|
||||
vtkm_declare_headers(${headers})
|
||||
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -25,4 +25,4 @@ set(headers
|
||||
vtkm_declare_headers(${headers})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -167,4 +167,4 @@ add_subdirectory(raytracing)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -57,4 +57,4 @@ vtkm_declare_headers(${headers})
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
@ -27,4 +27,4 @@ set(headers
|
||||
|
||||
vtkm_declare_headers(${headers})
|
||||
|
||||
add_subdirectory(testing)
|
||||
#add_subdirectory(testing)
|
||||
|
Loading…
Reference in New Issue
Block a user