The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=13559 
====================================================================== 
Reported By:                Yuchen Deng
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13559
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2012-09-25 08:53 EDT
Last Modified:              2012-09-25 08:53 EDT
====================================================================== 
Summary:                    Ninja: Wrong dependency with PCH support
Description: 
Here is the ML discussion:
http://www.cmake.org/pipermail/cmake/2012-September/052144.html

3. It seems does not support PCH fully. e.g. change the PCH source (MSVC) or
header (GCC), if using CMake Makefiles Generator, and will compilation every
source files if it depends on PCH binary file. But using nanja, seems does not
re-builds source files, just only updated the PCH binary.

---

function(use_msvc_precompiled_header target sources)
    foreach(src ${sources})
        set_source_files_properties(${src} PROPERTIES
            COMPILE_FLAGS "/Yu\"${pchBinaryFile}\" /FI\"${pchBinaryFile}\"
/Fp\"${pchBinaryFile}\""
            OBJECT_DEPENDS ${pchBinaryFile}
        )
    endforeach()
endfunction()

See: set_source_files_properties, the OBJECT_DEPENDS setting does not work with
Ninja Generator, but works well with NMake Makefiles and Unix Makefiles
generator.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-09-25 08:53 Yuchen Deng    New Issue                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to