Skip to content

Commit 67b9aab

Browse files
committed
[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
1 parent a0b0e36 commit 67b9aab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ if(POLICY CMP0068)
77
cmake_policy(SET CMP0068 OLD)
88
endif()
99

10+
# Honour CMAKE_CXX_STANDARD in try_compile(), needed for check_cxx_native_regex.
11+
if(POLICY CMP0067)
12+
cmake_policy(SET CMP0067 NEW)
13+
endif()
14+
1015
# Add path for custom CMake modules.
1116
list(APPEND CMAKE_MODULE_PATH
1217
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

0 commit comments

Comments
 (0)