Intensive refactor of DRAMSys project structure and CMakeFiles
This commit is contained in:
13
cmake/build_source_group.cmake
Normal file
13
cmake/build_source_group.cmake
Normal 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()
|
||||
32
cmake/diagnostics_print.cmake
Normal file
32
cmake/diagnostics_print.cmake
Normal 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()
|
||||
Reference in New Issue
Block a user