forked from OSchip/llvm-project
				
			build: fix erroneous overwriting of flags
Always use list(APPEND) as it will perform the desired action even if the list is empty or previously unset. The first set is harmless, however, the subsequent set was overwriting the previous flag setup resulting in an improper compilation command being generated. This manifested as a build failure on Linux when using cmake + ninja. llvm-svn: 203638
This commit is contained in:
		
							parent
							
								
									496b68bd5b
								
							
						
					
					
						commit
						03e6dbbc05
					
				| 
						 | 
				
			
			@ -180,7 +180,7 @@ if (MSVC)
 | 
			
		|||
  # headers.
 | 
			
		||||
else()
 | 
			
		||||
  if (LIBCXX_HAS_NOSTDINCXX_FLAG)
 | 
			
		||||
    set(LIBCXX_CXX_REQUIRED_FLAGS -nostdinc++)
 | 
			
		||||
    list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -nostdinc++)
 | 
			
		||||
  endif()
 | 
			
		||||
  if (LIBCXX_ENABLE_CXX0X AND LIBCXX_HAS_STDCXX0X_FLAG)
 | 
			
		||||
    list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -std=c++0x)
 | 
			
		||||
| 
						 | 
				
			
			@ -196,7 +196,7 @@ endmacro()
 | 
			
		|||
# Get warning flags
 | 
			
		||||
if (NOT MSVC)
 | 
			
		||||
  append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_WALL_FLAG -Wall)
 | 
			
		||||
  set(LIBCXX_CXX_REQUIRED_FLAGS -Werror=return-type)
 | 
			
		||||
  list(APPEND LIBCXX_CXX_REQUIRED_FLAGS -Werror=return-type)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
append_if(LIBCXX_CXX_WARNING_FLAGS LIBCXX_HAS_W_FLAG -W)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue