annotate Resources/CMake/VisualStudioPrecompiledHeaders.cmake @ 1118:3709c03ec9f0

ALLOW_DOWNLOADS for OS X builds
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 02 Sep 2014 23:13:59 +0200
parents 6c6e3c18799c
children 01c24da762da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources)
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE)
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set(PrecompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${PrecompiledBasename}.pch")
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
830
6c6e3c18799c fix pch
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 824
diff changeset
13 list(APPEND ${Sources} ${PrecompiledSource})
824
a811bdf8b8eb precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 endmacro()