Skip to content

Commit

Permalink
cmake compile commands
Browse files Browse the repository at this point in the history
  • Loading branch information
c3rb3ru5d3d53c committed Nov 24, 2023
1 parent edc2157 commit 68857dd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ test/**
.DS_Store
.AppleDouble
.LSOverride
.cache
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ project(binlex
DESCRIPTION "A Binary Genetic Traits Lexer and C++ Library"
)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
endif()
Expand Down
7 changes: 7 additions & 0 deletions deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.5)

project(deps)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

include(ExternalProject)

if(MSVC)
Expand All @@ -21,6 +25,7 @@ ExternalProject_Add(
GIT_TAG "${CAPSTONE_GIT_TAG}"
GIT_SHALLOW ON
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCAPSTONE_BUILD_SHARED=OFF
-DCAPSTONE_BUILD_TESTS=OFF
-DCAPSTONE_MIPS_SUPPORT=OFF
Expand Down Expand Up @@ -57,6 +62,7 @@ set(TLSH_INCLUDE_DIRS "${TLSH_ROOT}/src/tlsh/include")
set(TLSH_GIT_TAG "24d5c0b7fa2ed4d77d9c5dd0c7e1cbf4cd31b42f")

set(TLSH_CMAKE_ARGS
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
Expand Down Expand Up @@ -84,6 +90,7 @@ set(LIEF_GIT_URL "https://github.com/lief-project/LIEF.git")
set(LIEF_VERSION "0.12.2")

set(LIEF_CMAKE_ARGS
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=Release
-DLIEF_DOC=off
Expand Down

0 comments on commit 68857dd

Please sign in to comment.