2391
|
1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources Target)
|
824
|
2 get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE)
|
1561
|
3 set(PrecompiledBinary "${PrecompiledBasename}_$(ConfigurationName).pch")
|
824
|
4
|
|
5 set_source_files_properties(${PrecompiledSource}
|
|
6 PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""
|
|
7 OBJECT_OUTPUTS "${PrecompiledBinary}")
|
|
8
|
|
9 set_source_files_properties(${${Sources}}
|
|
10 PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""
|
830
|
11 OBJECT_DEPENDS "${PrecompiledBinary}")
|
824
|
12
|
2391
|
13 set(${Target} ${PrecompiledSource})
|
824
|
14 endmacro()
|