> Could we rename this? Currently target_* functions are all related to
> usage requirements and these are not usage requirements.

Honestly I don't understand your request. What would be then the name that 
better represents what the function does.

Also please note this is proposed API to be handled directly by CMake, once 
there is a green light I'll propose patches to CMake itself.


In meantime https://github.com/nanoant/CMakePCHCompiler is just an 
implementation that "emulates" desired behavior using many tricks. But I don't 
want this to be a part of CMake, but instead I want this to be handled natively 
adding some extra variables:

        CMAKE_<LANG>_PRECOMPILE_HEADER
        
                GCC, Clang: same as CMAKE_<LANG>_COMPILE_OBJECT
                MSVC: CMAKE_<LANG>_COMPILE_OBJECT with "-c" replaced with 
"/FoNUL /Yc /Fp"

        CMAKE_<LANG>_PRECOMPILED_HEADER_EXTENSION

                GCC: .gch
                MSVC, Clang: .pch

        CMAKE_PRECOMPILED_HEADER_FLAG_<LANG>

                GCC, Clang: -include <PATH>
                MSVC: /Yu<BASENAME> /Fp<PATH> /FI$<BASENAME>

And extending CMake to generate proper build commands for Makefile, Ninja 
targets, and also Xcode, MSVC generators.

-- Adam
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to