added dmake targets to CMake (#2634)

This commit is contained in:
Oliver Stöneberg 2020-05-10 16:41:50 +02:00 committed by GitHub
parent 809a769c69
commit e066300f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View File

@ -28,9 +28,10 @@ add_subdirectory(externals/simplecpp)
add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application
add_subdirectory(test) # Tests
ADD_SUBDIRECTORY(gui) # Graphical application
ADD_SUBDIRECTORY(tools/triage) # Triage tool
add_subdirectory(gui) # Graphical application
add_subdirectory(tools/triage) # Triage tool
add_subdirectory(oss-fuzz) # OSS-Fuzz clients
add_subdirectory(tools)
include(cmake/printInfo.cmake)
include(cmake/clang_tidy.cmake)

18
tools/CMakeLists.txt Normal file
View File

@ -0,0 +1,18 @@
if (NOT USE_MATCHCOMPILER_OPT MATCHES "Off")
set(lib_src "${CMAKE_BINARY_DIR}/lib/build/mc_")
else()
set(lib_src "${CMAKE_SOURCE_DIR}/lib/")
endif()
add_executable(dmake EXCLUDE_FROM_ALL
dmake.cpp
${CMAKE_SOURCE_DIR}/cli/filelister.cpp
${lib_src}pathmatch.cpp
${lib_src}path.cpp
${CMAKE_SOURCE_DIR}/externals/simplecpp/simplecpp
)
target_include_directories(dmake PRIVATE ${CMAKE_SOURCE_DIR}/cli ${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/externals/simplecpp)
add_custom_target(run-dmake $<TARGET_FILE:dmake>
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS dmake)