Commit 7237c468 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h

Previously we just took the optionparser.h file and stuck it right in
our source code. That was problematic for a variety of reasons.

1. It incorrectly assigned our license to external code.
2. It made lots of unnecessary changes to the original source (like
reformatting).
3. It made it near impossible to track patches we make and updates to
the original software.

Instead, use the third-party system to track changes to optionparser.h
in a different repository and then pull that into ours.
parent 184fe792
# Wrap third party optionparser.h in vtkm/cont/internal/OptionParser.h
Previously we just took the optionparser.h file and stuck it right in
our source code. That was problematic for a variety of reasons.
1. It incorrectly assigned our license to external code.
2. It made lots of unnecessary changes to the original source (like
reformatting).
3. It made it near impossible to track patches we make and updates to
the original software.
Instead, use the third-party system to track changes to optionparser.h
in a different repository and then pull that into ours.
......@@ -81,6 +81,7 @@ vtkm_declare_headers(
#-----------------------------------------------------------------------------
#first add all the components vtkm that are shared between control and exec
add_subdirectory(thirdparty/diy)
add_subdirectory(thirdparty/optionparser)
add_subdirectory(thirdparty/taotuple)
if(VTKm_ENABLE_LOGGING)
add_subdirectory(thirdparty/loguru)
......
......@@ -205,9 +205,10 @@ if (VTKm_ENABLE_LOGGING)
list(APPEND DL_LIBS ${CMAKE_DL_LIBS} Threads::Threads) # dladdr function
endif()
target_link_libraries(vtkm_cont PUBLIC vtkm_compiler_flags ${backends} ${DL_LIBS})
target_link_libraries(vtkm_cont PUBLIC vtkm_taotuple vtkm_optionparser)
if(TARGET vtkm_diy)
# This will become a required dependency eventually.
target_link_libraries(vtkm_cont PUBLIC vtkm_diy vtkm_taotuple)
target_link_libraries(vtkm_cont PUBLIC vtkm_diy)
endif()
#-----------------------------------------------------------------------------
......
This diff is collapsed.
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
## Copyright 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
## Copyright 2019 UT-Battelle, LLC.
## Copyright 2019 Los Alamos National Security.
##
## Under the terms of Contract DE-NA0003525 with NTESS,
## the U.S. Government retains certain rights in this software.
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
## Laboratory (LANL), the U.S. Government retains certain rights in
## this software.
##
##=============================================================================
add_library(vtkm_optionparser INTERFACE)
vtkm_get_kit_name(kit_name kit_dir)
target_include_directories(vtkm_optionparser INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${VTKm_INSTALL_INCLUDE_DIR}/vtkm/thirdparty/optionparser>)
install(TARGETS vtkm_optionparser
EXPORT ${VTKm_EXPORT_NAME})
## Install headers
if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
install(DIRECTORY vtkmoptionparser
DESTINATION ${VTKm_INSTALL_INCLUDE_DIR}/${kit_dir}/)
endif()
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