Re: [CMake] CMake on Raspberry Pi

2018-05-20 Thread Andreas Mohr
Hi,

On Sun, May 20, 2018 at 08:35:31PM -0400, cmake-requ...@cmake.org wrote:
> Date: Mon, 21 May 2018 08:11:13 +0800
> From: Shawn G 

>  Hi there, im having some troubles installing CMake on raspberry pi 3
> running raspbian stretch.
> I keep getting this error message when i run the command "sudo apt-get
> install build-essential cmake pkg-config"
> The error message:
> " Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package CMake is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> 
> E: Package 'cmake' has no installation candidate "

# apt-cache policy cmake
cmake:
  Installed: 3.7.2-1
  Candidate: 3.7.2-1
  Version table:
 *** 3.7.2-1 500
500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages
100 /var/lib/dpkg/status

(possibly your /etc/apt/sources* setup does not have
working/updated info for stretch/main repo?)

HTH,

Andreas Mohr

-- 
Das "S" in "IoT" steht für "Security"
[Signatur von betateilchen:
https://forum.fhem.de/index.php/topic,23008.msg163661.html#msg163661 ]
-- 

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-commits] CMake branch, master, updated. v3.11.2-799-ge5463ec

2018-05-20 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  e5463ec9174df74baaa6c66cc2555e11fb13d4c0 (commit)
  from  32cf27ada5c28fa1e0bb387436f26c1a4adf2b81 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5463ec9174df74baaa6c66cc2555e11fb13d4c0
commit e5463ec9174df74baaa6c66cc2555e11fb13d4c0
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Mon May 21 00:01:05 2018 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Mon May 21 00:01:05 2018 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c8c007b..c6ab633 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 11)
-set(CMake_VERSION_PATCH 20180520)
+set(CMake_VERSION_PATCH 20180521)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


Re: [CMake] CMake on Raspberry Pi

2018-05-20 Thread Haocheng Liu
Hi Shawn,

On Sun, May 20, 2018 at 8:11 PM, Shawn G  wrote:

> Hi there, im having some troubles installing CMake on raspberry pi 3
> running raspbian stretch.
> I keep getting this error message when i run the command "sudo apt-get
> install build-essential cmake pkg-config"
> The error message:
> " Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package CMake is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
>
> E: Package 'cmake' has no installation candidate "
>
> I've tried other installation methods like "pip install cmake" & "sudo
> apt-get install -y cmake" but all to no avail. Could you guys help me out?
> Is there a library i can extract from?
>
> A better question might be want kind of OS are you running on your
raspberry Pi? I used to use the same command to install cmake on RASPBIAN 9
and it installs CMake 3.7.2 fine.

> Thank you in advance.
>
> --
>
> 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
>
>


-- 
Best regards
Haocheng

Haocheng LIU
Kitware, Inc.
R Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4421 <(518)%20881-4421>
-- 

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 on Raspberry Pi

2018-05-20 Thread Shawn G
 Hi there, im having some troubles installing CMake on raspberry pi 3
running raspbian stretch.
I keep getting this error message when i run the command "sudo apt-get
install build-essential cmake pkg-config"
The error message:
" Reading package lists... Done
Building dependency tree
Reading state information... Done
Package CMake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'cmake' has no installation candidate "

I've tried other installation methods like "pip install cmake" & "sudo
apt-get install -y cmake" but all to no avail. Could you guys help me out?
Is there a library i can extract from?

Thank you in advance.
-- 

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-developers] "Linking" of Object Libraries

2018-05-20 Thread Gößwein Matthias / eeas gmbh
Hello,

I found a strange behavior within the object libraries in the upcoming
CMake 3.12 (I used 3.11.20180519-gdb88f for testing).

If I have for example two object libraries, which are used in one
executable:

add_library(ObjLib1 OBJECT ObjLib1.c)
target_include_directories(ObjLib1 PUBLIC ...)

add_library(ObjLib2 OBJECT ObjLib2.c)
target_include_directories(ObjLib2 PUBLIC ...)

add_executable(MyExe main.c)
target_link_libraries(MyExe ObjLib1 ObjLib2)

Then this works fine. But if for some reason one object library "links"
to the other and this is used for the executable then it does not work:

add_library(ObjLib1 OBJECT ObjLib1.c)
target_include_directories(ObjLib1 PUBLIC ...)
target_link_libraries(ObjLib1 PUBLIC ObjLib2)

add_library(ObjLib2 OBJECT ObjLib2.c)
target_include_directories(ObjLib2 PUBLIC ...)

add_executable(MyExe main.c)
target_link_libraries(MyExe ObjLib1)

I only get the usage requirements of ObjLib2, but not the object files
of ObjLib2 into the executable. If I use STATIC Libraries instead it works.
Is this behavior intended? I read the documentation too and i know that
there is no link step for object libraries, but I guess it's the same
for the static libraries (they are not linked together, instead both are
used on the link line of the executable). A similar solution would be
nice for object libraries, because otherwise the usage of object
libraries which depend on other object libraries is not working well.

Right now to get the compilation working I have to either use the
TARGET_OBJECTS generator expression at the add_executable command, or I
have to link explicit to ObjLib2 for the executable:

add_executable(MyExe main.c $)

or

target_link_libraries(MyExe ObjLib1 ObjLib2)

For both possibilities I have to repeat in some sort the dependency and
it gets worse if the depth of the dependencies is going deeper.

Best regards,
Matthias.


-- 

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] Detecting compilation option and flags

2018-05-20 Thread Lars Christensen
I rely on these to detect options and flags:

$
$

But not all options are picked up. These are missing:

1. Debug flag (when CMAKE_BUILD_TYPE=Debug)
2. -std=xx (CMAKE_CXX_STANDARD)

How can I reliably detect ALL compilation flags for a target?

Picking up these two flags is required for my pre-compiled header cmake
hack[1]. It used to work OK. I guess Debug can be detected and picked up
from _FLAGS_DEBUG, but I don't see a way to pick up -std=.

Lars

1) https://github.com/larsch/cmake-precompiled-header/
-- 

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] Approach to both shared and static lib (again, sorry)

2018-05-20 Thread Elvis Stansvik
2018-05-20 4:19 GMT+02:00 Ray Donnelly :
> On Sat, May 19, 2018 at 11:55 PM, Elvis Stansvik
>  wrote:
>> 2018-05-19 21:49 GMT+02:00 Mateusz Loskot :
>>> On 19 May 2018 at 15:00, Elvis Stansvik  
>>> wrote:
 I know this has been asked before, but I've never seen a really
 authoritative answer.

 Say I have a simple single-library project.

 The advise I've seen is to not pass SHARED or STATIC to the
 add_library(..), but instead let the user pass
 -DBUILD_SHARED_LIBS:BOOL=ON/OFF to build the library as either shared
 or static.

 That's fine, but leads to packagers having to do ugly things like e.g:

 https://salsa.debian.org/hle/dlib/blob/master/debian/rules

 That is, do two separate configure/build/install, in order to get both
 a shared and static version.
>>>
>>> IMHO, there is nothing ugly in this approach.
>>> Not every system allows (or recomments) to generate both,
>>> static and shared, from the same object files.
>>
>> Alright. Yes I'm probably personally leaning towards just using the
>> recommended way, with a single add_library(..) and demand
>> reconfigure/rebuild/reinstall to get both variants. I was mostly
>> curious if you CMake pros on this list had some neat solution I hadn't
>> seen before.
>>
>> Note that I wasn't necessarily suggesting building shared + static
>> from the same set of object files (which is indeed not recommended,
>> e.g. think of -fPIC),
>
> Static libraries should be compiled with -fPIC on all systems that
> support -fPIC. The reason for this is that you should not make
> assumptions about the final target of the static library. There is no
> reason it should be excluded from being linked into a shared library
> or a ASLR capable executable. On Anaconda Distribution, everything is
> compiled with -fPIC on Linux for this reason, and on macOS, -fPIC is
> the only option and Windows has always been PIC or at least for as
> long as I can remember.

Alright, this was some good bit of info, since I had mostly seen "PIC
unnecessarily hurts performance for static libs" kind of advice out
there.

Thinking about it, in my case, even if PIC did hurt performance a bit,
I don't think it's much enough that I should care, for my use case at
least.

So, with that in mind, is anyone doing this:

- Build an object library (with POSITION_INDEPENDENT_CODE)
- Build a static library from the object library
- Build a shared library from the object library

? Any downsides/gotchas with this approach?

The upsides I see are:

1. Sources are compiled once, and the result linked twice.
2. No need for a variable to hold the list of sources.

Time savings of 1 may be negligible though, if linking is the lion
share of the time (my project is tiny though, so I'm not concerned
about build time savings).

Elvis

>
> but just looking for best practices when having
>> CMake do the build of both libraries as part of the same build.
>>
>> Elvis
>>
>>> Why not view static vs shared as the similar to 32 vs 64 bit?
>>>
>>> Best regards,
>>> --
>>> Mateusz Loskot, http://mateusz.loskot.net
>>> --
>>>
>>> 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
-- 

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