Commit ee61c67e authored by Bednárek David RNDr. Ph.D.'s avatar Bednárek David RNDr. Ph.D.
Browse files

Prefixed targets for mass processing

parent ec84e846
......@@ -73,15 +73,15 @@ endfunction()
function(MAKE_TARGET TARGET_MACRO_SUFFIX TARGET)
set("TARGET_${TARGET_MACRO_SUFFIX}" ${TARGET} PARENT_SCOPE)
CREATE_TARGET(${TARGET})
add_dependencies(${TARGET} "solution")
target_link_libraries(${TARGET} PUBLIC "solution")
add_dependencies(${TARGET} "${SOL_PREFIX}solution")
target_link_libraries(${TARGET} PUBLIC "${SOL_PREFIX}solution")
endfunction()
function(MAKE_TARGET_DUMP TARGET_MACRO_SUFFIX TARGET)
set("TARGET_${TARGET_MACRO_SUFFIX}" ${TARGET} PARENT_SCOPE)
CREATE_TARGET(${TARGET})
add_dependencies(${TARGET} "solution_dump")
target_link_libraries(${TARGET} PUBLIC "solution_dump")
add_dependencies(${TARGET} "${SOL_PREFIX}solution_dump")
target_link_libraries(${TARGET} PUBLIC "${SOL_PREFIX}solution_dump")
endfunction()
function(DEFINE_FLEX_SOURCE TARGET LEXFNAME LEXCPP YHPP)
......
MAKE_TARGET_DUMP("A1" "cecko1")
MAKE_TARGET("A2" "cecko2")
MAKE_TARGET("A3" "cecko3")
MAKE_TARGET("A4" "cecko4")
MAKE_TARGET("A5" "cecko5")
MAKE_TARGET_DUMP("A1" "${SOL_PREFIX}cecko1")
MAKE_TARGET("A2" "${SOL_PREFIX}cecko2")
MAKE_TARGET("A3" "${SOL_PREFIX}cecko3")
MAKE_TARGET("A4" "${SOL_PREFIX}cecko4")
MAKE_TARGET("A5" "${SOL_PREFIX}cecko5")
target_sources(${TARGET_A1} PUBLIC "cecko1.cpp")
target_sources(${TARGET_A2} PUBLIC "cecko2.cpp")
......
# CMakeList.txt
#
SOLUTION_LIBRARY("solution" "framework")
SOLUTION_LIBRARY("${SOL_PREFIX}solution" "framework")
SOLUTION_LIBRARY("solution_dump" "framework_dump")
SOLUTION_LIBRARY("${SOL_PREFIX}solution_dump" "framework_dump")
target_include_directories("solution" PUBLIC ".")
target_include_directories("${SOL_PREFIX}solution" PUBLIC ".")
target_include_directories("solution_dump" PUBLIC ".")
target_include_directories("${SOL_PREFIX}solution_dump" PUBLIC ".")
FLEX_BISON_SOURCE("solution" "calexer.lex" "caparser.y" "calexer.cpp" "caparser.cpp" "caparser.hpp")
FLEX_BISON_SOURCE("${SOL_PREFIX}solution" "calexer.lex" "caparser.y" "calexer.cpp" "caparser.cpp" "caparser.hpp")
FLEX_SOURCE("solution_dump" "calexer.lex" "calexer_dump.cpp" "ckdumper.hpp")
FLEX_SOURCE("${SOL_PREFIX}solution_dump" "calexer.lex" "calexer_dump.cpp" "ckdumper.hpp")
target_sources("solution" PUBLIC "casem.hpp" "casem.cpp")
target_sources("${SOL_PREFIX}solution" PUBLIC "casem.hpp" "casem.cpp")
target_sources("solution_dump" PUBLIC "casem.hpp" "casem.cpp")
target_sources("${SOL_PREFIX}solution_dump" PUBLIC "casem.hpp" "casem.cpp")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment