Skip to content

Commit 793700c

Browse files
authored
Merge pull request #4260 from vicentebolea/install-test-remove-werror
cmake: only remove werror|wall install test
2 parents 3615f5f + 37ed01a commit 793700c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

testing/install/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,11 @@ set_tests_properties(Install.Setup PROPERTIES
8484

8585
# Remove -Wall -Werror in this scope
8686
if(CMAKE_C_FLAGS)
87-
string(REPLACE "-Wall" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
88-
string(REPLACE "-Werror" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
87+
string(REPLACE REGEX "(^| )(-Wall|-Werror)( |$)" " " CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
8988
endif()
9089

9190
if(CMAKE_CXX_FLAGS)
92-
string(REPLACE "-Wall" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
93-
string(REPLACE "-Werror" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
91+
string(REPLACE REGEX "(^| )(-Wall|-Werror)( |$)" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
9492
endif()
9593

9694
add_install_cmake_test(C)

0 commit comments

Comments
 (0)