Mercurial > hg > orthanc
changeset 830:6c6e3c18799c
fix pch
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Jun 2014 12:03:46 +0200 |
parents | e798ff248b98 |
children | 84513f2ee1f3 |
files | CMakeLists.txt Resources/CMake/VisualStudioPrecompiledHeaders.cmake |
diffstat | 2 files changed, 6 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Mon Jun 02 11:50:56 2014 +0200 +++ b/CMakeLists.txt Mon Jun 02 12:03:46 2014 +0200 @@ -240,13 +240,10 @@ # Setup precompiled headers for Microsoft Visual Studio if (${MSVC}) - set(ORTHANC_SOURCES - ${ORTHANC_CORE_SOURCES} - ${ORTHANC_SERVER_SOURCES} - ${ORTHANC_UNIT_TESTS_SOURCES} - ) - ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS("PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_SOURCES) - list(APPEND ORTHANC_CORE_SOURCES "Core/PrecompiledHeaders.cpp") + add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS("PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES) + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS("PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_SERVER_SOURCES) + ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS("PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_UNIT_TESTS_SOURCES) endif()
--- a/Resources/CMake/VisualStudioPrecompiledHeaders.cmake Mon Jun 02 11:50:56 2014 +0200 +++ b/Resources/CMake/VisualStudioPrecompiledHeaders.cmake Mon Jun 02 12:03:46 2014 +0200 @@ -8,7 +8,7 @@ set_source_files_properties(${${Sources}} PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeaders}\" /FI\"${PrecompiledHeaders}\" /Fp\"${PrecompiledBinary}\"" - OBJECT_DEPENDS "${PrecompiledBinary}") + OBJECT_DEPENDS "${PrecompiledBinary}") - add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) + list(APPEND ${Sources} ${PrecompiledSource}) endmacro()