Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ninja build does not work if you have more than one lib/exe #13

Open
bertubezz opened this issue Nov 11, 2017 · 2 comments
Open

Ninja build does not work if you have more than one lib/exe #13

bertubezz opened this issue Nov 11, 2017 · 2 comments

Comments

@bertubezz
Copy link

This is because with Ninja generator 'CMAKE_CFG_INTDIR' get resolves to '.' thus making all projects pointing to the same file which at this point in time it is not supported. one can use CMAKE_CURRENT_BINARY_DIR instead.

@bubnikv
Copy link

bubnikv commented Oct 29, 2018

There is a bug in setting the output path for the precompiled headers for visual studio. It should say

if(MSVC)
set(pch_cxx_pch "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/cxx${_input_we}.pch")
set(pch_c_pch "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/c${_input_we}.pch")

not
set(pch_cxx_pch "${CMAKE_CFG_INTDIR}/cxx${_input_we}.pch")
set(pch_c_pch "${CMAKE_CFG_INTDIR}/c${_input_we}.pch")

@sdebionne
Copy link

This is indeed necessary for project that have multiple pch, but pch_cxx_pch is now _pch_cxx_pch:

    set(_pch_cxx_pch "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/cxx${_input_we}.pch")
    set(_pch_c_pch "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/c${_input_we}.pch")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants