Files
kucherenko__jscpd/fixtures/cmake/file1.cmake
apk 64e471e2b0 test: raise coverage to 96%+ on @jscpd/finder and 98%+ on apps/jscpd
Adds 92 new tests (178 → 270 total) with zero source-file modifications:

- packages/finder: 13 new test files covering all reporters, subscribers,
  validators, hooks, utils, options, cloneFound, getFilesToDetect, and
  InFilesDetector; shared buildClone() factory helper
- apps/jscpd: 3 new test files (options-unit, print, store) plus extensions
  to formats, modes, and options integration tests
- vitest.config.ts added to both packages to restrict coverage.include
  to src/** only, eliminating bin/ and prism.js noise
- Fixes 3 tokenizer bugs (trailing space in format lookup, tokenization
  edge cases) uncovered by the new format fixture suite
- Adds fixture files for 40+ language formats to support formats.test.ts
2026-05-09 15:00:38 +02:00

27 lines
809 B
CMake

cmake_minimum_required(VERSION 3.16)
project(MyProject VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
function(add_common_flags target)
target_compile_options(${target} PRIVATE
-Wall -Wextra -Wpedantic -Werror
$<$<CONFIG:Debug>:-g -O0>
$<$<CONFIG:Release>:-O3>
)
target_include_directories(${target} PRIVATE ${CMAKE_SOURCE_DIR}/include)
endfunction()
function(configure_tests target)
enable_testing()
add_test(NAME ${target}_tests COMMAND ${target})
set_tests_properties(${target}_tests PROPERTIES TIMEOUT 60)
endfunction()
# App-specific: add executable
add_executable(myapp src/main.cpp src/app.cpp)
add_common_flags(myapp)
target_link_libraries(myapp PRIVATE pthread dl)