compile_commands.json should be generated for the whole project (#4503)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-01-18 16:15:40 +01:00
committed by GitHub
parent 0fec9135ec
commit e00964176d
2 changed files with 9 additions and 9 deletions
-5
View File
@@ -17,12 +17,10 @@ project (jerry-main C)
# Optional build settings
set(ENABLE_LINK_MAP OFF CACHE BOOL "Enable generating a link map file?")
set(ENABLE_COMPILE_COMMANDS ON CACHE BOOL "Enable generating compile_commands.json?")
set(JERRY_TEST_STACK_MEASURE OFF CACHE BOOL "Enable stack measurement for the jerry-test binary?")
# Status messages
message(STATUS "ENABLE_LINK_MAP " ${ENABLE_LINK_MAP})
message(STATUS "ENABLE_COMPILE_COMMANDS " ${ENABLE_COMPILE_COMMANDS})
message(STATUS "JERRY_TEST_STACK_MEASURE " ${JERRY_TEST_STACK_MEASURE})
# Generate map file
@@ -34,9 +32,6 @@ if(ENABLE_LINK_MAP)
endif()
endif()
# Generate compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ${ENABLE_COMPILE_COMMANDS})
# Get version information from git
if(IS_DIRECTORY "${CMAKE_SOURCE_DIR}/.git")
execute_process(COMMAND git rev-parse --short HEAD