[cmake] Honour CMAKE_CXX_STANDARD when performing test for check_cxx_native_regex
[cmake] Honour CMAKE_CXX_STANDARD when performing test for check_cxx_native_regex

In the rebranch, we move to using CMAKE_CXX_STANDARD to set C++14, which
doesn't work out of the box with try_compile() tests, so set the
required CMake policy. Was causing tests to XPASS instead of PASS.

rdar://58632606

tkremenek/swift,jmgc/swift,ahoppen/swift,nathawes/swift,harlanhaskins/swift,aschwaighofer/swift,aschwaighofer/swift,rudkx/swift,parkera/swift,tkremenek/swift,atrick/swift,apple/swift,hooman/swift,benlangmuir/swift,benlangmuir/swift,jckarter/swift,gribozavr/swift,ahoppen/swift,harlanhaskins/swift,benlangmuir/swift,atrick/swift,tkremenek/swift,allevato/swift,glessard/swift,rudkx/swift,parkera/swift,hooman/swift,rudkx/swift,atrick/swift,gribozavr/swift,ahoppen/swift,benlangmuir/swift,atrick/swift,xwu/swift,gregomni/swift,jmgc/swift,rudkx/swift,harlanhaskins/swift,parkera/swift,xwu/swift,glessard/swift,CodaFi/swift,roambotics/swift,CodaFi/swift,aschwaighofer/swift,nathawes/swift,stephentyrone/swift,JGiola/swift,tkremenek/swift,airspeedswift/swift,stephentyrone/swift,jckarter/swift,glessard/swift,tkremenek/swift,jmgc/swift,jckarter/swift,harlanhaskins/swift,aschwaighofer/swift,parkera/swift,ahoppen/swift,stephentyrone/swift,aschwaighofer/swift,hooman/swift,airspeedswift/swift,glessard/swift,xwu/swift,jckarter/swift,hooman/swift,tkremenek/swift,JGiola/swift,ahoppen/swift,aschwaighofer/swift,parkera/swift,gregomni/swift,roambotics/swift,CodaFi/swift,apple/swift,gregomni/swift,allevato/swift,stephentyrone/swift,apple/swift,ahoppen/swift,gribozavr/swift,benlangmuir/swift,gribozavr/swift,gribozavr/swift,tkremenek/swift,atrick/swift,hooman/swift,jckarter/swift,CodaFi/swift,roambotics/swift,hooman/swift,gregomni/swift,atrick/swift,airspeedswift/swift,roambotics/swift,gregomni/swift,roambotics/swift,jmgc/swift,nathawes/swift,JGiola/swift,allevato/swift,CodaFi/swift,parkera/swift,jmgc/swift,apple/swift,JGiola/swift,stephentyrone/swift,JGiola/swift,airspeedswift/swift,jckarter/swift,harlanhaskins/swift,nathawes/swift,allevato/swift,airspeedswift/swift,hooman/swift,airspeedswift/swift,JGiola/swift,apple/swift,nathawes/swift,benlangmuir/swift,nathawes/swift,stephentyrone/swift,parkera/swift,apple/swift,xwu/swift,CodaFi/swift,allevato/swift,aschwaighofer/swift,rudkx/swift,roambotics/swift,xwu/swift,allevato/swift,stephentyrone/swift,gribozavr/swift,harlanhaskins/swift,xwu/swift,gribozavr/swift,jmgc/swift,allevato/swift,jmgc/swift,glessard/swift,jckarter/swift,xwu/swift,airspeedswift/swift,CodaFi/swift,rudkx/swift,nathawes/swift,glessard/swift,harlanhaskins/swift,gregomni/swift,parkera/swift,gribozavr/swift