Skip to content

Commit 8120975

Browse files
committed
Remove use of CMake 3.6 feature: list(FILTER). Fixes microsoft#603.
1 parent 1a7237d commit 8120975

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Release/src/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ source_group("Header Files\\cpprest" FILES ${HEADERS_CPPREST})
1111
source_group("Header Files\\pplx" FILES ${HEADERS_PPLX})
1212
source_group("Header Files\\cpprest\\details" FILES ${HEADERS_DETAILS})
1313

14-
list(FILTER HEADERS_PPLX EXCLUDE REGEX "threadpool\\.h")
14+
file(GLOB HEADER_PPLX_THREADPOOL "../include/pplx/threadpool.h")
15+
list(REMOVE_ITEM HEADERS_PPLX ${HEADER_PPLX_THREADPOOL})
1516

1617
set(SOURCES
1718
${HEADERS_CPPREST}
@@ -163,14 +164,12 @@ endif()
163164
if(MSVC)
164165
get_target_property(_srcs cpprest SOURCES)
165166

166-
set_source_files_properties(pch/stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h")
167-
list(FILTER _srcs EXCLUDE REGEX "pch/stdafx\\.cpp$")
168-
169167
if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*")
170168
set_property(SOURCE pch/stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch")
171169
set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/stdafx.pch")
172170
endif()
173171

172+
set_source_files_properties(pch/stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h")
174173
target_sources(cpprest PRIVATE pch/stdafx.cpp)
175174
target_compile_options(cpprest PRIVATE /Yustdafx.h /Zm200)
176175
endif()

0 commit comments

Comments
 (0)