From e066300f95aaf13f43fcf8c79bd2af2ffee13849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Sun, 10 May 2020 16:41:50 +0200 Subject: [PATCH] added dmake targets to CMake (#2634) --- CMakeLists.txt | 5 +++-- tools/CMakeLists.txt | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tools/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index d7e1002af..4e52b612f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 000000000..297e37915 --- /dev/null +++ b/tools/CMakeLists.txt @@ -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 $ + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + DEPENDS dmake) \ No newline at end of file