mirror of
				https://github.com/ArthurSonzogni/FTXUI.git
				synced 2025-10-31 10:38:09 +08:00 
			
		
		
		
	Set includes as system interface to suppress warnings for other users (#415)
Set includes as system interface to suppress warnings for other users Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
		 Vebjørn Johansen Rognli
					Vebjørn Johansen Rognli
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							0a522488a7
						
					
				
				
					commit
					bb3231695f
				
			| @@ -13,14 +13,31 @@ function(ftxui_set_options library) | |||||||
|     set_target_properties(${library} |     set_target_properties(${library} | ||||||
|       PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-warnings-as-errors=*" |       PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-warnings-as-errors=*" | ||||||
|     ) |     ) | ||||||
|  |  | ||||||
|  |     # By using "PUBLIC" as opposed to "SYSTEM INTERFACE", the compiler warning | ||||||
|  |     # are enforced on the headers. This is behind "FTXUI_CLANG_TIDY", so that it | ||||||
|  |     # applies only when developing FTXUI and on the CI. User's of the library | ||||||
|  |     # get only the SYSTEM INTERFACE instead. | ||||||
|  |     target_include_directories(${library} | ||||||
|  |       PUBLIC | ||||||
|  |         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||||||
|  |     ) | ||||||
|  |   else() | ||||||
|  |     target_include_directories(${library} SYSTEM | ||||||
|  |       INTERFACE | ||||||
|  |         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||||||
|  |     ) | ||||||
|   endif() |   endif() | ||||||
|  |  | ||||||
|   target_include_directories(${library} |   target_include_directories(${library} SYSTEM | ||||||
|     PUBLIC |     INTERFACE | ||||||
|       $<INSTALL_INTERFACE:include> |       $<INSTALL_INTERFACE:include> | ||||||
|       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |   ) | ||||||
|  |  | ||||||
|  |   target_include_directories(${library} | ||||||
|     PRIVATE |     PRIVATE | ||||||
|       src |       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> | ||||||
|  |       $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||||||
|   ) |   ) | ||||||
|  |  | ||||||
|   # C++17 is used. We require fold expression at least. |   # C++17 is used. We require fold expression at least. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user