You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
3.1 KiB
68 lines
3.1 KiB
function(errorDetected)
|
|
message("${Red}\n")
|
|
message("#########################################")
|
|
message("#\t@@@@ @@@ @@@ @@ @@@ \t#")
|
|
message("#\t@ @ @ @ @ @ @ @ @ \t#")
|
|
message("#\t@@@ @@@ @@@ @ @ @@@ \t#")
|
|
message("#\t@ @ @ @ @ @ @ @ @ \t#")
|
|
message("#\t@@@@ @ @ @ @ @@ @ @ \t#")
|
|
message("#########################################")
|
|
message("#\tAN ERROR HAS OCCURED\t\t#")
|
|
message("#########################################")
|
|
endfunction()
|
|
|
|
function(errorOut)
|
|
message("#########################################\n\n")
|
|
endfunction()
|
|
|
|
function(errorDirNotFound _searchedDir)
|
|
errorDetected()
|
|
message(" |-->GIVEN DIRECTORY NOT FOUND")
|
|
message(" |-> Given dir : ${DIR}")
|
|
message("!!! Possible Reasons !!!")
|
|
message(" |--> Did you give corect path in ${PROJECT_CONFIG_FILE} ??")
|
|
message(" |-> The declaration for HEADERS should look like :")
|
|
message(" |-> list(APPEND PROJECT_HEADERS_DIR \$\{PROJECT_DIR\}/path_to_header_directory")
|
|
message(" |-> \$\{PROJECT_DIR\} = ${PROJECT_DIR}")
|
|
message(" |-> The declaration for SOURCES should look like :")
|
|
message(" |-> list(APPEND PROJECT_SOURCES_DIR \$\{PROJECT_DIR\}/path_to_source_directory")
|
|
message(" |-> \$\{PROJECT_DIR\} = ${PROJECT_DIR}")
|
|
message("If A Directory has source and header files, it should be declared 2 times accordingly")
|
|
message(" |--> Once as HEADER location")
|
|
message(" |--> Once as SOURCES location")
|
|
message("\nFor more information please refer to : ${CMAKE_SOURCE_DIR}/README.md\n")
|
|
errorOut()
|
|
message(FATAL_ERROR "Directory ${DIR} : NOT FOUND")
|
|
endfunction()
|
|
|
|
function(errorHFileNotFound _directory _alias)
|
|
errorDetected()
|
|
message("The header file <<${_alias}.h>> was not found")
|
|
message(" |--> Given directory is : ${_directory}/${_alias}")
|
|
message(" |--> Given Header file path : ${_directory}/${_alias}/${_alias}.h")
|
|
message("!!! Possible Reasons !!!")
|
|
message(" |--> Did you name the module correctly in ${_directory}/CMakeLists.txt ??")
|
|
message(" |-> The module name should be : ")
|
|
message(" |-> The same as the the folder name")
|
|
message(" |-> The same as the the source name")
|
|
message(" |-> The same as the the header name")
|
|
message("\nFor more information please refer to : ${_directory}/README.md\n")
|
|
errorOut()
|
|
message(FATAL_ERROR "\n NO Header file : <<${_alias}.h>> was found ### COMPILATION ABORTED ###\n")
|
|
endfunction()
|
|
|
|
function(errorHDirNotFound _dir _alias)
|
|
errorDetected()
|
|
message("The file <<${_alias}>> was not found")
|
|
message(" |--> Given directory is : ${_directory}/${_alias}")
|
|
message("!!! Possible Reasons !!!")
|
|
message(" |--> Did you name the module correctly in ${_directory}/CMakeLists.txt ??")
|
|
message(" |-> The module name should be : ")
|
|
message(" |-> The same as the the folder name")
|
|
message(" |-> The same as the the source name")
|
|
message(" |-> The same as the the header name")
|
|
message("\nFor more information please refer to : ${_directory}/README.md\n")
|
|
errorOut()
|
|
message(FATAL_ERROR "\nNO Directory : <<${_directory}/${_alias}>> was found ### COMPILATION ABORTED ###\n")
|
|
endfunction()
|