${PROJECT_SOURCE_DIR}/src/*.g)
string(REPLACE ";" " " source_files_list "${source_files}")
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Debug_tags.tmp
+# Note: {Debug,Trace}_tags.tmp are targets since we always want to generate
+# the temporary tag files in order to check if anything changed.
+add_custom_target(
+ Debug_tags.tmp
COMMAND
${gentmptags_script} ${CMAKE_CURRENT_LIST_DIR} Debug ${source_files_list}
DEPENDS mktags
)
-add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Trace_tags.tmp
+add_custom_target(
+ Trace_tags.tmp
COMMAND
${gentmptags_script} ${CMAKE_CURRENT_LIST_DIR} Trace ${source_files_list}
DEPENDS mktags
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Debug_tags
COMMAND ${gentags_script} Debug
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Debug_tags.tmp
+ DEPENDS Debug_tags.tmp
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Trace_tags
COMMAND ${gentags_script} Trace
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Trace_tags.tmp
+ DEPENDS Trace_tags.tmp
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/kind_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/kind.h
- DEPENDS mkkind kind_template.h
+ DEPENDS mkkind kind_template.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/kind_template.cpp
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/kind.cpp
- DEPENDS mkkind kind_template.cpp kind.h
+ DEPENDS mkkind kind_template.cpp kind.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/type_properties_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/type_properties.h
- DEPENDS mkkind type_properties_template.h
+ DEPENDS mkkind type_properties_template.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/metakind_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/metakind.h
- DEPENDS mkmetakind metakind_template.h
+ DEPENDS mkmetakind metakind_template.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/metakind_template.cpp
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/metakind.cpp
- DEPENDS mkmetakind metakind_template.cpp metakind.h
+ DEPENDS mkmetakind metakind_template.cpp metakind.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/expr_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/expr.h
- DEPENDS mkexpr expr_template.h kind.h
+ DEPENDS mkexpr expr_template.h kind.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/expr_template.cpp
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/expr.cpp
- DEPENDS mkexpr expr_template.cpp expr.h
+ DEPENDS mkexpr expr_template.cpp expr.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/expr_manager_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/expr_manager.h
- DEPENDS mkexpr expr_manager_template.h expr.h
+ DEPENDS mkexpr expr_manager_template.h expr.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/expr_manager_template.cpp
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/expr_manager.cpp
- DEPENDS mkexpr expr_manager_template.cpp expr_manager.h
+ DEPENDS mkexpr expr_manager_template.cpp expr_manager.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/type_checker_template.cpp
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/type_checker.cpp
- DEPENDS mkexpr type_checker_template.cpp
+ DEPENDS mkexpr type_checker_template.cpp ${KINDS_FILES}
)
add_custom_target(gen-expr
${CMAKE_CURRENT_LIST_DIR}/rewriter_tables_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/rewriter_tables.h
- DEPENDS mkrewriter rewriter_tables_template.h
+ DEPENDS mkrewriter rewriter_tables_template.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/theory_traits_template.h
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/theory_traits.h
- DEPENDS mktheorytraits theory_traits_template.h
+ DEPENDS mktheorytraits theory_traits_template.h ${KINDS_FILES}
)
add_custom_command(
${CMAKE_CURRENT_LIST_DIR}/type_enumerator_template.cpp
${KINDS_FILES}
> ${CMAKE_CURRENT_BINARY_DIR}/type_enumerator.cpp
- DEPENDS mktheorytraits type_enumerator_template.cpp
+ DEPENDS mktheorytraits type_enumerator_template.cpp ${KINDS_FILES}
)
add_custom_target(gen-theory