parent 4f12908f4323519da9489a5a651c9e59b45d7fa9
author Omar Sherif Fathy <44799922+o-micron@users.noreply.github.com> 1583297339 +0200 committer o-micron <omarsheriffathy@hotmail.com> 1583825631 +0200 add CMAKE_CXX_STANDARD to CMakeLists.txt this fixes errors related to enabling C++11 like `no member named 'make_tuple' in namespace 'std'` and like `deleted function definitions are a C++11 extension` in googletest/googletest/include/gtest/internal/gtest-port.h Remove extra msvc settings from cmakelists for now
This commit is contained in:
		
							parent
							
								
									4f12908f43
								
							
						
					
					
						commit
						ae90f96c96
					
				@ -11,18 +11,13 @@ project(googletest-distribution)
 | 
			
		||||
set(GOOGLETEST_VERSION 1.10.0)
 | 
			
		||||
 | 
			
		||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.1")
 | 
			
		||||
    set(CMAKE_CXX_STANDARD 11)
 | 
			
		||||
    set(CMAKE_CXX_STANDARD_REQUIRED OFF)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
if(WIN32)
 | 
			
		||||
  if(MSVC)
 | 
			
		||||
    if(MSVC_TOOLSET_VERSION EQUAL 140 OR MSVC_TOOLSET_VERSION EQUAL 141)
 | 
			
		||||
      # there is a bug reported on https://developercommunity.visualstudio.com/content/problem/9696/c17-not-available-by-default.html
 | 
			
		||||
      # string_view is not available unless we use the /std:c++latest switch
 | 
			
		||||
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest")
 | 
			
		||||
    if(NOT CYGWIN AND NOT MSYS)
 | 
			
		||||
      set(CMAKE_CXX_EXTENSIONS OFF)
 | 
			
		||||
      if(APPLE)
 | 
			
		||||
        set(CMAKE_CXX_STANDARD 11)
 | 
			
		||||
        set(CMAKE_CXX_STANDARD_REQUIRED OFF)
 | 
			
		||||
      endif()
 | 
			
		||||
    endif()
 | 
			
		||||
  endif()
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
enable_testing()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user