mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 07:04:39 +00:00
Add a minimal binary to generate compile_commands.json file
clang-tidy needs compile_commands.json to generate a set of source files to parse. tidy-base is not built but is used as a source file in which included headers can be parsed. Without this process, clang-tidy will process many other source files (e.g. doctest.hpp) that we do not want to worry about. Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This commit is contained in:
parent
4cacdc4b30
commit
18a229e849
@ -57,3 +57,10 @@ set_property(TARGET ARGPARSE PROPERTY CXX_STANDARD 17)
|
||||
|
||||
# Set ${PROJECT_NAME} as the startup project
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ARGPARSE)
|
||||
|
||||
file(GLOB ARGPARSE_LINT_SOURCES
|
||||
tidy-base.cpp
|
||||
)
|
||||
ADD_EXECUTABLE(ARGPARSE_LINT ${ARGPARSE_LINT_SOURCES})
|
||||
set_target_properties(ARGPARSE_LINT PROPERTIES OUTPUT_NAME tidy-base)
|
||||
set_property(TARGET ARGPARSE_LINT PROPERTY CXX_STANDARD 17)
|
||||
|
4
test/tidy-base.cpp
Normal file
4
test/tidy-base.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
#include "argparse/argparse.hpp"
|
||||
|
||||
int main(int argc, const char* argv[]) {}
|
Loading…
Reference in New Issue
Block a user