PrecompiledHeader.cmake: Fix setting SOURCE_CXX & SOURCE_C; recognize pch in subdirectories#6
Open
andrzejc wants to merge 2 commits into
Open
PrecompiledHeader.cmake: Fix setting SOURCE_CXX & SOURCE_C; recognize pch in subdirectories#6andrzejc wants to merge 2 commits into
andrzejc wants to merge 2 commits into
Conversation
Owner
|
Thanks for the update - but the tests don't pass with Visual Studio 2015 with these changes. I have applied the changes for SOURCE_CXX/SOURCE_C and make_directory() though.
|
Author
|
Hi Lars,
I’ll check on this if time allows - I was hoping to use your code in 2 of my projects but the approach with setting source properties turned out to be unusable when there’re more then one target using the same set of source files - in my case these were the shared and static versions of the libraries. The same source file properties were being used for both targets resulting in erroneous build. Anyway, using "${CMAKE_CFG_INTDIR}” in make_directory causes the directory named literally $(ConfigurationName) to be created, that’s why I changed it. Strangely, I have not encountered the issue you described.
…-Andrzej
On 15 Feb 2017, at 14:02, Lars Christensen ***@***.***> wrote:
Thanks for the update - but the tests don't pass with Visual Studio 2015 with these changes. I have applied the changes for SOURCE_CXX/SOURCE_C and make_directory() though.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(873,21): error MSB4198: The expression "DirectoryName" cannot be evaluated on item "test-c_c_pch/test-pch-$<CONFIG>.pch". Illegal characters in path. [C:\priv\cmake-precompiled-header\build\c-Visual Studio 14 2 015-build\test-c.vcxproj]
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub <#6 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ALb4KdqPSvi5a0_0OhEicdXtEwB0U5Coks5rcvdhgaJpZM4L-VHd>.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cmake_parse_arguments() uses semicolon as separator, as it was SOURCE_C* options had no chance to work.
if pch name includes subdirectory, prepend it to .cpp/.c file by default