annotate Resources/CMake/VisualStudioPrecompiledHeaders.cmake @ 3200:1f4a2c58e7fa

set encoding to UTF-8, IBinaryFormatter
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Feb 2019 13:51:20 +0100
parents c6dab987f43a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2391
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1561
diff changeset
1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources Target)
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE)
3185
c6dab987f43a changed VS precompiled headers to support Ninja + instructions to use Ninja & QtCreator on Windows
Alain Mazy <alain@mazy.be>
parents: 2391
diff changeset
3 set(PrecompiledBinary "${PrecompiledBasename}_${CMAKE_BUILD_TYPE}_${CMAKE_GENERATOR_PLATFORM}.pch")
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 set_source_files_properties(${PrecompiledSource}
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 OBJECT_OUTPUTS "${PrecompiledBinary}")
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 set_source_files_properties(${${Sources}}
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\""
830
6c6e3c18799c fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 824
diff changeset
11 OBJECT_DEPENDS "${PrecompiledBinary}")
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12
2391
233d6eeef799 fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1561
diff changeset
13 set(${Target} ${PrecompiledSource})
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 endmacro()