mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
				synced 2025-11-04 04:27:48 +00:00 
			
		
		
		
	Set CMAKE_CXX_FLAGS only when not set
This commit is contained in:
		
				
					committed by
					
						
						Alexander Damian
					
				
			
			
				
	
			
			
			
						parent
						
							a17a6f3b55
						
					
				
				
					commit
					470a5b6857
				
			@@ -7,17 +7,20 @@ set(CPPKAFKA_VERSION_MINOR 2)
 | 
				
			|||||||
set(CPPKAFKA_VERSION "${CPPKAFKA_VERSION_MAJOR}.${CPPKAFKA_VERSION_MINOR}")
 | 
					set(CPPKAFKA_VERSION "${CPPKAFKA_VERSION_MAJOR}.${CPPKAFKA_VERSION_MINOR}")
 | 
				
			||||||
set(RDKAFKA_MIN_VERSION 0x00090400)
 | 
					set(RDKAFKA_MIN_VERSION 0x00090400)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(MSVC)
 | 
					if (NOT CMAKE_CXX_FLAGS)
 | 
				
			||||||
    # Don't always use Wall, since VC's /Wall is ridiculously verbose.
 | 
					    # Set default compile flags for the project
 | 
				
			||||||
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
 | 
					    if(MSVC)
 | 
				
			||||||
 | 
					        # Don't always use Wall, since VC's /Wall is ridiculously verbose.
 | 
				
			||||||
 | 
					        set(CMAKE_CXX_FLAGS "/W3")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Disable VC secure checks, since these are not really issues
 | 
					        # Disable VC secure checks, since these are not really issues
 | 
				
			||||||
    add_definitions("-D_CRT_SECURE_NO_WARNINGS=1")
 | 
					        add_definitions("-D_CRT_SECURE_NO_WARNINGS=1")
 | 
				
			||||||
    add_definitions("-D_SCL_SECURE_NO_WARNINGS=1")
 | 
					        add_definitions("-D_SCL_SECURE_NO_WARNINGS=1")
 | 
				
			||||||
    add_definitions("-DNOGDI=1")
 | 
					        add_definitions("-DNOGDI=1")
 | 
				
			||||||
    add_definitions("-DNOMINMAX=1")
 | 
					        add_definitions("-DNOMINMAX=1")
 | 
				
			||||||
else()
 | 
					    else()
 | 
				
			||||||
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
 | 
					        set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")
 | 
				
			||||||
 | 
					    endif()
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
 | 
					set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user