Mercurial > hg > orthanc
comparison OrthancFramework/Resources/CMake/VisualStudioPrecompiledHeaders.cmake @ 4044:d25f4c0fa160 framework
splitting code into OrthancFramework and OrthancServer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Jun 2020 20:30:34 +0200 |
parents | Resources/CMake/VisualStudioPrecompiledHeaders.cmake@c6dab987f43a |
children | 304842a0d152 |
comparison
equal
deleted
inserted
replaced
4043:6c6239aec462 | 4044:d25f4c0fa160 |
---|---|
1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources Target) | |
2 get_filename_component(PrecompiledBasename ${PrecompiledHeaders} NAME_WE) | |
3 set(PrecompiledBinary "${PrecompiledBasename}_${CMAKE_BUILD_TYPE}_${CMAKE_GENERATOR_PLATFORM}.pch") | |
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}\"" | |
11 OBJECT_DEPENDS "${PrecompiledBinary}") | |
12 | |
13 set(${Target} ${PrecompiledSource}) | |
14 endmacro() |