Commit 1a13324a authored by Li-Ta Lo's avatar Li-Ta Lo
Browse files

Merge branch 'master' into connected_component

parents e058aaeb 4fd3203b
File mode changed from 100755 to 100644
......@@ -174,7 +174,7 @@ endif ()
# will never adequately match the user's setup, so there is no feasible way
# to detect the "best" version to use. The user will have to manually
# select the right files. (Chances are the distributions are shipping their
# custom version of tbb, anyway, so the problem is probably nonexistant.)
# custom version of tbb, anyway, so the problem is probably nonexistent.)
if (WIN32 AND MSVC)
set(COMPILER_PREFIX "vc7.1")
if (MSVC_VERSION EQUAL 1400)
......
......@@ -70,7 +70,7 @@ if(${diff_result})
# If diff returned non-zero, it failed and the two files are different.
get_filename_component(filename ${SOURCE_FILE} NAME)
message(SEND_ERROR
"The source file ${filename} does not match the generated file. If you have modified this file directly, then you have messed up. Modify the ${filename}.in file instead and then copy the pyexpander result to ${filename}. If you modified ${filename}.in, then you might just need to copy the pyresult back to the source directory. If you have not modifed either, then you have likely checked out an inappropriate change. Check the git logs to see what changes were made.
"The source file ${filename} does not match the generated file. If you have modified this file directly, then you have messed up. Modify the ${filename}.in file instead and then copy the pyexpander result to ${filename}. If you modified ${filename}.in, then you might just need to copy the pyresult back to the source directory. If you have not modified either, then you have likely checked out an inappropriate change. Check the git logs to see what changes were made.
If the changes have resulted from modifying ${filename}.in, then you can finish by moving ${GENERATED_FILE}.save over ${SOURCE_FILE}")
else()
# Now that we have done the comparison, remove the generated file so there is
......
......@@ -37,6 +37,7 @@ set(FILES_TO_CHECK
)
set(EXCEPTIONS
kxsort.h
)
set(DIRECTORY_EXCEPTIONS
......
......@@ -64,7 +64,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
endif()
# Set up the debug CXX_FLAGS for extra warnings
option(VTKm_EXTRA_COMPILER_WARNINGS "Add compiler flags to do stricter checking when building debug." ON)
vtkm_option(VTKm_EXTRA_COMPILER_WARNINGS "Add compiler flags to do stricter checking when building debug." ON)
# We used to add the compiler flags globally, but this caused problems with
# the CUDA compiler (and its lack of support for GCC pragmas). Instead,
# the vtkm_declare_headers and vtkm_unit_tests CMake functions add these flags
......@@ -95,5 +95,4 @@ elseif (CMAKE_COMPILER_IS_MSVCXX)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
endif()
......@@ -46,7 +46,7 @@ set(VTKm_VERSION_FULL "@VTKm_VERSION_FULL@")
set(VTKm_VERSION "@VTKm_VERSION@")
# This is true when the package is still in the build directory (not installed)
if(CMAKE_CURRENT_LIST_DIR STREQUAL "@VTKm_BINARY_DIR@/@VTKm_INSTALL_CONFIG_DIR@")
if(CMAKE_CURRENT_LIST_DIR STREQUAL "@VTKm_BUILD_CMAKE_BASE_DIR@/@VTKm_INSTALL_CONFIG_DIR@")
set(VTKm_PACKAGE_IN_BUILD TRUE)
endif()
......
......@@ -111,7 +111,7 @@ macro(vtkm_configure_component_Base)
endif()
endif()
# Check for the existance of the base vtkm target
# Check for the existence of the base vtkm target
if (TARGET vtkm)
set(VTKm_base_vtkm_target_FOUND True)
endif()
......@@ -179,7 +179,7 @@ macro(vtkm_configure_component_OpenGL)
#setting VTKm_OPENGL_INCLUDE_DIRS when both mesa and
#opengl are not present causes cmake to fail to configure
#becase of a percieved dependency in the rendering lib
#because of a perceived dependency in the rendering lib
if(VTKm_OSMesa_FOUND OR OPENGL_FOUND)
set(VTKm_OPENGL_INCLUDE_DIRS ${vtkm_opengl_includes})
set(VTKm_OPENGL_LIBRARIES ${vtkm_opengl_libraries})
......@@ -350,7 +350,7 @@ macro(vtkm_configure_component_CUDA)
set(VTKm_CUDA_Architecture "native" CACHE STRING "Which GPU Architecture(s) to compile for")
set_property(CACHE VTKm_CUDA_Architecture PROPERTY STRINGS native fermi kepler maxwell pascal volta all)
#detect what the propery is set too
#detect what the property is set too
if(VTKm_CUDA_Architecture STREQUAL "native")
if(VTKM_CUDA_NATIVE_EXE_PROCESS_RAN_OUTPUT)
......
......@@ -58,7 +58,7 @@ function(determine_version source_dir git_command var_prefix)
endif()
extract_version_components("${output}" tmp)
if(DEFINED tmp_VERSION)
message(STATUS "Determined Source Version : ${tmp_VERSION_FULL}")
message(STATUS "Determined ${PROJECT_NAME} Source Version: ${tmp_VERSION_FULL}")
if (NOT "${tmp_VERSION}" STREQUAL "${${var_prefix}_VERSION}")
message(WARNING
"Version from git (${tmp_VERSION}) disagrees with hard coded version (${${var_prefix}_VERSION}). Either update the git tags or version.txt.")
......
......@@ -86,12 +86,6 @@ function(vtkm_setup_msvc_properties target )
# removed when doing header test builds.
target_compile_options(${target} PRIVATE -wd4702 -wd4505)
# In VS2013 the C4127 warning has a bug in the implementation and
# generates false positive warnings for lots of template code
if(MSVC_VERSION LESS 1900)
target_compile_options(${target} PRIVATE -wd4127 )
endif()
endfunction(vtkm_setup_msvc_properties)
# vtkm_target_name(<name>)
......@@ -186,7 +180,7 @@ function(vtkm_add_header_build_test name dir_prefix use_cuda)
vtkm_setup_msvc_properties(TestBuild_${name})
# Send the libraries created for test builds to their own directory so as to
# not polute the directory with useful libraries.
# not pollute the directory with useful libraries.
set_target_properties(TestBuild_${name} PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY ${VTKm_LIBRARY_OUTPUT_PATH}/testbuilds
LIBRARY_OUTPUT_DIRECTORY ${VTKm_LIBRARY_OUTPUT_PATH}/testbuilds
......@@ -896,3 +890,12 @@ function(_vtkm_parse_test_options varname options)
endforeach()
set(${varname} ${names} PARENT_SCOPE)
endfunction()
# -----------------------------------------------------------------------------
# vtkm_option(variable doc [initial])
# Provides an option if it is not already defined.
macro (vtkm_option variable)
if (NOT DEFINED "${variable}")
option("${variable}" ${ARGN})
endif ()
endmacro ()
......@@ -157,6 +157,8 @@ EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */testing/*
EXCLUDE_PATTERNS += */examples/*
EXCLUDE_PATTERNS += UnitTest*
EXCLUDE_PATTERNS += */vtkmdiy/fmt/*
EXCLUDE_PATTERNS += */vtkmdiy/thread/*
EXCLUDE_SYMBOLS = thrust
EXCLUDE_SYMBOLS += detail
......
......@@ -53,8 +53,11 @@ endif()
if (NOT DEFINED VTKm_INSTALL_BIN_DIR)
set(VTKm_INSTALL_BIN_DIR "bin")
endif()
if (NOT DEFINED VTKm_INSTALL_SHARE_DIR)
set(VTKm_INSTALL_SHARE_DIR "share/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}")
endif()
if (NOT DEFINED VTKm_INSTALL_CMAKE_MODULE_DIR)
set(VTKm_INSTALL_CMAKE_MODULE_DIR "share/vtkm-${VTKm_VERSION_MAJOR}.${VTKm_VERSION_MINOR}/cmake")
set(VTKm_INSTALL_CMAKE_MODULE_DIR "${VTKm_INSTALL_SHARE_DIR}/cmake")
endif()
set(VTKm_BINARY_INCLUDE_DIR "${VTKm_BINARY_DIR}/include")
......@@ -91,7 +94,7 @@ if(NOT VTKm_Base_FOUND)
endif()
#-----------------------------------------------------------------------------
# When using C++11 suport make sure you use the standard C++ extensions rather
# When using C++11 support make sure you use the standard C++ extensions rather
# than compiler-specific versions of the extensions (to preserve portability).
set(CMAKE_CXX_EXTENSIONS False)
......@@ -102,7 +105,7 @@ set(CMAKE_CXX_EXTENSIONS False)
# We prefer to only export symbols of a small set of user facing classes,
# rather than exporting all symbols. In practice we will try to not export
# symbols for any third party library.
option(VTKm_USE_DEFAULT_SYMBOL_VISIBILITY "Don't explicitly hide symbols from libraries." OFF)
vtkm_option(VTKm_USE_DEFAULT_SYMBOL_VISIBILITY "Don't explicitly hide symbols from libraries." OFF)
mark_as_advanced(VTKm_USE_DEFAULT_SYMBOL_VISIBILITY)
if(NOT VTKm_USE_DEFAULT_SYMBOL_VISIBILITY)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
......@@ -113,27 +116,27 @@ include(CMake/VTKmCompilerExtras.cmake)
#-----------------------------------------------------------------------------
# Configurable Options
option(VTKm_ENABLE_CUDA "Enable Cuda support" OFF)
option(VTKm_ENABLE_TBB "Enable TBB support" OFF)
option(VTKm_ENABLE_RENDERING "Enable rendering library" ON)
option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON)
option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
option(VTKm_ENABLE_OSMESA "Enable creating the OSMesa canvas" OFF)
option(VTKm_ENABLE_MPI "Enable MPI support" OFF)
option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF)
option(VTKm_ENABLE_EXAMPLES "Build examples" OFF)
option(VTKm_USE_DOUBLE_PRECISION
vtkm_option(VTKm_ENABLE_CUDA "Enable Cuda support" OFF)
vtkm_option(VTKm_ENABLE_TBB "Enable TBB support" OFF)
vtkm_option(VTKm_ENABLE_RENDERING "Enable rendering library" ON)
vtkm_option(VTKm_ENABLE_TESTING "Enable VTKm Testing" ON)
vtkm_option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
vtkm_option(VTKm_ENABLE_OSMESA "Enable creating the OSMesa canvas" OFF)
vtkm_option(VTKm_ENABLE_MPI "Enable MPI support" OFF)
vtkm_option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF)
vtkm_option(VTKm_ENABLE_EXAMPLES "Build examples" OFF)
vtkm_option(VTKm_USE_DOUBLE_PRECISION
"Use double precision for floating point calculations"
OFF
)
option(VTKm_USE_64BIT_IDS "Use 64-bit indices." ON)
vtkm_option(VTKm_USE_64BIT_IDS "Use 64-bit indices." ON)
option(VTKm_NO_ASSERT "Disable assertions in debugging builds." OFF)
vtkm_option(VTKm_NO_ASSERT "Disable assertions in debugging builds." OFF)
mark_as_advanced(VTKm_NO_ASSERT)
option(BUILD_SHARED_LIBS "Build VTK-m with shared libraries" ON)
vtkm_option(BUILD_SHARED_LIBS "Build VTK-m with shared libraries" ON)
set(VTKm_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
if (VTKm_ENABLE_TESTING)
......@@ -217,7 +220,7 @@ find_package(PythonInterp)
#-----------------------------------------------------------------------------
# Find Pyexpander in case somebody wants to update the auto generated
# faux variadic template code
find_package(Pyexpander)
find_package(Pyexpander QUIET)
#-----------------------------------------------------------------------------
# Add subdirectories
......@@ -274,9 +277,13 @@ set(VTKm_LOAD_COMPONENTS_COMMANDS "${VTKm_LOAD_COMPONENTS_COMMANDS}
endif()
endforeach()" )
if (NOT DEFINED VTKm_BUILD_CMAKE_BASE_DIR)
set(VTKm_BUILD_CMAKE_BASE_DIR "${VTKm_BINARY_DIR}")
endif ()
configure_package_config_file(
${VTKm_SOURCE_DIR}/CMake/VTKmConfig.cmake.in
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfig.cmake
${VTKm_BUILD_CMAKE_BASE_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfig.cmake
INSTALL_DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
PATH_VARS
VTKm_INSTALL_INCLUDE_DIR
......@@ -287,23 +294,23 @@ configure_package_config_file(
)
write_basic_package_version_file(
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
${VTKm_BUILD_CMAKE_BASE_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
VERSION ${VTKm_VERSION}
COMPATIBILITY ExactVersion )
install(
FILES
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfig.cmake
${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
${VTKm_BUILD_CMAKE_BASE_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfig.cmake
${VTKm_BUILD_CMAKE_BASE_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmConfigVersion.cmake
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
)
# Install the readme and license files.
install(FILES ${VTKm_SOURCE_DIR}/README.md
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
DESTINATION ${VTKm_INSTALL_SHARE_DIR}
RENAME VTKmREADME.md
)
install(FILES ${VTKm_SOURCE_DIR}/LICENSE.txt
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
DESTINATION ${VTKm_INSTALL_SHARE_DIR}
RENAME VTKmLICENSE.txt
)
......@@ -332,24 +339,27 @@ install(
# Create and install exports for external projects
export(EXPORT ${VTKm_EXPORT_NAME}
FILE ${VTKm_BINARY_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmTargets.cmake
FILE ${VTKm_BUILD_CMAKE_BASE_DIR}/${VTKm_INSTALL_CONFIG_DIR}/VTKmTargets.cmake
)
install(EXPORT ${VTKm_EXPORT_NAME}
DESTINATION ${VTKm_INSTALL_CONFIG_DIR}
FILE VTKmTargets.cmake
)
# Enable CPack packaging
set(CPACK_PACKAGE_DESCRIPTION_FILE ${VTKm_SOURCE_DIR}/README.md)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The VTKm Toolkit")
set(CPACK_PACKAGE_NAME "VTKm")
set(CPACK_PACKAGE_VERSION_MAJOR ${VTKm_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VTKm_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VTKm_VERSION_PATCH})
set(CPACK_PACKAGE_FILE_NAME "VTKm-${VTKm_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE ${VTKm_SOURCE_DIR}/LICENSE.txt)
set(CPACK_RESOURCE_FILE_README ${VTKm_SOURCE_DIR}/README.md)
include(CPack)
vtkm_option(VTKm_ENABLE_CPACK "Enable CPack packaging of VTKm" ON)
if (VTKm_ENABLE_CPACK)
# Enable CPack packaging
set(CPACK_PACKAGE_DESCRIPTION_FILE ${VTKm_SOURCE_DIR}/README.md)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The VTKm Toolkit")
set(CPACK_PACKAGE_NAME "VTKm")
set(CPACK_PACKAGE_VERSION_MAJOR ${VTKm_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VTKm_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VTKm_VERSION_PATCH})
set(CPACK_PACKAGE_FILE_NAME "VTKm-${VTKm_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE ${VTKm_SOURCE_DIR}/LICENSE.txt)
set(CPACK_RESOURCE_FILE_README ${VTKm_SOURCE_DIR}/README.md)
include(CPack)
endif ()
#-----------------------------------------------------------------------------
# Build examples
......
......@@ -436,7 +436,7 @@ authorized developers may add a comment with a single *trailing* line:
Do: merge
to ask that the change be merged into the upstream repository. By
convention, only merge if you have recieved `+1` . Do not request a merge
convention, only merge if you have received `+1` . Do not request a merge
if any `-1` review comments have not been resolved.
### Merge Success ###
......
......@@ -20,7 +20,5 @@
list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
".*warning: ignoring loop annotation.*"
".*diy.include.diy.*WShadow.*" # exclude `diy` shadow warnings.
".*diy.include.diy.*note: shadowed.*" # exclude `diy` shadow warnings.
".*diy.include.diy.storage.hpp.*Wunused-result.*" # this is a TODO in DIY.
".*warning: Included by graph for.*not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES."
)
......@@ -74,6 +74,8 @@ CMake/FindTBB.cmake
CMake/FindGLEW.cmake
Utilities
vtkm/cont/tbb/internal/parallel_sort.h
vtkm/cont/tbb/internal/parallel_radix_sort_tbb.h
vtkm/cont/tbb/internal/kxsort.h
vtkm/testing/OptionParser.h
vtkm/internal/brigand.hpp
version.txt
......
......@@ -61,7 +61,7 @@ VTK-m Requires:
+ GCC 4.8+
+ Clang 3.3+
+ XCode 5.0+
+ MSVC 2013+
+ MSVC 2015+
+ [CMake](http://www.cmake.org/download/)
+ CMake 3.3+ (for any build)
+ CMake 3.9+ (for CUDA build)
......
......@@ -168,8 +168,7 @@ class ExposedClass;
namespace references are preferred).
+ All code must be valid by the C++11 specifications. It must also
compile correctly with Microsoft Visual Studio 2013, which implements a
subset of the C++11 standard.
compile with Microsoft Visual Studio 2015.
+ New code must include regression tests that will run on the dashboards.
Generally a new class will have an associated "UnitTest" that will test
......
......@@ -64,14 +64,14 @@ VTKM_EXEC_CONT vtkm::Vec<T, 3> Normalize(vtkm::Vec<T, 3> v)
return one / magnitude * v;
}
typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter;
using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG;
class TangleField : public vtkm::worklet::WorkletMapField
{
public:
typedef void ControlSignature(FieldIn<IdType> vertexId, FieldOut<Scalar> v);
typedef void ExecutionSignature(_1, _2);
typedef _1 InputDomain;
using InputDomain = _1;
const vtkm::Id xdim, ydim, zdim;
const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax;
......@@ -343,9 +343,9 @@ void RenderRTTest(const vtkm::cont::DataSet& ds, int N)
if (printProgress && i % 10 == 0)
std::cout << " " << i << " of " << N << std::endl;
typedef vtkm::rendering::MapperRayTracer M;
typedef vtkm::rendering::CanvasRayTracer C;
typedef vtkm::rendering::View3D V3;
using M = vtkm::rendering::MapperRayTracer;
using C = vtkm::rendering::CanvasRayTracer;
using V3 = vtkm::rendering::View3D;
//std::cout<<"Render: "<<i<<std::endl;
vtkm::rendering::ColorTable colorTable("thermal");
......@@ -361,9 +361,9 @@ void RenderVolTest(const vtkm::cont::DataSet& ds, int N)
if (printProgress && i % 10 == 0)
std::cout << " " << i << " of " << N << std::endl;
typedef vtkm::rendering::MapperVolume M;
typedef vtkm::rendering::CanvasRayTracer C;
typedef vtkm::rendering::View3D V3;
using M = vtkm::rendering::MapperVolume;
using C = vtkm::rendering::CanvasRayTracer;
using V3 = vtkm::rendering::View3D;
//std::cout<<"Render: "<<i<<std::endl;
vtkm::rendering::ColorTable colorTable("thermal");
......
......@@ -102,4 +102,4 @@ struct LogicalOr
} // namespace vtkm
#endif //vtk_m_BinaryPredicates_h
\ No newline at end of file
#endif //vtk_m_BinaryPredicates_h
......@@ -142,7 +142,7 @@ struct Bounds
/// \b Expand bounds to include other bounds.
///
/// This version of \c Include expands these bounds just enough to include
/// that of another bounds. Esentially it is the union of the two bounds.
/// that of another bounds. Essentially it is the union of the two bounds.
///
VTKM_EXEC_CONT
void Include(const vtkm::Bounds& bounds)
......
......@@ -67,11 +67,7 @@ vtkm_declare_headers(${headers})
#-----------------------------------------------------------------------------
#first add all the components vtkm that are shared between control and exec
if(VTKm_ENABLE_MPI)
# This `if` is temporary and will be removed once `diy` supports building
# without MPI.
add_subdirectory(thirdparty/diy)
endif()
add_subdirectory(thirdparty/diy)
add_subdirectory(testing)
add_subdirectory(internal)
......
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