[CMake] Visual Studio 2015 Generator crash 3.13

2018-11-22 Thread Harry Mallon
Hi,

I just updated to CMake 3.13 (to get the IPO in Visual Studio). I am using 
Visual Studio Build tools 2017 (with 2015 extra tools installed).

This crashes (without any feedback):
call "C:\Program Files (x86)\Microsoft Visual 
Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_x64 
-vcvars_ver=14.0
cmake -Ax64 -G"Visual Studio 14 2015" -DHDE_CREATE_DOCS=%MAKE_DOCS% 
-DBOOST_ROOT="C:\Libraries\boost_1_66_0" ../

However this works fine:
cmake -Ax64 -G"Visual Studio 15 2017" -DHDE_CREATE_DOCS=%MAKE_DOCS% 
-DBOOST_ROOT="C:\Libraries\boost_1_66_0" ../

Any ideas? I don’t have a debugger on Windows to look at it at the moment.

Best,
Harry

Harry Mallon

Senior Software Engineer

[http://codex.online/?action=asset&id=E3D62C3D-A12C-447D-87A5-F36E7C2AA9A4]

T +44 203 7000 989

60 Poland Street | London | England | W1F 7NT

[http://admin.codex.online/?action=asset&id=132CD8A9-76B5-48B4-80D3-F5E5C57FB76E]
A Star is Born  Halloween   13 Reasons Why


-- 

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


Re: [CMake] CPack RPM: file XXX conflicts with file from package filesystem-yyy...

2018-11-22 Thread Eric Noulard
Le jeu. 22 nov. 2018 à 16:16, Mario Emmenlauer  a écri

>
> I'm trying to build an RPM with CPack, and everything seems to work,
> but the resulting package can not be installed. I get Transaction check
> error:
>   file / from install of  conflicts with file from package
> filesystem-3.2-25.el7.x86_64
>   file /opt from install of  conflicts with file from package
> filesystem-3.2-25.el7.x86_64
>   file /usr/bin from install of  conflicts with file from
> package filesystem-3.2-25.el7.x86_64
>   file /usr/share from install of  conflicts with file from
> package filesystem-3.2-25.el7.x86_64
>   file /usr from install of  conflicts with file from package
> filesystem-3.2-25.el7.x86_64
>
> I've read in the CPackRPM source code about how to add excludes and
> CPackRPM says that my "Final list of path to OMIT in RPM" would be
>
> /etc;/etc/init.d;/usr;/usr/bin;/usr/include;/usr/lib;/usr/libx32;/usr/lib64;/usr/share;/usr/share/aclocal;/usr/share/doc;/opt;/usr/share/applications
>

You can read the doc too:
https://cmake.org/cmake/help/v3.13/cpack_gen/rpm.html#variable:CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST


I can see that the conflicting directories are removed from
> CPACK_RPM_INSTALL_FILES. But that does not satisfy rpm :-(
>
> Could someone shed some light? I believe that the problem may be
> my install command: I call install only once for the full tree
> of files that I'd like to package:
>   install(DIRECTORY "${INSTALL_TMP_ROOT}/" DESTINATION "/"
> USE_SOURCE_PERMISSIONS)
>

Yep this is looking for trouble.
How did you build the "${INSTALL_TMP_ROOT}" in the first place?

Can't you use relative path install DESTINATION ? For all files/target you
build?


> I have a wild guess that this install somehow includes the
> directories, and probably it would be better to just call install
> on the individual files?


CPack RPM tries its best to avoid shipping directories he does not need to
ship, but
RPM requires that any new (non shared) directory should be specified in the
spec file,
so CPackRPM tries to "discover that" automatically and make the package
relocatable.

Installing a whole directory to an absolute DESTINATION (even "/" in you
case) is probably
giving tough time to CPackRPM.


> I would prefer not to call install on the
> individual files because that overrides file permissions for every
> file, and I carefully prepared my package upfront to have the
> exact permissions for installation.
>

How did you "carefully prepared my package upfront" ?
And what do you mean by
"because that overrides file permissions for every file"

one more question, could you tell us which version of CPack/CMake you are
using?


-- 
Eric
-- 

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


[CMake] CPack RPM: file XXX conflicts with file from package filesystem-yyy...

2018-11-22 Thread Mario Emmenlauer


I'm trying to build an RPM with CPack, and everything seems to work,
but the resulting package can not be installed. I get Transaction check
error:
  file / from install of  conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /opt from install of  conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /usr/bin from install of  conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /usr/share from install of  conflicts with file from package 
filesystem-3.2-25.el7.x86_64
  file /usr from install of  conflicts with file from package 
filesystem-3.2-25.el7.x86_64

I've read in the CPackRPM source code about how to add excludes and
CPackRPM says that my "Final list of path to OMIT in RPM" would be
/etc;/etc/init.d;/usr;/usr/bin;/usr/include;/usr/lib;/usr/libx32;/usr/lib64;/usr/share;/usr/share/aclocal;/usr/share/doc;/opt;/usr/share/applications

I can see that the conflicting directories are removed from
CPACK_RPM_INSTALL_FILES. But that does not satisfy rpm :-(

Could someone shed some light? I believe that the problem may be
my install command: I call install only once for the full tree
of files that I'd like to package:
  install(DIRECTORY "${INSTALL_TMP_ROOT}/" DESTINATION "/" 
USE_SOURCE_PERMISSIONS)

I have a wild guess that this install somehow includes the
directories, and probably it would be better to just call install
on the individual files? I would prefer not to call install on the
individual files because that overrides file permissions for every
file, and I carefully prepared my package upfront to have the
exact permissions for installation.

Any help would be greatly appreciated!

All the best,

Mario Emmenlauer
-- 

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


Re: [CMake] Can I make ProjectGuid value in Visual Studio C++ project file (vcxproj) set manually?

2018-11-22 Thread tonka3...@gmail.com
Simple question. Why you want the same guid again?

> Am 22.11.2018 um 10:49 schrieb Hyunjik Bae :
> 
> Can I make ProjectGuid value in Visual Studio C++ project file (vcxproj) set 
> manually?
> 
> Every time I create vcxproj files from CMake, the ProjectGuid is sometimes 
> changed. Other C++ projects have build dependency to the CMake-generated 
> vcxproj files, however, whenever ProjectGuid becomes different, the build 
> dependency is lost.
> 
> Best Regards,
> Hyunjik
> -- 
> 
> 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

-- 

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


[CMake] CMake 3.13 Interprocedural Optimization for Visual C++: Whole Program Optimization (LTCG)

2018-11-22 Thread Niels Dekker
I'm very pleased that CMake 3.13 (just released) includes the "IPO for 
VS" feature that I implemented, with help from Brad Kind: it allows 
enabling Whole Program Optimization (Link Time Code Generation) on a 
Visual C++ project, by means of CMake flag INTERPROCEDURAL_OPTIMIZATION.


Visual Studio offers this option (LTCG) for more than a decade already, 
within the IDE. I'm glad that it's now also directly available to 
VS/CMake users.


In general, I would suggest to enable this option only for a Release 
build. As follows:


  project(MyProject)
  add_executable(MyProject MyMain.cpp MySource.cpp)
  set_property(TARGET MyProject PROPERTY 
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)


I'm interested to hear from other VS/CMake users if they find this new 
option helpful. And specifically whether they experience a significant 
performance gain from their application, after enabling IPO.


Note that my request to enable IPO "by default" for Release 
configurations has been rejected, at least for the time being: 
https://gitlab.kitware.com/cmake/cmake/issues/17720  So for now, users 
have to explicitly switch on this option.



Kind regards, Niels
--
Niels Dekker
Scientific programmer
LKEB, Leiden University Medical Center
--

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


[CMake] Can I make ProjectGuid value in Visual Studio C++ project file (vcxproj) set manually?

2018-11-22 Thread Hyunjik Bae
Can I make ProjectGuid value in Visual Studio C++ project file (vcxproj)
set manually?

Every time I create vcxproj files from CMake, the ProjectGuid is sometimes
changed. Other C++ projects have build dependency to the CMake-generated
vcxproj files, however, whenever ProjectGuid becomes different, the build
dependency is lost.

Best Regards,
Hyunjik
-- 

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