diff --git a/CMakeLists.txt b/CMakeLists.txt index 693220a87..7ccbe1ac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,7 @@ set(SubModules crux routing encrypt - #nfs + nfs vault vault_manager #drive diff --git a/cmake_modules/utils.cmake b/cmake_modules/utils.cmake index 4ad43250a..0ebc9d796 100644 --- a/cmake_modules/utils.cmake +++ b/cmake_modules/utils.cmake @@ -892,51 +892,6 @@ function(ms_get_dependencies Target OptimizedDeps DebugDeps UseImported) endfunction() -# Sets up the custom commands needed by the 'configure_meta_files.cmake' for -# auto-generating Message typedefs and boost::variants of these. -function(ms_set_meta_files_custom_commands OutputFile InputFile MetaFiles OutputFileSourceGroup CMakeFilesSourceGroup) - set(IntermediateDir "${CMAKE_CURRENT_BINARY_DIR}/copied_message_types") - # An apparent bug in CMake means that file(READ...) can only be done from within - # CMAKE_CURRENT_BINARY_DIR. Hence message_types.meta files are copied here to allow - # configure_meta_files.cmake to work. - foreach(MetaFile ${MetaFiles}) - string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" "" RelativeMetaFile "${MetaFile}") - set(IntermediateOutputFile "${IntermediateDir}/${RelativeMetaFile}") - get_filename_component(FilePath "${IntermediateOutputFile}" PATH) - list(APPEND IntermediateOutputFiles "${IntermediateOutputFile}") - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${FilePath}") - add_custom_command(OUTPUT "${IntermediateOutputFile}" - COMMAND ${CMAKE_COMMAND} -E copy_if_different "${MetaFile}" "${IntermediateOutputFile}" - DEPENDS "${MetaFile}" - COMMENT "Copying ${RelativeMetaFile} to ${IntermediateDir}/") - endforeach() - - # Grab the list of files currently in the binary dir and remove any which are no longer required - file(GLOB_RECURSE ExtraMetaFiles "${IntermediateDir}/*.message_types.meta") - list(REMOVE_ITEM ExtraMetaFiles ${IntermediateOutputFiles}) - foreach(ExtraMetaFile ${ExtraMetaFiles}) - execute_process(COMMAND ${CMAKE_COMMAND} -E remove "${ExtraMetaFile}") - message(STATUS "Removed \"${ExtraMetaFile}\"") - endforeach() - - set(ConfigureCMakeFile "${CMAKE_SOURCE_DIR}/cmake_modules/configure_meta_files.cmake") - set(CMAKE_DISABLE_SOURCE_CHANGES OFF) - add_custom_command(OUTPUT ${OutputFile} - COMMAND ${CMAKE_COMMAND} -DOutputFile="${OutputFile}" - -DInputFile="${InputFile}" - -P ${ConfigureCMakeFile} - DEPENDS ${MetaFile} - ${IntermediateOutputFiles} - ${InputFile} - ${ConfigureCMakeFile} - COMMENT "Configuring message_types.h") - set(CMAKE_DISABLE_SOURCE_CHANGES ON) - set_source_files_properties(${OutputFile} PROPERTIES GENERATED TRUE) - source_group("${OutputFileSourceGroup}" FILES ${OutputFile}) - source_group("${CMakeFilesSourceGroup}" FILES ${CMAKE_CURRENT_LIST_FILE} ${InputFile} ${MetaFiles}) -endfunction() - - macro(ms_get_branch_and_commit BranchName CommitName) execute_process(COMMAND "${Git_EXECUTABLE}" rev-parse --sq --abbrev-ref HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}