mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-20 18:48:08 +08:00
build: Display options and turn DOC/EXAMPLE OFF (#661)
- Add `FTXUI_QUIET` to stop displaying FTXUI configuration messages. - Turn `FTXUI_BUILD_DOC` and `FTXUI_BUILD_EXAMPLE` OFF by default - Display the list of options.
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
find_program(CLANG_TIDY_EXE NAMES "clang-tidy" DOC "Path to clang-tidy executable" )
|
||||
if(NOT CLANG_TIDY_EXE)
|
||||
message(STATUS "clang-tidy not found.")
|
||||
else()
|
||||
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
|
||||
endif()
|
||||
|
||||
function(ftxui_set_options library)
|
||||
message(STATUS "ftxui_set_options " ${library})
|
||||
set_target_properties(${library} PROPERTIES VERSION ${PROJECT_VERSION})
|
||||
if (NOT ${library} MATCHES "ftxui-*")
|
||||
set_target_properties(${library} PROPERTIES OUTPUT_NAME "ftxui-${library}")
|
||||
endif()
|
||||
|
||||
if(CLANG_TIDY_EXE AND FTXUI_CLANG_TIDY)
|
||||
if (FTXUI_CLANG_TIDY)
|
||||
if (NOT CLANG_TIDY_EXE)
|
||||
message(FATAL_ERROR "clang-tidy requested but executable not found")
|
||||
endif()
|
||||
|
||||
set_target_properties(${library}
|
||||
PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-warnings-as-errors=*"
|
||||
)
|
||||
|
Reference in New Issue
Block a user