Differentiate between header files with different extensions
If you tried to create test builds of a header.h and header.hxx, you would get an error about building two files with the same name (tried to build header.cxx for both of them). Fixed this by adding the original extension name to the source file name.
This commit is contained in:
parent
9571c9b54f
commit
289a4bc1aa
@ -106,7 +106,9 @@ function(vtkm_add_header_build_test name dir_prefix use_cuda)
|
||||
get_source_file_property(cant_be_tested ${header} VTKm_CANT_BE_HEADER_TESTED)
|
||||
if( NOT cant_be_tested )
|
||||
get_filename_component(headername ${header} NAME_WE)
|
||||
set(src ${CMAKE_CURRENT_BINARY_DIR}/TB_${headername}.${ext})
|
||||
get_filename_component(headerextension ${header} EXT)
|
||||
string(SUBSTRING ${headerextension} 1 -1 headerextension)
|
||||
set(src ${CMAKE_CURRENT_BINARY_DIR}/TB_${headername}_${headerextension}.${ext})
|
||||
|
||||
#By using file generate we will not trigger CMake execution when
|
||||
#a header gets touched
|
||||
|
Loading…
Reference in New Issue
Block a user