mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-11-01 02:58:12 +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:
		
							
								
								
									
										17
									
								
								cmake/ftxui_message.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								cmake/ftxui_message.cmake
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| function(ftxui_message msg) | ||||
|   if (NOT FTXUI_QUIET) | ||||
|     message(STATUS "${msg}") | ||||
|   endif() | ||||
| endfunction() | ||||
|  | ||||
| ftxui_message("┌─ FTXUI options ─────────────────────") | ||||
| ftxui_message("│ FTXUI_ENABLE_INSTALL     : ${FTXUI_ENABLE_INSTALL}") | ||||
| ftxui_message("│ FTXUI_BUILD_EXAMPLES     : ${FTXUI_BUILD_EXAMPLES}") | ||||
| ftxui_message("│ FTXUI_QUIET              : ${FTXUI_QUIET}") | ||||
| ftxui_message("│ FTXUI_BUILD_DOCS         : ${FTXUI_BUILD_DOCS}") | ||||
| ftxui_message("│ FTXUI_BUILD_TESTS        : ${FTXUI_BUILD_TESTS}") | ||||
| ftxui_message("│ FTXUI_BUILD_TESTS_FUZZER : ${FTXUI_BUILD_TESTS_FUZZER}") | ||||
| ftxui_message("│ FTXUI_ENABLE_COVERAGE    : ${FTXUI_ENABLE_COVERAGE}") | ||||
| ftxui_message("│ FTXUI_DEV_WARNINGS       : ${FTXUI_DEV_WARNINGS}") | ||||
| ftxui_message("│ FTXUI_CLANG_TIDY         : ${FTXUI_CLANG_TIDY}") | ||||
| ftxui_message("└─────────────────────────────────────") | ||||
| @@ -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
	 Arthur Sonzogni
					Arthur Sonzogni