Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-05-17 Thread Sebastian Holtermann




Am 16.05.19 um 20:43 schrieb Venedict Tchistopolskii:

Hey again, just checking in.

Has this been solved with a better solution/etc.? .-.

VT


AFAIK setting source file properties on files that get tagged
GENERATED later has been fixed by this commit:

https://gitlab.kitware.com/cmake/cmake/commit/254b7260f49caaca78b16761d70d6239626d2129

So it should work in CMake 3.14 and higher.

If this is the best solution for the issue is a different question.
Check issue https://gitlab.kitware.com/cmake/cmake/issues/19266,
for another solution approach (not implemented, yet).

Sebastian
--

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-05-16 Thread Venedict Tchistopolskii
Hey again, just checking in.

Has this been solved with a better solution/etc.? .-.

VT

On Thu, Jan 31, 2019 at 10:11 AM Venedict Tchistopolskii 
wrote:

> Thanks! Worked, glad to have a smaller fix.
>
> VT
>
> On Thu, Jan 31, 2019 at 9:10 AM Sebastian Holtermann 
> wrote:
>
>> > Any luck? I can try helping ya trace it if you need it.
>> >
>>
>> I traced this down to some degree.
>> The problem arises from the handling of file path for GENERATED vs non
>> GENERATED files.
>> When the full path for a file is computed in cmSourceFile and the file
>> doesn't
>> exist (mocs_compilation.cpp doesn't, yet), a path error flag is set.
>> The flag won't be raised when the file has the property GENERATED set,
>> which
>> mocs_compilation.cpp hasn't at that point.
>>
>> A quick solution in your CMakeLists.txt is to mark mocs_compilation.cpp
>> GENERATED first like this
>>
>> ```
>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY GENERATED
>> "1")
>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
>> COMPILE_FLAGS
>> " /FI\"${PrecompiledHeader}\"")
>> ```
>>
>> This works here for a small example project.
>>
>> I'm too busy right now to address this in the CMake sources but I'll try
>> to
>> look at it next week.
>>
>> -Sebastian
>>
>>
>>
>>
>>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-31 Thread Venedict Tchistopolskii
Thanks! Worked, glad to have a smaller fix.

VT

On Thu, Jan 31, 2019 at 9:10 AM Sebastian Holtermann 
wrote:

> > Any luck? I can try helping ya trace it if you need it.
> >
>
> I traced this down to some degree.
> The problem arises from the handling of file path for GENERATED vs non
> GENERATED files.
> When the full path for a file is computed in cmSourceFile and the file
> doesn't
> exist (mocs_compilation.cpp doesn't, yet), a path error flag is set.
> The flag won't be raised when the file has the property GENERATED set,
> which
> mocs_compilation.cpp hasn't at that point.
>
> A quick solution in your CMakeLists.txt is to mark mocs_compilation.cpp
> GENERATED first like this
>
> ```
> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY GENERATED
> "1")
> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
> COMPILE_FLAGS
> " /FI\"${PrecompiledHeader}\"")
> ```
>
> This works here for a small example project.
>
> I'm too busy right now to address this in the CMake sources but I'll try
> to
> look at it next week.
>
> -Sebastian
>
>
>
>
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-31 Thread Sebastian Holtermann
> Any luck? I can try helping ya trace it if you need it.
> 

I traced this down to some degree.
The problem arises from the handling of file path for GENERATED vs non 
GENERATED files.
When the full path for a file is computed in cmSourceFile and the file doesn't
exist (mocs_compilation.cpp doesn't, yet), a path error flag is set.
The flag won't be raised when the file has the property GENERATED set, which
mocs_compilation.cpp hasn't at that point.

A quick solution in your CMakeLists.txt is to mark mocs_compilation.cpp
GENERATED first like this

```
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY GENERATED "1")
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY COMPILE_FLAGS 
" /FI\"${PrecompiledHeader}\"")
```

This works here for a small example project.

I'm too busy right now to address this in the CMake sources but I'll try to 
look at it next week.

-Sebastian




-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-31 Thread Venedict Tchistopolskii
Any luck? I can try helping ya trace it if you need it.

Hoping to get this solved before the weekend xd

On Wed, Jan 30, 2019 at 7:32 AM Venedict Tchistopolskii 
wrote:

> Gotcha, my project builds atm and it's fairly large, didn't know that it
> broke anything else.
>
> Please let me know when someone fixes it :)
>
> VT
>
> On Wed, Jan 30, 2019 at 6:31 AM Sebastian Holtermann 
> wrote:
>
>> Hello Venedict,
>>
>> I took a look at this again, thanks for the additional information.
>> In fact this isn't VS specific. I was able to reproduce the issue using
>> Linux/Makefiles.
>>
>> > Got the fix, hopefully it can be merged in :)
>> >
>> https://github.com/Personwithhat/custom_cmake/commit/d7930c36c6aa7956a806a28
>> > 4aa7e1e430ef6c174
>>
>> This change is too intrusive and breaks a lot of other things.
>>
>> > >>> set (MOC_COMPILATION
>> > >>>
>> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.c
>> > >>> pp") # stdafx.h needs to be included to ensure platform definitions
>> are
>> > >>> visible
>> > >>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
>> > >>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")
>>
>> Setting compiler flags on the mocs_compilation.cpp file is the root cause.
>> I'll investigate this deeper.
>>
>> -Sebastian
>>
>>
>>
>>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-30 Thread Venedict Tchistopolskii
Gotcha, my project builds atm and it's fairly large, didn't know that it
broke anything else.

Please let me know when someone fixes it :)

VT

On Wed, Jan 30, 2019 at 6:31 AM Sebastian Holtermann 
wrote:

> Hello Venedict,
>
> I took a look at this again, thanks for the additional information.
> In fact this isn't VS specific. I was able to reproduce the issue using
> Linux/Makefiles.
>
> > Got the fix, hopefully it can be merged in :)
> >
> https://github.com/Personwithhat/custom_cmake/commit/d7930c36c6aa7956a806a28
> > 4aa7e1e430ef6c174
>
> This change is too intrusive and breaks a lot of other things.
>
> > >>> set (MOC_COMPILATION
> > >>>
> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.c
> > >>> pp") # stdafx.h needs to be included to ensure platform definitions
> are
> > >>> visible
> > >>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
> > >>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")
>
> Setting compiler flags on the mocs_compilation.cpp file is the root cause.
> I'll investigate this deeper.
>
> -Sebastian
>
>
>
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-30 Thread Sebastian Holtermann
Hello Venedict,

I took a look at this again, thanks for the additional information.
In fact this isn't VS specific. I was able to reproduce the issue using
Linux/Makefiles.

> Got the fix, hopefully it can be merged in :)
> https://github.com/Personwithhat/custom_cmake/commit/d7930c36c6aa7956a806a28
> 4aa7e1e430ef6c174

This change is too intrusive and breaks a lot of other things.

> >>> set (MOC_COMPILATION
> >>> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.c
> >>> pp") # stdafx.h needs to be included to ensure platform definitions are
> >>> visible
> >>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
> >>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")

Setting compiler flags on the mocs_compilation.cpp file is the root cause.
I'll investigate this deeper.

-Sebastian



-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-29 Thread Venedict Tchistopolskii
Got the fix, hopefully it can be merged in :)
https://github.com/Personwithhat/custom_cmake/commit/d7930c36c6aa7956a806a284aa7e1e430ef6c174

VT

On Tue, Jan 29, 2019 at 8:00 PM Venedict Tchistopolskii 
wrote:

> Traced it down to this exact commit:
>
> *2d6cfe2677 Autogen: Split initializer main method*
> https://github.com/Kitware/CMake/commit/2d6cfe26770d8062081061f9dbcc4e3e6eaa0091
>
> If I rebase before it then it works as expected >:V
>
> Working on a fix.
>
> VT
>
> On Tue, Jan 29, 2019 at 4:16 PM Venedict Tchistopolskii 
> wrote:
>
>> *The below is done right after the above:*
>> set_property(TARGET ${TargetProject } APPEND PROPERTY AUTOMOC_MOC_OPTIONS
>> -b${PrecompiledHeader})
>>
>>
>> On Tue, Jan 29, 2019 at 2:38 PM Venedict Tchistopolskii <
>> veny...@gmail.com> wrote:
>>
>>> *Lots more testing, traced down a possible issue here involving PCH and
>>> mocs_compilation.cpp:*
>>> get_target_property(HAS_AUTOMOC ${TargetProject} AUTOMOC)
>>> if (HAS_AUTOMOC STREQUAL "TRUE")
>>> set (MOC_COMPILATION
>>> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.cpp")
>>> # stdafx.h needs to be included to ensure platform definitions are
>>> visible
>>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
>>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")
>>> endif()
>>>
>>> *If this is ignored, then mocs_compilation.cpp is visible in solution
>>> explorer post generation (no need to build). Build ofc proceeds fine, no
>>> unresolved externals/etc.*
>>>
>>> *Please advise.*
>>>
>>> *VT*
>>>
>>> On Mon, Jan 28, 2019 at 11:25 PM Venedict Tchistopolskii <
>>> veny...@gmail.com> wrote:
>>>
 Current automoc settings more or less, it's a solution with a few
 projects some of which are marked AUTOMOC:
 ## Relative to root in solution explorer
 set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER
 "${VS_FOLDER_PREFIX}/Sandbox/AUTOMOC_Targets")
 ## Relative to each project
 set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "AUTOMOC_Generated")

 AUTOGEN_TARGETS_FOLDER doesn't get created, but in CMake 3.12 it did
 the same and worked.

 AUTOMOC_Generated gets created (per project ofc) and added in CMake
 3.12 during the build.
 For CMake 3.13 it gets created, but not added (not visible in solution
 explorer) during build, gotta re-run CMake to include it.

 On Mon, Jan 28, 2019 at 11:04 PM Venedict Tchistopolskii <
 veny...@gmail.com> wrote:

> tl;dr, the below does not work for me:
>
> The resulting moc_.cpp files are generated in custom
> directories and automatically included in a generated
> /mocs_compilation.cpp file, *which is compiled as
> part of the target. (nope)*
>
> On Mon, Jan 28, 2019 at 10:06 PM Venedict Tchistopolskii <
> veny...@gmail.com> wrote:
>
>> The first CMake generation pass: Generates but no inclusion
>>
>>
>>
>> *Forcing a second pass makes it include the newly generated moc.*
>> It says *"AutoMoc: Generating 'X' because the MOC settings
>> changed"*
>>
>> I'm not too clear on why this is happening, any ideas on how to fix
>> it, or force it to reload whatever 'moc settings' are changing?
>>
>> Possibly related: https://gitlab.kitware.com/cmake/cmake/issues/17456
>>
>> e.g. mocs_compilation.cpp and include_ folder -> Created but not
>> added until CMake re-run
>>
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-29 Thread Venedict Tchistopolskii
Traced it down to this exact commit:

*2d6cfe2677 Autogen: Split initializer main method*
https://github.com/Kitware/CMake/commit/2d6cfe26770d8062081061f9dbcc4e3e6eaa0091

If I rebase before it then it works as expected >:V

Working on a fix.

VT

On Tue, Jan 29, 2019 at 4:16 PM Venedict Tchistopolskii 
wrote:

> *The below is done right after the above:*
> set_property(TARGET ${TargetProject } APPEND PROPERTY AUTOMOC_MOC_OPTIONS
> -b${PrecompiledHeader})
>
>
> On Tue, Jan 29, 2019 at 2:38 PM Venedict Tchistopolskii 
> wrote:
>
>> *Lots more testing, traced down a possible issue here involving PCH and
>> mocs_compilation.cpp:*
>> get_target_property(HAS_AUTOMOC ${TargetProject} AUTOMOC)
>> if (HAS_AUTOMOC STREQUAL "TRUE")
>> set (MOC_COMPILATION
>> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.cpp")
>> # stdafx.h needs to be included to ensure platform definitions are visible
>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")
>> endif()
>>
>> *If this is ignored, then mocs_compilation.cpp is visible in solution
>> explorer post generation (no need to build). Build ofc proceeds fine, no
>> unresolved externals/etc.*
>>
>> *Please advise.*
>>
>> *VT*
>>
>> On Mon, Jan 28, 2019 at 11:25 PM Venedict Tchistopolskii <
>> veny...@gmail.com> wrote:
>>
>>> Current automoc settings more or less, it's a solution with a few
>>> projects some of which are marked AUTOMOC:
>>> ## Relative to root in solution explorer
>>> set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER
>>> "${VS_FOLDER_PREFIX}/Sandbox/AUTOMOC_Targets")
>>> ## Relative to each project
>>> set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "AUTOMOC_Generated")
>>>
>>> AUTOGEN_TARGETS_FOLDER doesn't get created, but in CMake 3.12 it did the
>>> same and worked.
>>>
>>> AUTOMOC_Generated gets created (per project ofc) and added in CMake 3.12
>>> during the build.
>>> For CMake 3.13 it gets created, but not added (not visible in solution
>>> explorer) during build, gotta re-run CMake to include it.
>>>
>>> On Mon, Jan 28, 2019 at 11:04 PM Venedict Tchistopolskii <
>>> veny...@gmail.com> wrote:
>>>
 tl;dr, the below does not work for me:

 The resulting moc_.cpp files are generated in custom
 directories and automatically included in a generated
 /mocs_compilation.cpp file, *which is compiled as
 part of the target. (nope)*

 On Mon, Jan 28, 2019 at 10:06 PM Venedict Tchistopolskii <
 veny...@gmail.com> wrote:

> The first CMake generation pass: Generates but no inclusion
>
>
>
> *Forcing a second pass makes it include the newly generated moc.*
> It says *"AutoMoc: Generating 'X' because the MOC settings
> changed"*
>
> I'm not too clear on why this is happening, any ideas on how to fix
> it, or force it to reload whatever 'moc settings' are changing?
>
> Possibly related: https://gitlab.kitware.com/cmake/cmake/issues/17456
>
> e.g. mocs_compilation.cpp and include_ folder -> Created but not
> added until CMake re-run
>

-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-29 Thread Venedict Tchistopolskii
*Lots more testing, traced down a possible issue here involving PCH and
mocs_compilation.cpp:*
get_target_property(HAS_AUTOMOC ${TargetProject} AUTOMOC)
if (HAS_AUTOMOC STREQUAL "TRUE")
set (MOC_COMPILATION
"${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.cpp")
# stdafx.h needs to be included to ensure platform definitions are visible
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")
endif()

*If this is ignored, then mocs_compilation.cpp is visible in solution
explorer post generation (no need to build). Build ofc proceeds fine, no
unresolved externals/etc.*

*Please advise.*

*VT*

On Mon, Jan 28, 2019 at 11:25 PM Venedict Tchistopolskii 
wrote:

> Current automoc settings more or less, it's a solution with a few projects
> some of which are marked AUTOMOC:
> ## Relative to root in solution explorer
> set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER
> "${VS_FOLDER_PREFIX}/Sandbox/AUTOMOC_Targets")
> ## Relative to each project
> set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "AUTOMOC_Generated")
>
> AUTOGEN_TARGETS_FOLDER doesn't get created, but in CMake 3.12 it did the
> same and worked.
>
> AUTOMOC_Generated gets created (per project ofc) and added in CMake 3.12
> during the build.
> For CMake 3.13 it gets created, but not added (not visible in solution
> explorer) during build, gotta re-run CMake to include it.
>
> On Mon, Jan 28, 2019 at 11:04 PM Venedict Tchistopolskii <
> veny...@gmail.com> wrote:
>
>> tl;dr, the below does not work for me:
>>
>> The resulting moc_.cpp files are generated in custom
>> directories and automatically included in a generated
>> /mocs_compilation.cpp file, *which is compiled as
>> part of the target. (nope)*
>>
>> On Mon, Jan 28, 2019 at 10:06 PM Venedict Tchistopolskii <
>> veny...@gmail.com> wrote:
>>
>>> The first CMake generation pass: Generates but no inclusion
>>>
>>>
>>>
>>> *Forcing a second pass makes it include the newly generated moc.*
>>> It says *"AutoMoc: Generating 'X' because the MOC settings changed"*
>>>
>>> I'm not too clear on why this is happening, any ideas on how to fix it,
>>> or force it to reload whatever 'moc settings' are changing?
>>>
>>> Possibly related: https://gitlab.kitware.com/cmake/cmake/issues/17456
>>>
>>> e.g. mocs_compilation.cpp and include_ folder -> Created but not
>>> added until CMake re-run
>>>
>>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-28 Thread Venedict Tchistopolskii
Current automoc settings more or less, it's a solution with a few projects
some of which are marked AUTOMOC:
## Relative to root in solution explorer
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER
"${VS_FOLDER_PREFIX}/Sandbox/AUTOMOC_Targets")
## Relative to each project
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "AUTOMOC_Generated")

AUTOGEN_TARGETS_FOLDER doesn't get created, but in CMake 3.12 it did the
same and worked.

AUTOMOC_Generated gets created (per project ofc) and added in CMake 3.12
during the build.
For CMake 3.13 it gets created, but not added (not visible in solution
explorer) during build, gotta re-run CMake to include it.

On Mon, Jan 28, 2019 at 11:04 PM Venedict Tchistopolskii 
wrote:

> tl;dr, the below does not work for me:
>
> The resulting moc_.cpp files are generated in custom
> directories and automatically included in a generated
> /mocs_compilation.cpp file, *which is compiled as part
> of the target. (nope)*
>
> On Mon, Jan 28, 2019 at 10:06 PM Venedict Tchistopolskii <
> veny...@gmail.com> wrote:
>
>> The first CMake generation pass: Generates but no inclusion
>>
>>
>>
>> *Forcing a second pass makes it include the newly generated moc.*
>> It says *"AutoMoc: Generating 'X' because the MOC settings changed"*
>>
>> I'm not too clear on why this is happening, any ideas on how to fix it,
>> or force it to reload whatever 'moc settings' are changing?
>>
>> Possibly related: https://gitlab.kitware.com/cmake/cmake/issues/17456
>>
>> e.g. mocs_compilation.cpp and include_ folder -> Created but not
>> added until CMake re-run
>>
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-28 Thread Venedict Tchistopolskii
tl;dr, the below does not work for me:

The resulting moc_.cpp files are generated in custom directories
and automatically included in a generated
/mocs_compilation.cpp file, *which is compiled as part
of the target. (nope)*

On Mon, Jan 28, 2019 at 10:06 PM Venedict Tchistopolskii 
wrote:

> The first CMake generation pass: Generates but no inclusion
>
>
>
> *Forcing a second pass makes it include the newly generated moc.*
> It says *"AutoMoc: Generating 'X' because the MOC settings changed"*
>
> I'm not too clear on why this is happening, any ideas on how to fix it, or
> force it to reload whatever 'moc settings' are changing?
>
> Possibly related: https://gitlab.kitware.com/cmake/cmake/issues/17456
>
> e.g. mocs_compilation.cpp and include_ folder -> Created but not added
> until CMake re-run
>
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

2019-01-28 Thread Venedict Tchistopolskii
The first CMake generation pass: Generates but no inclusion



*Forcing a second pass makes it include the newly generated moc.*
It says *"AutoMoc: Generating 'X' because the MOC settings changed"*

I'm not too clear on why this is happening, any ideas on how to fix it, or
force it to reload whatever 'moc settings' are changing?

Possibly related: https://gitlab.kitware.com/cmake/cmake/issues/17456

e.g. mocs_compilation.cpp and include_ folder -> Created but not added
until CMake re-run
-- 

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:
https://cmake.org/mailman/listinfo/cmake-developers