Skip to content

Commit 9e7dbbc

Browse files
author
Mayeul d'Avezac
committed
Remove cmake warning about policy change
1 parent eeaddad commit 9e7dbbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/CheckCXX11Features.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function(parse_input_features ALLFEATURES OPTIONALS REQUIRED ERRORS)
118118
set(UNKNOWN_FEATURES)
119119
set(result_type OPTIONAL_FEATURES)
120120
foreach(feature ${ARGN})
121-
if(${feature} STREQUAL "REQUIRED")
121+
string(COMPARE EQUAL "${feature}" "REQUIRED" avoid_cmake_warning)
122+
if(avoid_cmake_warning)
122123
set(result_type REQUIRED_FEATURES)
123124
else()
124125
list(FIND ALLFEATURES ${feature} feature_was_found)
@@ -128,8 +129,7 @@ function(parse_input_features ALLFEATURES OPTIONALS REQUIRED ERRORS)
128129
else()
129130
list(APPEND ${result_type} ${feature})
130131
endif()
131-
132-
endif(${feature} STREQUAL "REQUIRED")
132+
endif()
133133
endforeach()
134134

135135
set(${OPTIONALS} ${OPTIONAL_FEATURES} PARENT_SCOPE)

0 commit comments

Comments
 (0)