Skip to content
Permalink
Browse files

Move compiled data resources into subfolders

  • Loading branch information
milot-mirdita committed Jan 8, 2020
1 parent 2fd9f25 commit fd90ff2c339ed78c866dbfd48831544e2b0db76f
@@ -34,14 +34,16 @@ endif()

function(compile_resource INPUT_FILE OUTPUT_FILE)
get_filename_component(INPUT_FILE_NAME ${PROJECT_SOURCE_DIR}/data/${INPUT_FILE} NAME)
set(OUTPUT_FILE ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h PARENT_SCOPE)
add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h
COMMAND ${compile_resource__internal_dir}/checkshell.sh ${SHELLCHECK_EXECUTABLE} ${INPUT_FILE}
get_filename_component(INPUT_FILE_DIRECTORY ${PROJECT_SOURCE_DIR}/data/${INPUT_FILE} DIRECTORY)
set(OUTPUT_FILE ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h)
set(OUTPUT_FILE ${OUTPUT_FILE} PARENT_SCOPE)
add_custom_command(OUTPUT ${OUTPUT_FILE}
COMMAND ${compile_resource__internal_dir}/checkshell.sh ${SHELLCHECK_EXECUTABLE} ${INPUT_FILE_NAME}
COMMAND mkdir -p ${PROJECT_BINARY_DIR}/generated
COMMAND ${XXD_EXECUTABLE} ${XXD_PARAMS} ${INPUT_FILE} > ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h
COMMAND ${SED_EXECUTABLE} 's!unsigned char!static const unsigned char!' < ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h > ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h.tmp
COMMAND mv -f ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h.tmp ${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/data/
COMMAND ${XXD_EXECUTABLE} ${XXD_PARAMS} ${INPUT_FILE_NAME} > ${OUTPUT_FILE}
COMMAND ${SED_EXECUTABLE} 's!unsigned char!static const unsigned char!' < ${OUTPUT_FILE} > ${OUTPUT_FILE}.tmp
COMMAND mv -f ${OUTPUT_FILE}.tmp ${OUTPUT_FILE}
WORKING_DIRECTORY ${INPUT_FILE_DIRECTORY}
DEPENDS ${PROJECT_SOURCE_DIR}/data/${INPUT_FILE})
set_source_files_properties(${PROJECT_BINARY_DIR}/generated/${INPUT_FILE_NAME}.h PROPERTIES GENERATED TRUE)
set_source_files_properties(${OUTPUT_FILE} PROPERTIES GENERATED TRUE)
endfunction()
@@ -1,46 +1,18 @@
include(MMseqsResourceCompiler)

set(COMPILED_RESOURCES
easysearch.sh
easycluster.sh
easytaxonomy.sh
blastp.sh
blastpgp.sh
map.sh
rbh.sh
linclust.sh
clustering.sh
cascaded_clustering.sh
update_clustering.sh
searchtargetprofile.sh
createindex.sh
createtaxdb.sh
translated_search.sh
taxonomy.sh
multihitdb.sh
multihitsearch.sh
enrich.sh
blastn.sh

add_subdirectory(resources)
add_subdirectory(workflow)
set(GENERATED_MATRICES
VTML80.out
VTML40.out
nucleotide.out
blosum62.out
PAM30.out
CovSeqidQscPercMinDiag.lib
CovSeqidQscPercMinDiagTargetCov.lib
ExpOpt3_8_polished.cs32.lib
Library255_may17.lib
libPure_blosum62_255.lib
libPure_blosum62_32.lib
libPolished_8.lib
searchslicedtargetprofile.sh
cs219.lib
linsearch.sh
krona_prelude.html
)

set(GENERATED_OUTPUT_HEADERS "")
FOREACH(INPUT_FILE ${COMPILED_RESOURCES})
FOREACH(INPUT_FILE ${GENERATED_MATRICES} ${GENERATED_RESOURCES} ${GENERATED_WORKFLOWS})
compile_resource(${INPUT_FILE} OUTPUT_FILE)
list(APPEND GENERATED_OUTPUT_HEADERS "${OUTPUT_FILE}")
ENDFOREACH()
@@ -0,0 +1,11 @@
set(GENERATED_RESOURCES
resources/CovSeqidQscPercMinDiag.lib
resources/CovSeqidQscPercMinDiagTargetCov.lib
resources/ExpOpt3_8_polished.cs32.lib
resources/Library255_may17.lib
resources/libPolished_8.lib
resources/cs219.lib
resources/krona_prelude.html

PARENT_SCOPE
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,26 @@
set(GENERATED_WORKFLOWS
workflow/easysearch.sh
workflow/easycluster.sh
workflow/easytaxonomy.sh
workflow/blastp.sh
workflow/blastpgp.sh
workflow/map.sh
workflow/rbh.sh
workflow/linclust.sh
workflow/clustering.sh
workflow/cascaded_clustering.sh
workflow/update_clustering.sh
workflow/searchtargetprofile.sh
workflow/createindex.sh
workflow/createtaxdb.sh
workflow/translated_search.sh
workflow/taxonomy.sh
workflow/multihitdb.sh
workflow/multihitsearch.sh
workflow/enrich.sh
workflow/blastn.sh
workflow/searchslicedtargetprofile.sh
workflow/linsearch.sh

PARENT_SCOPE
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fd90ff2

Please sign in to comment.
You can’t perform that action at this time.