compile_commands.json
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
cmake-build-debug/
|
||||
build/
|
||||
.cache/
|
||||
.idea
|
||||
|
||||
roms/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(GameBoy++)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
include_directories(${SDL2_INCLUDE_DIRS})
|
||||
@@ -18,4 +19,14 @@ add_executable(GameBoy++ src/main.cpp
|
||||
src/testing.hpp
|
||||
src/joypad.cpp
|
||||
)
|
||||
target_link_libraries(GameBoy++ ${SDL2_LIBRARIES})
|
||||
target_link_libraries(GameBoy++ ${SDL2_LIBRARIES})
|
||||
|
||||
if(CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||
add_custom_target(copy_compile_commands ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_BINARY_DIR}/compile_commands.json
|
||||
${CMAKE_SOURCE_DIR}/compile_commands.json
|
||||
DEPENDS ${CMAKE_BINARY_DIR}/compile_commands.json
|
||||
COMMENT "Copying compile_commands.json to project root")
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user