summaryrefslogtreecommitdiff
path: root/src/base/CMakeLists.txt
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-09-24 18:42:32 -0700
committerAndres Noetzli <andres.noetzli@gmail.com>2018-09-24 18:42:32 -0700
commit86ec94126885dc0756abe2e00ecbe71288c13410 (patch)
tree7b9570be61ca539e9cfc03836d94710b6eb1d93b /src/base/CMakeLists.txt
parent75d509498c42f9433a778299cf27b6f915c7fd34 (diff)
cmake: Fix dependencies for code generation. (#2524)
Diffstat (limited to 'src/base/CMakeLists.txt')
-rw-r--r--src/base/CMakeLists.txt14
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(
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback