From 058e1a54ee5e8bd8a60c85af5ff1df68d87da3da Mon Sep 17 00:00:00 2001 From: Ton van den Heuvel Date: Mon, 6 May 2019 15:17:28 +0200 Subject: Fix #6906 Generate configvalues.h only as a dependency for the VHDL parser. Fixes a problem in combination with Ninja v1.9.0 because of duplicate rules for generating configvalues.h. --- addon/doxyapp/CMakeLists.txt | 8 -------- addon/doxyparse/CMakeLists.txt | 8 -------- src/CMakeLists.txt | 4 ++++ vhdlparser/CMakeLists.txt | 12 +++--------- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt index a737711..0aaf465 100644 --- a/addon/doxyapp/CMakeLists.txt +++ b/addon/doxyapp/CMakeLists.txt @@ -1,11 +1,3 @@ -# configvalues.h -add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h - DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py - OUTPUT ${GENERATED_SRC}/configvalues.h -) -set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) - find_package(Iconv) include_directories( diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt index ff198fb..1620c72 100644 --- a/addon/doxyparse/CMakeLists.txt +++ b/addon/doxyparse/CMakeLists.txt @@ -1,11 +1,3 @@ -# configvalues.h -add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h - DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py - OUTPUT ${GENERATED_SRC}/configvalues.h -) -set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) - find_package(Iconv) include_directories( diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 92a302a..37a21ff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,6 +43,10 @@ add_custom_command( OUTPUT ${GENERATED_SRC}/configvalues.h ) set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) +add_custom_target( + generate_configvalues_header + DEPENDS ${GENERATED_SRC}/configvalues.h +) # configvalues.cpp add_custom_command( diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt index 71e97df..f89008c 100644 --- a/vhdlparser/CMakeLists.txt +++ b/vhdlparser/CMakeLists.txt @@ -1,14 +1,5 @@ -# configvalues.h -add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h - DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py - OUTPUT ${GENERATED_SRC}/configvalues.h -) -set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) - include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/qtools ${GENERATED_SRC}) add_library(vhdlparser STATIC -${GENERATED_SRC}/configvalues.h CharStream.cc ParseException.cc Token.cc @@ -17,3 +8,6 @@ VhdlParser.cc VhdlParserTokenManager.cc VhdlParserIF.cpp ) +add_dependencies(vhdlparser + generate_configvalues_header +) -- cgit v0.12