comparison Resources/CMake/VisualStudioPrecompiledHeaders.cmake @ 3185:c6dab987f43a

changed VS precompiled headers to support Ninja + instructions to use Ninja & QtCreator on Windows
author Alain Mazy <alain@mazy.be>
date Fri, 01 Feb 2019 17:53:40 +0100
parents 233d6eeef799
children
comparison
equal deleted inserted replaced
3180:07a2f637b76d 3185:c6dab987f43a
1 macro(ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS PrecompiledHeaders PrecompiledSource Sources Target) 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}_${CMAKE_BUILD_TYPE}_${CMAKE_GENERATOR_PLATFORM}.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}\""
7 OBJECT_OUTPUTS "${PrecompiledBinary}") 7 OBJECT_OUTPUTS "${PrecompiledBinary}")
8 8