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 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-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


Re: [cmake-developers] Undocumented CMAKE_AUTOMOC_RELAXED_MODE changes in 3.13

2019-01-25 Thread Venedict Tchistopolskii
Actually, debugged a lot more and found this!

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?

Note: This affects both relaxed and non-relaxed mode, my fix was a dummy
because it involved regenerating cmake (ofc)which is the actual
solution.

VT

On Fri, Jan 25, 2019 at 12:07 PM Venedict Tchistopolskii 
wrote:

> Unfortunately the project is fairly, uhm, large.no small sample sorry.
>
> I'm not too familiar with the moc setup either, only reason I touched it
> is because it started failing after the CMake version update.
>
> If using relaxed mode, the moc files get generated but aren't included. So
> the standard "QT_OBJECT" setup is being detected but not added to VStudio
> v15.6.7 64 bit.
>
> It does use a fairly old QT version, QT 5.6.
>
> VT
>
> On Fri, Jan 25, 2019 at 10:49 AM Sebastian Holtermann 
> wrote:
>
>> Am Freitag, 25. Januar 2019, 17:36:22 CET schrieb Venedict Tchistopolskii:
>> > When updating the project CMake from 3.12 to 3.13,
>> > *CMAKE_AUTOMOC_RELAXED_MODE* stops including certain generated moc
>> files.
>> >
>> > Had to switch to *CMAKE_AUTOMOC *to get them included.strange
>> > functionality on the part of CMake.
>> >
>> > Can't find any documentation on these changes, and if/how they were
>> touched
>> > at all.
>>
>> This isn't an intentional behavior change.
>> Could you provide a minimal example that reproduces the problem?
>>
>> Also please feel free to open an issue here:
>> https://gitlab.kitware.com/cmake/cmake/issues
>>
>> -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
>>
>
-- 

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] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Gagh I'm stupid, missed the drop down, thanks for clarifying!

Much better now :)

VT

On Fri, Jan 25, 2019 at 2:48 PM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 14:06 -0800, Venedict Tchistopolskii wrote:
>
> Could you clarify on saving the build-directory section?
>
> I'm not sure how it knows which cache or build directory to load. In my
> setup here the issue I noted applies even if build directory is generated
> on both projects/etc.
>
> VT
>
>
> As a convenience, cmake-gui uses a QSettings object to store the last few
> build directories that it configured. These directories are populated in
> the build directory dropdown menu.
>
> The source directories are not stored in QSettings at all, but instead
> extracted from the build directories. If the build directory hasn't been
> configured, then CMake has no way of knowing what source directory to pick.
>
> Kyle
>
>
-- 

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] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Could you clarify on saving the build-directory section?

I'm not sure how it knows which cache or build directory to load. In my
setup here the issue I noted applies even if build directory is generated
on both projects/etc.

VT

On Fri, Jan 25, 2019 at 1:59 PM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 13:23 -0800, Venedict Tchistopolskii wrote:
>
> Get 2 CMake projects.
>
> Get CMake GUI to 'configure' one of them. Close/re-open and it will
> automatically point to this configured project source and build locations,
> regardless of what build/version/cmake-gui.exe you use.
>
> Run a different cmake-gui.exe through the CLI, passing in source and build
> locations. It will be properly load these instead of the 'last configured
> project' now.
>
> Now close it, without configuring, and re-open it normally without CLI
> overrides. Now it'll load the original project as if you've never set it to
> a different source/build location.
>
> tl;dr CMake loads the last-configured source/bin directory by default. If
> you don't configure (or pass override through CLI) it will keep loading the
> same project.
>
>
> Ah, I see what you mean.
>
> Saving the build path is easy: just add the command-line path to the cache
> of build directories on startup as well as at configure time.
>
> Saving the source path is more difficult. The GUI gets the source
> directory by scanning the files in the build directory. If the build
> directory hasn't been generated yet, then the GUI will have no idea where
> to find the source directory, unless we start caching source directories as
> well.
>
> I think, as you noted, you're better off just triggering "Configure"
> before closing the dialog.
>
> Kyle
>
>
-- 

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] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Get 2 CMake projects.

Get CMake GUI to 'configure' one of them. Close/re-open and it will
automatically point to this configured project source and build locations,
regardless of what build/version/cmake-gui.exe you use.

Run a different cmake-gui.exe through the CLI, passing in source and build
locations. It will be properly load these instead of the 'last configured
project' now.

Now close it, without configuring, and re-open it normally without CLI
overrides. Now it'll load the original project as if you've never set it to
a different source/build location.

tl;dr CMake loads the last-configured source/bin directory by default. If
you don't configure (or pass override through CLI) it will keep loading the
same project.

VT

On Fri, Jan 25, 2019 at 1:19 PM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 12:55 -0800, Venedict Tchistopolskii wrote:
>
> Cherry picked and tested. Works great, thank you!
>
>
> Great, glad to hear it!
>
> Now, if only the source/build path would stick around, without requiring
> config to be triggered. :P
>
>
> Can you clarify what you mean by this?
>
> Kyle
>
>
-- 

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] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Cherry picked and tested. Works great, thank you!

Now, if only the source/build path would stick around, without requiring
config to be triggered. :P

On Fri, Jan 25, 2019 at 8:56 AM Kyle Edwards 
wrote:

> Venedict,
>
> Currently, cmake-gui only lets you specify a build or source directory,
> not both.
>
> I've opened https://gitlab.kitware.com/cmake/cmake/merge_requests/2863 to
> add explicit -S and -B options to cmake-gui, which will allow you to
> specify both.
>
> Kyle
>
> On Fri, 2019-01-25 at 08:10 -0800, Venedict Tchistopolskii wrote:
>
> Actually that doesn't work.
> *cmake-gui.exe "D:/GitHub/SOURCE" "D:/GitHub/SOURCE/solutions_cmake/win64"*
>
> Ignores both options, but
> *cmake-gui.exe "D:/GitHub/SOURCE"*
>
> Uses current directory as noted. Why? Syntax wrong or something?
>
> VT
>
>
> On Fri, Jan 25, 2019 at 6:52 AM Kyle Edwards 
> wrote:
>
> On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh wrote:
> > However, the manual does not describe this behavior, maybe it should
> > be
> > mentioned there.
> > (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)
>
> Even better, perhaps we should add explicit -B and -S options the way
> cmake and ccmake already do.
>
> Kyle
>
>
-- 

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] Undocumented CMAKE_AUTOMOC_RELAXED_MODE changes in 3.13

2019-01-25 Thread Venedict Tchistopolskii
Unfortunately the project is fairly, uhm, large.no small sample sorry.

I'm not too familiar with the moc setup either, only reason I touched it is
because it started failing after the CMake version update.

If using relaxed mode, the moc files get generated but aren't included. So
the standard "QT_OBJECT" setup is being detected but not added to VStudio
v15.6.7 64 bit.

It does use a fairly old QT version, QT 5.6.

VT

On Fri, Jan 25, 2019 at 10:49 AM Sebastian Holtermann 
wrote:

> Am Freitag, 25. Januar 2019, 17:36:22 CET schrieb Venedict Tchistopolskii:
> > When updating the project CMake from 3.12 to 3.13,
> > *CMAKE_AUTOMOC_RELAXED_MODE* stops including certain generated moc files.
> >
> > Had to switch to *CMAKE_AUTOMOC *to get them included.strange
> > functionality on the part of CMake.
> >
> > Can't find any documentation on these changes, and if/how they were
> touched
> > at all.
>
> This isn't an intentional behavior change.
> Could you provide a minimal example that reproduces the problem?
>
> Also please feel free to open an issue here:
> https://gitlab.kitware.com/cmake/cmake/issues
>
> -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
>
-- 

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] Undocumented CMAKE_AUTOMOC_RELAXED_MODE changes in 3.13

2019-01-25 Thread Venedict Tchistopolskii
When updating the project CMake from 3.12 to 3.13,
*CMAKE_AUTOMOC_RELAXED_MODE* stops including certain generated moc files.

Had to switch to *CMAKE_AUTOMOC *to get them included.strange
functionality on the part of CMake.

Can't find any documentation on these changes, and if/how they were touched
at all.

VT
-- 

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] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Actually that doesn't work.
*cmake-gui.exe "D:/GitHub/SOURCE" "D:/GitHub/SOURCE/solutions_cmake/win64"*

Ignores both options, but
*cmake-gui.exe "D:/GitHub/SOURCE"*

Uses current directory as noted. Why? Syntax wrong or something?

VT


On Fri, Jan 25, 2019 at 6:52 AM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh wrote:
> > However, the manual does not describe this behavior, maybe it should
> > be
> > mentioned there.
> > (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)
>
> Even better, perhaps we should add explicit -B and -S options the way
> cmake and ccmake already do.
>
> Kyle
>
-- 

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] Controlling CMake GUI source/build directory from CLI

2019-01-24 Thread Venedict Tchistopolskii
Basically I want to launch the CMake GUI and pass in source/build
directories through the CLI, overriding whatever it has at the moment.

Is that possible? I don't get where it's picking up the previously touched
source build but I want to override it consistently.

E.g. cmake-gui.exe -H -B won't work.

This is for a project wrapper that handles CMake launch and preparation.

VT
-- 

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] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Venedict Tchistopolskii
*Thank you! Sorry for the mess. Builds now :)*

*Just an FYI, I'm using this Preload.cmake file:*
## Required to build GUI
set(CMAKE_PREFIX_PATH "C:\\Qt\\5.12.0\\msvc2017_64" CACHE STRING "" FORCE)
set(BUILD_QtDialog ON CACHE BOOL "" FORCE)

## Standerdizing build options for 64-bit CMake
set(CMAKE_GENERATOR "Visual Studio 15 2017 Win64" CACHE INTERNAL "" FORCE)
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/standalone" CACHE
STRING "" FORCE)

*Makes it easier to standardize.*

*VT*

On Thu, Jan 24, 2019 at 12:36 PM Kyle Edwards 
wrote:

> On Thu, 2019-01-24 at 12:31 -0800, Venedict Tchistopolskii wrote:
>
> Nevermind, fixed the cmake-gui.
>
>
> Ah OK, then disregard my response.
>
> Would be nice to know how to triger the proper install/release config from
> VStudio, atm I do this:
> cmake . --target install --config Release
>
>
> This looks correct for doing it on the command line.
>
> The VStudio solution should have an "INSTALL" project which does what you
> want.
>
> Kyle
>
>
-- 

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] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Venedict Tchistopolskii
Nevermind, fixed the cmake-gui.

Would be nice to know how to triger the proper install/release config from
VStudio, atm I do this:
cmake . --target install --config Release

On Thu, Jan 24, 2019 at 12:25 PM Venedict Tchistopolskii 
wrote:

> The install command auto-installs release right?
> How do I trigger this 'install' from VStudio?
> Is building in VStudio enough before install?
> e.g. generate solution -> build in VStudio -> run install command in CLI?
> Just not sure on the proper flow because I use VStudio to
> debug/modify/test CMake.
>
> Additionally with this setup cmake-gui.exe can't find Qt5widgets etc. no
> matter what I do.
>
> It finds it if I use the .exe built by VStudio.
>
> On Thu, Jan 24, 2019 at 9:37 AM Kyle Edwards 
> wrote:
>
>> On Thu, 2019-01-24 at 12:36 -0500, Kyle Edwards wrote:
>>
>> cmake --build . --target install
>> windeployqt C:/Path/To/Where/I/Want/To/Install/bin/cmake.exe
>>
>>
>> Oops - this should obviously be
>> C:/Path/To/Where/I/Want/To/Install/bin/cmake-gui.exe.
>>
>> Kyle
>>
>
-- 

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] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Venedict Tchistopolskii
The install command auto-installs release right?
How do I trigger this 'install' from VStudio?
Is building in VStudio enough before install?
e.g. generate solution -> build in VStudio -> run install command in CLI?
Just not sure on the proper flow because I use VStudio to debug/modify/test
CMake.

Additionally with this setup cmake-gui.exe can't find Qt5widgets etc. no
matter what I do.

It finds it if I use the .exe built by VStudio.

On Thu, Jan 24, 2019 at 9:37 AM Kyle Edwards 
wrote:

> On Thu, 2019-01-24 at 12:36 -0500, Kyle Edwards wrote:
>
> cmake --build . --target install
> windeployqt C:/Path/To/Where/I/Want/To/Install/bin/cmake.exe
>
>
> Oops - this should obviously be
> C:/Path/To/Where/I/Want/To/Install/bin/cmake-gui.exe.
>
> Kyle
>
-- 

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] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Venedict Tchistopolskii
Er, lemme clarify.

Can cmake-gui.exe be built along with cmake if using the install path
setting? I currently use windeployqt to handle gui dependencies.

On Thu, Jan 24, 2019 at 9:23 AM Venedict Tchistopolskii 
wrote:

> I was building it via VStudio and generating the solution via CMake, is
> that wrong?
>
> I need cmake-gui.exe to be built too, would that work with this install
> path setting?
>
> VT
>
> On Thu, Jan 24, 2019 at 9:12 AM Kyle Edwards 
> wrote:
>
>> I forgot to mention - building it this way doesn't require the use of a
>> toolchain file - it was in response to this:
>>
>> > *Trying to do so because building CMake without toolchain gives me the
>> below; After I move cmake.exe to another directory:*
>>
>> If you build it as I laid out below, you won't need a toolchain file.
>> Hope this helps!
>>
>> Kyle
>>
>>
>> On Thu, 2019-01-24 at 12:09 -0500, Kyle Edwards wrote:
>>
>> Venedict,
>>
>> To relocate cmake.exe, it's not sufficient to just copy the executable -
>> you have to install all of the modules along with it. You do this by
>> running the "install" target.
>>
>> Given a path to where you want to put CMake, you would build it like this:
>>
>> cmake C:/Path/To/CMake/Source
>> -DCMAKE_INSTALL_PREFIX=C:/Path/To/Where/I/Want/To/Install
>> cmake --build .
>> cmake --build . --target install
>>
>> This will install cmake.exe along with all of its dependencies.
>>
>> Kyle
>>
>> On Thu, 2019-01-24 at 08:42 -0800, Venedict Tchistopolskii wrote:
>>
>> Hey there!
>>
>> *Current toolchain file for compiling CMake using CMake (on WIndows):*
>> SET(CMAKE_SYSTEM_NAME Windows)
>> set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
>> set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
>> set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
>> set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
>> set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
>>
>> *Unfortunately this konks out with:*
>> CMake Error: The following variables are used in this project, but they
>> are set to NOTFOUND.
>> Please set them or make sure they are set and tested correctly in the
>> CMake files:
>> LIBMD_LIBRARY
>> linked by target "cmTC_356fd" in directory
>> D:/GitHub/custom_cmake/solutions_cmake/CMakeFiles/CMakeTmp
>>
>> *Trying to do so because building CMake without toolchain gives me the
>> below; After I move cmake.exe to another directory:*
>> CMake Error: Could not find CMAKE_ROOT !!!
>> CMake has most likely not been installed correctly.
>> Modules directory not found in
>>
>> Usage
>>
>>   cmake [options] 
>>   cmake [options] 
>>   cmake [options] -S  -B 
>>
>> Specify a source directory to (re-)generate a build system for it in the
>> current working directory.  Specify an existing build directory to
>> re-generate its build system.
>>
>> Run 'cmake --help' for more information.
>>
>>
>>
>> *Please advise!!*
>>
>> *VT*
>>
>>
>> --
>>
>> 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
>>
>>
-- 

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] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Venedict Tchistopolskii
I was building it via VStudio and generating the solution via CMake, is
that wrong?

I need cmake-gui.exe to be built too, would that work with this install
path setting?

VT

On Thu, Jan 24, 2019 at 9:12 AM Kyle Edwards 
wrote:

> I forgot to mention - building it this way doesn't require the use of a
> toolchain file - it was in response to this:
>
> > *Trying to do so because building CMake without toolchain gives me the
> below; After I move cmake.exe to another directory:*
>
> If you build it as I laid out below, you won't need a toolchain file. Hope
> this helps!
>
> Kyle
>
>
> On Thu, 2019-01-24 at 12:09 -0500, Kyle Edwards wrote:
>
> Venedict,
>
> To relocate cmake.exe, it's not sufficient to just copy the executable -
> you have to install all of the modules along with it. You do this by
> running the "install" target.
>
> Given a path to where you want to put CMake, you would build it like this:
>
> cmake C:/Path/To/CMake/Source
> -DCMAKE_INSTALL_PREFIX=C:/Path/To/Where/I/Want/To/Install
> cmake --build .
> cmake --build . --target install
>
> This will install cmake.exe along with all of its dependencies.
>
> Kyle
>
> On Thu, 2019-01-24 at 08:42 -0800, Venedict Tchistopolskii wrote:
>
> Hey there!
>
> *Current toolchain file for compiling CMake using CMake (on WIndows):*
> SET(CMAKE_SYSTEM_NAME Windows)
> set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
> set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
> set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
> set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
> set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
>
> *Unfortunately this konks out with:*
> CMake Error: The following variables are used in this project, but they
> are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the
> CMake files:
> LIBMD_LIBRARY
> linked by target "cmTC_356fd" in directory
> D:/GitHub/custom_cmake/solutions_cmake/CMakeFiles/CMakeTmp
>
> *Trying to do so because building CMake without toolchain gives me the
> below; After I move cmake.exe to another directory:*
> CMake Error: Could not find CMAKE_ROOT !!!
> CMake has most likely not been installed correctly.
> Modules directory not found in
>
> Usage
>
>   cmake [options] 
>   cmake [options] 
>   cmake [options] -S  -B 
>
> Specify a source directory to (re-)generate a build system for it in the
> current working directory.  Specify an existing build directory to
> re-generate its build system.
>
> Run 'cmake --help' for more information.
>
>
>
> *Please advise!!*
>
> *VT*
>
>
> --
>
> 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
>
>
-- 

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] Compiling static/stand-alone CMake.exe

2019-01-24 Thread Venedict Tchistopolskii
Hey there!

*Current toolchain file for compiling CMake using CMake (on WIndows):*
SET(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)

*Unfortunately this konks out with:*
CMake Error: The following variables are used in this project, but they are
set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake
files:
LIBMD_LIBRARY
linked by target "cmTC_356fd" in directory
D:/GitHub/custom_cmake/solutions_cmake/CMakeFiles/CMakeTmp

*Trying to do so because building CMake without toolchain gives me the
below; After I move cmake.exe to another directory:*
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in

Usage

  cmake [options] 
  cmake [options] 
  cmake [options] -S  -B 

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.



*Please advise!!*

*VT*
-- 

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 GUI "Stop" button does not halt exec_process

2019-01-16 Thread Venedict Tchistopolskii
That'd be great if it could be implemented. Is there any way to incorporate
that functionality into a custom CMake build?

I don't know the process to generate a custom CMake GUI exe, any resources
available on that>?

On Wed, Jan 16, 2019 at 12:52 PM frodak17  wrote:

>
>
> On Wed, Jan 16, 2019 at 3:27 PM Venedict Tchistopolskii 
> wrote:
>
>> Pressing "STOP" in the CMake GUI interface halts CMake itself but does
>> not stop any execute_process that is going on at the time. This makes it
>> hang until the process finishes, since no interrupt is sent..
>>
>> Aggravating when you're using an exterior script (e.g. a .exe or .py)
>> that e.g. handles package maintenance. Would hang up for the entire
>> duration of ~40 minutes unless you force kill that sub process.
>>
>> I think force-killing CMake GUI also won't forward the kill to the
>> exec_process, orphaning it.>.<
>>
>> My reproduction:
>> Windows 10
>> CMake script via CMakeLists.txt files
>> Executing a Python script PyInstalled into a .exe for windows use ->
>> Downloads and untars some SDK's and shows progress (plus a bit more) but
>> takes 40-70 minutes average.
>>
>> Canceling CMake won't cancel python script -> 70min hangup or requirement
>> to use task manage and force-kill subprocess.
>>
>> Let me know any suggestions or possible fixes
>> --
>>
>>
> I commented on this about a month ago:
>
>> Looks like this would require a code change how the GUI works and the
>> internal way execute_process works.  Now execute_process knows how to
>> cancel a process due to time out, but it didn't seem to check for anything
>> else.  Essentially it looks like execute_process needs to be signaled by
>> the button press to cancel the process in addition to checking for
>> timeout.  There are other internal interrupt flags that seem to be set when
>> the GUI stop button is pressed.  Anyways this is what I noticed in the
>> code base.
>>
>
> So in the execute_process function it sits in a loop waiting for the
> process to finish.  If the timeout occurs it kills the process.
> At the same time when the GUI stop button is pressed it sets some sort of
> abort flag that is used during command processing to quit processing
> commands.
> It seems that someone should be able to take this abort flag and use it to
> not only stop the command processing loop but to also have the
> execute_process timeout loop to kill the process if the abort flag is set.
>
> Best regards,
> F
>
-- 

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 GUI "Stop" button does not halt exec_process

2019-01-16 Thread Venedict Tchistopolskii
Pressing "STOP" in the CMake GUI interface halts CMake itself but does not
stop any execute_process that is going on at the time. This makes it hang
until the process finishes, since no interrupt is sent..

Aggravating when you're using an exterior script (e.g. a .exe or .py) that
e.g. handles package maintenance. Would hang up for the entire duration of
~40 minutes unless you force kill that sub process.

I think force-killing CMake GUI also won't forward the kill to the
exec_process, orphaning it.>.<

My reproduction:
Windows 10
CMake script via CMakeLists.txt files
Executing a Python script PyInstalled into a .exe for windows use ->
Downloads and untars some SDK's and shows progress (plus a bit more) but
takes 40-70 minutes average.

Canceling CMake won't cancel python script -> 70min hangup or requirement
to use task manage and force-kill subprocess.

Let me know any suggestions or possible fixes
-- 

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