[CMake] Referencing an OBJECT library

2017-07-20 Thread Edward Diener
According to the CMake docs for an OBJECT library called, let's say, 'xxx', the reference to that OBJECT library is through $. I understand this but I am curious about the reason for such syntax. After all a STATIC or SHARED library 'xxx' you can just use xxx to refer to the library. Why the di

Re: [CMake] file(COPY) is copying even if file hasn't changed

2017-07-20 Thread Nicholas Devenish
For what it's worth, I'm not seeing this on Sierra 10.12.5, CMake 3.9.0 on a simple test case of: cmake_minimum_required(VERSION 3.5 FATAL_ERROR) file(COPY afile DESTINATION .) I ran through Instruments to check the otherwise silent copy, it copies the first time but thereafter only stat

Re: [CMake] file(COPY) is copying even if file hasn't changed

2017-07-20 Thread Robert Dailey
FYI I decided to file an issue for this here: https://gitlab.kitware.com/cmake/cmake/issues/17087 On Wed, Jul 19, 2017 at 4:05 PM, Robert Dailey wrote: > Oh also file(INSTALL) does the same thing; the "Installing:" message > gets printed each time for the same file, and never says that it is > "u

Re: [CMake] [cmake-developers] Best way to append "--no-undefined" to shared link flags?

2017-07-20 Thread Brad King
On 07/18/2017 04:52 PM, Robert Dailey wrote: > set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} > -Wl,--no-undefined" ) That's fine, but you can use `string(APPEND)` to shorten the code: string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,--no-undefined") > After talking more with th

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Eric Noulard
2017-07-20 13:48 GMT+02:00 Kristian : > Ok, I changed the postinstall script based on your suggestions: > > i.e. I changed these two lines: > > WEB_GROUP_ID="$(getent group "${WEB_GROUP}" | cut -d: -f3)" > and > > useradd "$WEB_USER" -g "${WEB_GROUP}" -M -r -s /sbin/nologin -c > > And it worked no

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Kristian
Ok, I changed the postinstall script based on your suggestions: i.e. I changed these two lines: > WEB_GROUP_ID="$(getent group "${WEB_GROUP}" | cut -d: -f3)" and > useradd "$WEB_USER" -g "${WEB_GROUP}" -M -r -s /sbin/nologin -c And it worked now. Thank you for your help. :) 2017-07-20 12:35 GM

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Eric Noulard
2017-07-20 12:01 GMT+02:00 Kristian : > Hi, > > thank you for your reply. Yes, I add the script with > > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ > postinstall") > > and it basically works, because this file is changing a settings file > without any problems. Only the a

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Kristian
Hi, thank you for your reply. Yes, I add the script with > set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE > "${CMAKE_CURRENT_SOURCE_DIR}/postinstall") and it basically works, because this file is changing a settings file without any problems. Only the add of the group and the user does not work, somehow

Re: [CMake] Create user and group with CPack

2017-07-20 Thread Eric Noulard
2017-07-20 10:39 GMT+02:00 Kristian : > Hi, > > I create a RPM package with CPack. When installing this package on a > target system, it should create an additional user and group. > > My current solution is a postinstall script, wich runs at the end of > the installation. There, I added commands

Re: [CMake] CPack Multicore Usage

2017-07-20 Thread Konstantin Tokarev
20.07.2017, 11:22, "Jörg Kreuzberger" : > Hi > > My Project is compiling multicore without any problems using Unix makefiles > or ninja. > > In calls to cpack only one core is used if Makefiles are used. Is there any > option to enable multicore? Yes, you should run make -jN, where N is a numb

[CMake] Create user and group with CPack

2017-07-20 Thread Kristian
Hi, I create a RPM package with CPack. When installing this package on a target system, it should create an additional user and group. My current solution is a postinstall script, wich runs at the end of the installation. There, I added commands to create a user and a group (groupadd, useradd). B

[CMake] CPack Multicore Usage

2017-07-20 Thread Jörg Kreuzberger
Hi My Project is compiling multicore without any problems using Unix makefiles or ninja. In calls to cpack only one core is used if Makefiles are used. Is there any option to enable multicore? If i use ninja in cpack builds, the cpack build is broken, cause there seems no dependencies consider