diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-05-27 19:01:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-27 19:01:25 (GMT) |
commit | 1705a1442dfa83d6c442bb45ed0d6e76f135ee5a (patch) | |
tree | 31a4df75d7d45f88f5b2deb4b8ac1ec4e0a9d952 | |
parent | 69c3be6e87cb483ff7c28f93538f243bea2f2fde (diff) | |
parent | 57fe2e8128f33e6b6d09ab340874abbb52cf89d7 (diff) | |
download | Doxygen-1705a1442dfa83d6c442bb45ed0d6e76f135ee5a.zip Doxygen-1705a1442dfa83d6c442bb45ed0d6e76f135ee5a.tar.gz Doxygen-1705a1442dfa83d6c442bb45ed0d6e76f135ee5a.tar.bz2 |
Merge pull request #7794 from wataash/cmake-list-dir
Replace ${CMAKE_SOURCE_DIR}/path/to/current/cmake-lists-txt/dir with ${CMAKE_CURRENT_LIST_DIR}
-rw-r--r-- | src/CMakeLists.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a002ff8..598f73c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,7 +14,7 @@ include_directories( file(MAKE_DIRECTORY ${GENERATED_SRC}) -file(GLOB LANGUAGE_FILES "${CMAKE_SOURCE_DIR}/src/translator_??.h") +file(GLOB LANGUAGE_FILES "${CMAKE_CURRENT_LIST_DIR}/translator_??.h") # instead of increasebuffer.py add_definitions(-DYY_BUF_SIZE=${enlarge_lex_buffers} -DYY_READ_BUF_SIZE=${enlarge_lex_buffers}) @@ -35,8 +35,8 @@ set_source_files_properties(${GENERATED_SRC}/settings.h PROPERTIES GENERATED 1) # 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 + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -maph ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configvalues.h + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/config.xml ${CMAKE_CURRENT_LIST_DIR}/configgen.py OUTPUT ${GENERATED_SRC}/configvalues.h ) set_source_files_properties(${GENERATED_SRC}/configvalues.h PROPERTIES GENERATED 1) @@ -47,16 +47,16 @@ add_custom_target( # configvalues.cpp add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maps ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.cpp - DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -maps ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configvalues.cpp + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/config.xml ${CMAKE_CURRENT_LIST_DIR}/configgen.py OUTPUT ${GENERATED_SRC}/configvalues.cpp ) set_source_files_properties(${GENERATED_SRC}/configvalues.cpp PROPERTIES GENERATED 1) # configoptions.cpp add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -cpp ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configoptions.cpp - DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/configgen.py -cpp ${CMAKE_CURRENT_LIST_DIR}/config.xml > ${GENERATED_SRC}/configoptions.cpp + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/config.xml ${CMAKE_CURRENT_LIST_DIR}/configgen.py OUTPUT ${GENERATED_SRC}/configoptions.cpp ) set_source_files_properties(${GENERATED_SRC}/configoptions.cpp PROPERTIES GENERATED 1) @@ -64,8 +64,8 @@ set_source_files_properties(${GENERATED_SRC}/configoptions.cpp PROPERTIES GENERA # ce_parse.h add_custom_command( - COMMAND ${BISON_EXECUTABLE} -l -d -p ce_parsexpYY ${CMAKE_SOURCE_DIR}/src/constexp.y -o ce_parse.c - DEPENDS ${CMAKE_SOURCE_DIR}/src/constexp.y + COMMAND ${BISON_EXECUTABLE} -l -d -p ce_parsexpYY ${CMAKE_CURRENT_LIST_DIR}/constexp.y -o ce_parse.c + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/constexp.y OUTPUT ${GENERATED_SRC}/ce_parse.h WORKING_DIRECTORY ${GENERATED_SRC} ) @@ -86,7 +86,7 @@ file(GLOB RESOURCES ${CMAKE_SOURCE_DIR}/templates/*/*) # resources.cpp add_custom_command( COMMENT "Generating ${GENERATED_SRC}/resources.cpp" - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/res2cc_cmd.py ${CMAKE_SOURCE_DIR}/templates ${GENERATED_SRC}/resources.cpp + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/res2cc_cmd.py ${CMAKE_SOURCE_DIR}/templates ${GENERATED_SRC}/resources.cpp DEPENDS ${RESOURCES} OUTPUT ${GENERATED_SRC}/resources.cpp ) @@ -94,8 +94,8 @@ set_source_files_properties(${GENERATED_SRC}/resources.cpp PROPERTIES GENERATED # layout_default.xml add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/to_c_cmd.py < ${CMAKE_SOURCE_DIR}/src/layout_default.xml > ${GENERATED_SRC}/layout_default.xml.h - DEPENDS ${CMAKE_SOURCE_DIR}/src/layout_default.xml + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/to_c_cmd.py < ${CMAKE_CURRENT_LIST_DIR}/layout_default.xml > ${GENERATED_SRC}/layout_default.xml.h + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/layout_default.xml OUTPUT ${GENERATED_SRC}/layout_default.xml.h ) set_source_files_properties(${GENERATED_SRC}/layout_default.xml.h PROPERTIES GENERATED 1) @@ -123,8 +123,8 @@ foreach(lex_file ${LEX_FILES}) set(LEX_FILES_H ${LEX_FILES_H} " " ${GENERATED_SRC}/${lex_file}.l.h CACHE INTERNAL "Stores generated files") set(LEX_FILES_CPP ${LEX_FILES_CPP} " " ${GENERATED_SRC}/${lex_file}.cpp CACHE INTERNAL "Stores generated files") add_custom_command( - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/src/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h - DEPENDS ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/src/${lex_file}.l + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/scan_states.py ${CMAKE_CURRENT_LIST_DIR}/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/scan_states.py ${CMAKE_CURRENT_LIST_DIR}/${lex_file}.l OUTPUT ${GENERATED_SRC}/${lex_file}.l.h ) set_source_files_properties(${GENERATED_SRC}/${lex_file}.l.h PROPERTIES GENERATED 1) |