File tree 6 files changed +78
-0
lines changed
6 files changed +78
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,19 @@ else()
32
32
target_link_libraries (httpclient_test PRIVATE httptest_utilities)
33
33
endif ()
34
34
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
+
35
48
if (NOT WIN32 )
36
49
cpprest_find_boost()
37
50
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)
16
16
cpprest_find_boost()
17
17
target_link_libraries (json_test PRIVATE cpprestsdk_boost_internal)
18
18
endif ()
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
6
6
)
7
7
8
8
add_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")
24
24
target_include_directories (streams_test PRIVATE $<TARGET_PROPERTY:cpprestsdk_boost_internal,INTERFACE_INCLUDE_DIRECTORIES >)
25
25
endif ()
26
26
endif ()
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 @@ -13,3 +13,16 @@ set(SOURCES
13
13
)
14
14
15
15
add_casablanca_test(uri_test SOURCES )
16
+
17
+ if (MSVC )
18
+ get_target_property (_srcs uri_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 (uri_test PRIVATE stdafx.cpp)
27
+ target_compile_options (uri_test PRIVATE /Yustdafx.h /Zm200)
28
+ endif ()
Original file line number Diff line number Diff line change @@ -13,3 +13,16 @@ add_casablanca_test(utils_test SOURCES)
13
13
if (CMAKE_COMPILER_IS_GNUCXX)
14
14
target_compile_options (utils_test PRIVATE "-Wno-deprecated-declarations" )
15
15
endif ()
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