diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-24 18:42:32 -0700 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2018-09-24 18:42:32 -0700 |
commit | 86ec94126885dc0756abe2e00ecbe71288c13410 (patch) | |
tree | 7b9570be61ca539e9cfc03836d94710b6eb1d93b /src/base | |
parent | 75d509498c42f9433a778299cf27b6f915c7fd34 (diff) |
cmake: Fix dependencies for code generation. (#2524)
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 0b0da4eee..94ef98126 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -73,15 +73,17 @@ file(GLOB_RECURSE source_files ${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 @@ -90,13 +92,13 @@ add_custom_command( 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( |