Intensive refactor of DRAMSys project structure and CMakeFiles

This commit is contained in:
Thomas Psota
2022-12-08 15:05:23 +01:00
parent 2d8a5f66e4
commit b63c9beb50
709 changed files with 26751 additions and 1240 deletions

View File

@@ -0,0 +1,13 @@
###############################################
### build_source_group ###
###############################################
###
### Builds a source group from a set of files
### for nicer display in IDEs
###
function( build_source_group )
file(GLOB_RECURSE files ${CMAKE_CURRENT_SOURCE_DIR}/*.* )
list(REMOVE_ITEM files "CMakeLists.txt")
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "[src]" FILES ${files})
endfunction()

View File

@@ -0,0 +1,32 @@
###############################################
### diagnostics_print ###
###############################################
###
### Prints different diagnostics and infos
### about the specified target
###
function( diagnostics_print target_name )
message(STATUS "${target_name} settings:")
message(STATUS "==============\n")
message(STATUS "Source Files:")
get_target_property(SOURCE_FILES ${target_name} SOURCES)
if(SOURCE_FILES)
message(STATUS "${SOURCE_FILES}")
endif()
message(STATUS "\nInclude Directories:")
get_target_property(HEADER_DIR ${target_name} INCLUDE_DIRECTORIES)
if(HEADER_DIR)
message(STATUS "${HEADER_DIR}")
endif()
message(STATUS "\nLink Libraries:")
get_target_property(LINKED_LIBS ${target_name} LINK_LIBRARIES)
if(LINKED_LIBS)
message(STATUS "${LINKED_LIBS}")
endif()
message(STATUS "\n")
endfunction()