comparison Resources/CMake/VisualStudioPrecompiledHeaders.cmake @ 2884:497a637366b4 db-changes

integration mainline->db-changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 12 Oct 2018 15:18:10 +0200
parents 233d6eeef799
children c6dab987f43a
comparison
equal deleted inserted replaced
1762:2b91363cc1d1 2884:497a637366b4
1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources) 1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources Target)
2 get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE) 2 get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE)
3 set(PrecompiledBinary "${PrecompiledBasename}_$(ConfigurationName).pch") 3 set(PrecompiledBinary "${PrecompiledBasename}_$(ConfigurationName).pch")
4 4
5 set_source_files_properties(${PrecompiledSource} 5 set_source_files_properties(${PrecompiledSource}
6 PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\"" 6 PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""
8 8
9 set_source_files_properties(${${Sources}} 9 set_source_files_properties(${${Sources}}
10 PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\"" 10 PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""
11 OBJECT_DEPENDS "${PrecompiledBinary}") 11 OBJECT_DEPENDS "${PrecompiledBinary}")
12 12
13 list(APPEND ${Sources} ${PrecompiledSource}) 13 set(${Target} ${PrecompiledSource})
14 endmacro() 14 endmacro()