mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Add make dependencies to rebuild CMake when vtkm.module files change
Also improved a diagnostic when bad identifiers are used in vtkm.module files.
This commit is contained in:
parent
f8e5342e14
commit
add7c68d51
@ -219,7 +219,8 @@ function(_vtkm_module_parse_module_file module_file name_var)
|
||||
|
||||
# Check required arguments
|
||||
if(_vtkm_module_UNPARSED_ARGUMENTS)
|
||||
message(FATAL_ERROR "Module file ${module_file} contains unknown options.")
|
||||
message(FATAL_ERROR
|
||||
"Module file ${module_file} contains unknown options: ${_vtkm_module_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
if(NOT _vtkm_module_NAME)
|
||||
message(FATAL_ERROR "Module file ${module_file} does not specify a NAME option.")
|
||||
@ -233,6 +234,10 @@ function(_vtkm_module_parse_module_file module_file name_var)
|
||||
get_filename_component(directory "${module_file}" DIRECTORY)
|
||||
vtkm_module_set_property(${NAME} DIRECTORY "${directory}")
|
||||
|
||||
# Add a build dependency that reruns CMake whenever the vtkm.module file changes.
|
||||
set_property(DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${module_file}")
|
||||
|
||||
set(${name_var} ${NAME} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user