File tree Expand file tree Collapse file tree 6 files changed +78
-0
lines changed Expand file tree Collapse file tree 6 files changed +78
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,19 @@ else()
3232 target_link_libraries (httpclient_test PRIVATE httptest_utilities)
3333endif ()
3434
35+ if (MSVC )
36+ get_target_property (_srcs httpclient_test SOURCES )
37+
38+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*" )
39+ set_property (SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
40+ set_property (SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
41+ endif ()
42+
43+ set_source_files_properties (stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h" )
44+ target_sources (httpclient_test PRIVATE stdafx.cpp)
45+ target_compile_options (httpclient_test PRIVATE /Yustdafx.h /Zm200)
46+ endif ()
47+
3548if (NOT WIN32 )
3649 cpprest_find_boost()
3750 target_link_libraries (httpclient_test PRIVATE cpprestsdk_boost_internal)
Original file line number Diff line number Diff line change @@ -16,3 +16,16 @@ if(UNIX AND NOT APPLE)
1616 cpprest_find_boost()
1717 target_link_libraries (json_test PRIVATE cpprestsdk_boost_internal)
1818endif ()
19+
20+ if (MSVC )
21+ get_target_property (_srcs json_test SOURCES )
22+
23+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*" )
24+ set_property (SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
25+ set_property (SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
26+ endif ()
27+
28+ set_source_files_properties (stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h" )
29+ target_sources (json_test PRIVATE stdafx.cpp)
30+ target_compile_options (json_test PRIVATE /Yustdafx.h /Zm200)
31+ endif ()
Original file line number Diff line number Diff line change @@ -6,3 +6,16 @@ set(SOURCES
66)
77
88add_casablanca_test(pplx_test SOURCES )
9+
10+ if (MSVC )
11+ get_target_property (_srcs pplx_test SOURCES )
12+
13+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*" )
14+ set_property (SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
15+ set_property (SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
16+ endif ()
17+
18+ set_source_files_properties (stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h" )
19+ target_sources (pplx_test PRIVATE stdafx.cpp)
20+ target_compile_options (pplx_test PRIVATE /Yustdafx.h /Zm200)
21+ endif ()
Original file line number Diff line number Diff line change @@ -24,3 +24,16 @@ if(NOT WIN32 OR CPPREST_WEBSOCKETS_IMPL STREQUAL "wspp")
2424 target_include_directories (streams_test PRIVATE $<TARGET_PROPERTY:cpprestsdk_boost_internal,INTERFACE_INCLUDE_DIRECTORIES >)
2525 endif ()
2626endif ()
27+
28+ if (MSVC )
29+ get_target_property (_srcs streams_test SOURCES )
30+
31+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*" )
32+ set_property (SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
33+ set_property (SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
34+ endif ()
35+
36+ set_source_files_properties (stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h" )
37+ target_sources (streams_test PRIVATE stdafx.cpp)
38+ target_compile_options (streams_test PRIVATE /Yustdafx.h /Zm200)
39+ endif ()
Original file line number Diff line number Diff line change @@ -12,3 +12,16 @@ set(SOURCES
1212)
1313
1414add_casablanca_test(uri_test SOURCES )
15+
16+ if (MSVC )
17+ get_target_property (_srcs uri_test SOURCES )
18+
19+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*" )
20+ set_property (SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
21+ set_property (SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
22+ endif ()
23+
24+ set_source_files_properties (stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h" )
25+ target_sources (uri_test PRIVATE stdafx.cpp)
26+ target_compile_options (uri_test PRIVATE /Yustdafx.h /Zm200)
27+ endif ()
Original file line number Diff line number Diff line change @@ -13,3 +13,16 @@ add_casablanca_test(utils_test SOURCES)
1313if (CMAKE_COMPILER_IS_GNUCXX)
1414 target_compile_options (utils_test PRIVATE "-Wno-deprecated-declarations" )
1515endif ()
16+
17+ if (MSVC )
18+ get_target_property (_srcs utils_test SOURCES )
19+
20+ if (NOT CMAKE_GENERATOR MATCHES "Visual Studio .*" )
21+ set_property (SOURCE stdafx.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
22+ set_property (SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR} /stdafx.pch" )
23+ endif ()
24+
25+ set_source_files_properties (stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h" )
26+ target_sources (utils_test PRIVATE stdafx.cpp)
27+ target_compile_options (utils_test PRIVATE /Yustdafx.h /Zm200)
28+ endif ()
You can’t perform that action at this time.
0 commit comments