[Cmake-commits] CMake branch, master, updated. v3.12.2-602-gf53bd80

2018-09-11 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  f53bd80de17546351a635a47434b2ac66b4100a7 (commit)
  from  344eb9c8dc3b16a524729cb66ad25fc1c127a02c (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=f53bd80de17546351a635a47434b2ac66b4100a7
commit f53bd80de17546351a635a47434b2ac66b4100a7
Author: Kitware Robot 
AuthorDate: Wed Sep 12 00:01:08 2018 -0400
Commit: Kitware Robot 
CommitDate: Wed Sep 12 00:01:08 2018 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 1e9f499..1819564 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 12)
-set(CMake_VERSION_PATCH 20180911)
+set(CMake_VERSION_PATCH 20180912)
 #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


[CMake] SOVERSION and Mac library id in shared library made from assembly files

2018-09-11 Thread René J . V . Bertin
Hi,

I have a little project that creates a shared library from a pair of assembly 
files. I've been trying to follow examples such that the generated library

- has versioning (libFastCompression.1.dylib on Mac or libFastCompression.so.1 
on Linux)
- has the full path as its ID on Mac


I get this in the projects I used as example, but not in this particular 
project.

Am I overlooking/forgetting something, or is what I'm looking for not 
implemented/supported for libraries built exclusively from assembly files?

The project: github.com/RJVB/lzvn

Thanks!

René
-- 

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] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Thompson, KT
Michael,

I agree heartily with your frustration concerning how CMake handles compiler 
flags -- especially when the FLAG strings seen in cmake-gui don't match the 
baseline flags used by the build.  I use a heavy handed, old-fashioned approach 
to solve this problem.

I ignore all of CMake's default compiler flags.  Instead of using CMake's 
defaults, I set these flags manually for every supported build environment. For 
example, I have a setflags.cmake file included from my top level CMakeLists.txt 
that contains logic that looks something like this:

if( NOT C_FLAGS_INITIALIZED )
  # only do this on the first pass through to avoid overwriting user added 
options.
  set( C_FLAGS_INITIALIZED "yes" CACHE INTERNAL "Are compiler flags already 
set?" )

  # Overwrite CMake's defaults...
  if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set( CMAKE_C_FLAGS"-Wall -pedantic -Wunused-macros" )
set( CMAKE_C_FLAGS_DEBUG  "-g -DDEBUG")
set( CMAKE_C_FLAGS_RELEASE"-O3 -DNDEBUG" )
set( CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE}" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -gdwarf-3" )
# in a similar fashion, provide CXX_FLAGS and Fortran_FLAGS

  elseif( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" )
set( CMAKE_C_FLAGS "/fp:precise /DWIN32 /D_WINDOWS /MP" )
...
  endif()
endif()

# Save the current compiler flags to the cache every time cmake configures the 
project.
set(CMAKE_C_FLAGS"${CMAKE_C_FLAGS}"CACHE
 STRING "compiler flags" FORCE)
set(CMAKE_C_FLAGS_DEBUG  "${CMAKE_C_FLAGS_DEBUG}"  CACHE
 STRING "compiler flags" FORCE)
set(CMAKE_C_FLAGS_RELEASE"${CMAKE_C_FLAGS_RELEASE}"CACHE
 STRING "compiler flags" FORCE)
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}" CACHE
 STRING "compiler flags" FORCE)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}" CACHE
 STRING "compiler flags" FORCE)
# and similar for CXX_FLAGS and Fortran_FLAGS...

With this logic, I have customized baseline compiler flags that show up for 
everyone and they match the strings found in CMakeCache.txt (and via 
cmake-gui).  If I modify the flags via ccmake or cmake-gui, the new options are 
saved to the cache and are used by the build.  

I manually set many more flags for my default set than I show in the example 
above and I have extra logic to check compiler version or option availability 
(e.g.: if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0) -> add some gcc-8 
flags).  I also have some logic that looks for flags set in the environment and 
these options are appended to these strings before the strings are saved to the 
cache.  

There are a few downsides to this approach:
- I build on many different platforms with many different compilers, so I have 
a significant amount of cmake code to manage.
- Some flags that are set automagically set by cmake don't show up in the 
_FLAGS strings.  For example, setting CMAKE_CXX_STANDARD will add appropriate 
compiler flags like '-std=c++14' but you don't see them in cmake-gui. 

In a few cases I also use per-sourcefile, per-target, and per-directory 
properties (sometimes via generator expressions) as other have described in 
replying to your question.  In most cases, I have found that the default flags 
that are set by the top level of my build system prevent me from needing to 
customize compile flags for individual targets.

I hope this helps.

-kt

-Original Message-
From: CMake  On Behalf Of Michael Jackson
Sent: Tuesday, September 11, 2018 2:10 PM
To: cmake@cmake.org
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

I add it manually each and every time. I have to tell all new developers to 
remember to add the flag otherwise they are still sitting after an hour waiting 
on our code to compile wondering why it takes so long. Then it hits us, "Oh, 
Yeah. Open CMake-Gui and set the /MP flag". I'm frustrated at the situation but 
not sure how to fix it. I tried the other suggestions and just nothing works. 
This is one of those things that I poke at once a year and figure out that 
nothing has changed. Been this way since VS 2013. Someday it will change.

--
Mike Jackson 

On 9/11/18, 1:28 PM, "CMake on behalf of Innokentiy Alaytsev" 
 wrote:

Hello!

Did you consider adding the flag manually during project configuration? I do
not know you use case, but after some thinking about the best way of
achieving multiprocess compilation under MSVS with CMake I decided, that the
simplest, most portable and flexible is to just add this flag manually. One
of the reasons for such a decision is that I do not know how the project may
be built and multiprocess compilation may cause problems under some hardware
configurations.

Best regards,
Innokentiy



--
Sent from: http://cmake.3232098.n2.nabble.com/
-- 

Powered by www.kitware.com


Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
I add it manually each and every time. I have to tell all new developers to 
remember to add the flag otherwise they are still sitting after an hour waiting 
on our code to compile wondering why it takes so long. Then it hits us, "Oh, 
Yeah. Open CMake-Gui and set the /MP flag". I'm frustrated at the situation but 
not sure how to fix it. I tried the other suggestions and just nothing works. 
This is one of those things that I poke at once a year and figure out that 
nothing has changed. Been this way since VS 2013. Someday it will change.

--
Mike Jackson 

On 9/11/18, 1:28 PM, "CMake on behalf of Innokentiy Alaytsev" 
 wrote:

Hello!

Did you consider adding the flag manually during project configuration? I do
not know you use case, but after some thinking about the best way of
achieving multiprocess compilation under MSVS with CMake I decided, that the
simplest, most portable and flexible is to just add this flag manually. One
of the reasons for such a decision is that I do not know how the project may
be built and multiprocess compilation may cause problems under some hardware
configurations.

Best regards,
Innokentiy



--
Sent from: http://cmake.3232098.n2.nabble.com/
-- 

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


Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
Just to be clear I _only_ need it when the generator is Visual Studio so I did 
the following:

 

if(MSVC_IDE)

  add_compile_options(/MP)

endif()

 

>From a clean build directory that did not add it to the CMAKE_CXX_FLAGS when 
>viewed in CMake-Gui.

 

--

Mike Jackson 

 

From: Marc CHEVRIER 
Date: Tuesday, September 11, 2018 at 1:28 PM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

 

If you set directory property at the top level CMakeList.txt, before any target 
definition, all targets will inherit this value.

 

And, because property 'COMPILE_OPTIONS' supports generator expressions (see 
https://cmake.org/cmake/help/v3.12/manual/cmake-generator-expressions.7.html), 
you can specify:

 

add_compile_options("$<$:/MP>")

 

 

Le mar. 11 sept. 2018 à 19:19, Michael Jackson  a 
écrit :

Hmm. The idea for the “/MP” flags for those that don’t use Visual Studio is 
that it will inform the compiler to use all the cores on the system to compile. 
Much like Ninja does automatically and “make -jN” does for makefiles.

Essentially I want to automatically add the “/MP” flag anytime that I configure 
using Visual Studio (2015/2017) as the generator. I guess I could put the 
append string fairly high up in the CMake hierarchy. I am not seeing a property 
(from the first link you sent) that would allow me to do that.

 

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: Marc CHEVRIER 
Date: Tuesday, September 11, 2018 at 1:04 PM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

 

The best approach is to use properties (see 
https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).

 

At directory level and target level you can use property 'COMPILE_OPTIONS'.  
These properties can be updated using, respectively 'add_compile_options' and 
'target_compile_options'.

 

Be aware that variable 'CMAKE_CXX_FLAGS' is a string so to extend it you have 
to use:

string(APPEND CMAKE_CXX_FLAGS "flag1 flag2")

 

 

Le mar. 11 sept. 2018 à 17:58, Michael Jackson  a 
écrit :

What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I 
would like:

 

If (MSVC)

Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. 
What is the best practice for doing this?

 

Thanks

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.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


Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Richard A. Smith

On 09/11/2018 01:03 PM, Marc CHEVRIER wrote:

The best approach is to use properties (see 
https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).


At directory level and target level you can use property 
'COMPILE_OPTIONS'.  These properties can be updated using, respectively 
'add_compile_options' and 'target_compile_options'.


If you have assembly files you may run into trouble.

See my question:  https://www.mail-archive.com/cmake@cmake.org/msg59526.html

I don't have a solution yet.



Le mar. 11 sept. 2018 à 17:58, Michael Jackson 
mailto:mike.jack...@bluequartz.net>> a écrit :


What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the
logic that I would like:

__ __

If (MSVC)

     Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

__ __

I have always heard that appending to the compile flags in this way
is “bad”. What is the best practice for doing this?

__ __

Thanks

--

Michael Jackson | Owner, President

   BlueQuartz Software

[e] mike.jack...@bluequartz.net 

[w] www.bluequartz.net 

--
Richard A. Smith
sm...@whoop.com
--

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] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Innokentiy Alaytsev
Hello!

Did you consider adding the flag manually during project configuration? I do
not know you use case, but after some thinking about the best way of
achieving multiprocess compilation under MSVS with CMake I decided, that the
simplest, most portable and flexible is to just add this flag manually. One
of the reasons for such a decision is that I do not know how the project may
be built and multiprocess compilation may cause problems under some hardware
configurations.

Best regards,
Innokentiy



--
Sent from: http://cmake.3232098.n2.nabble.com/
-- 

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] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Marc CHEVRIER
If you set directory property at the top level CMakeList.txt, before any
target definition, all targets will inherit this value.

And, because property 'COMPILE_OPTIONS' supports generator expressions (see
https://cmake.org/cmake/help/v3.12/manual/cmake-generator-expressions.7.html),
you can specify:

add_compile_options("$<$:/MP>")


Le mar. 11 sept. 2018 à 19:19, Michael Jackson 
a écrit :

> Hmm. The idea for the “/MP” flags for those that don’t use Visual Studio
> is that it will inform the compiler to use all the cores on the system to
> compile. Much like Ninja does automatically and “make -jN” does for
> makefiles.
>
> Essentially I want to automatically add the “/MP” flag anytime that I
> configure using Visual Studio (2015/2017) as the generator. I guess I could
> put the append string fairly high up in the CMake hierarchy. I am not
> seeing a property (from the first link you sent) that would allow me to do
> that.
>
>
>
> --
>
> Michael Jackson | Owner, President
>
>   BlueQuartz Software
>
> [e] mike.jack...@bluequartz.net
>
> [w] www.bluequartz.net
>
>
>
> *From: *Marc CHEVRIER 
> *Date: *Tuesday, September 11, 2018 at 1:04 PM
> *To: *Michael Jackson 
> *Cc: *CMake 
> *Subject: *Re: [CMake] Appending to CMAKE_CXX_FLAGS
>
>
>
> The best approach is to use properties (see
> https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).
>
>
>
> At directory level and target level you can use property
> 'COMPILE_OPTIONS'.  These properties can be updated using, respectively
> 'add_compile_options' and 'target_compile_options'.
>
>
>
> Be aware that variable 'CMAKE_CXX_FLAGS' is a string so to extend it you
> have to use:
>
> string(APPEND CMAKE_CXX_FLAGS "flag1 flag2")
>
>
>
>
>
> Le mar. 11 sept. 2018 à 17:58, Michael Jackson <
> mike.jack...@bluequartz.net> a écrit :
>
> What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic
> that I would like:
>
>
>
> If (MSVC)
>
> Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)
>
> Endif()
>
>
>
> I have always heard that appending to the compile flags in this way is
> “bad”. What is the best practice for doing this?
>
>
>
> Thanks
>
> --
>
> Michael Jackson | Owner, President
>
>   BlueQuartz Software
>
> [e] mike.jack...@bluequartz.net
>
> [w] www.bluequartz.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


Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
Hmm. The idea for the “/MP” flags for those that don’t use Visual Studio is 
that it will inform the compiler to use all the cores on the system to compile. 
Much like Ninja does automatically and “make -jN” does for makefiles.

Essentially I want to automatically add the “/MP” flag anytime that I configure 
using Visual Studio (2015/2017) as the generator. I guess I could put the 
append string fairly high up in the CMake hierarchy. I am not seeing a property 
(from the first link you sent) that would allow me to do that.

 

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: Marc CHEVRIER 
Date: Tuesday, September 11, 2018 at 1:04 PM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

 

The best approach is to use properties (see 
https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).

 

At directory level and target level you can use property 'COMPILE_OPTIONS'.  
These properties can be updated using, respectively 'add_compile_options' and 
'target_compile_options'.

 

Be aware that variable 'CMAKE_CXX_FLAGS' is a string so to extend it you have 
to use:

string(APPEND CMAKE_CXX_FLAGS "flag1 flag2")

 

 

Le mar. 11 sept. 2018 à 17:58, Michael Jackson  a 
écrit :

What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I 
would like:

 

If (MSVC)

Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. 
What is the best practice for doing this?

 

Thanks

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.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


Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Marc CHEVRIER
The best approach is to use properties (see
https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).

At directory level and target level you can use property
'COMPILE_OPTIONS'.  These properties can be updated using, respectively
'add_compile_options' and 'target_compile_options'.

Be aware that variable 'CMAKE_CXX_FLAGS' is a string so to extend it you
have to use:
string(APPEND CMAKE_CXX_FLAGS "flag1 flag2")


Le mar. 11 sept. 2018 à 17:58, Michael Jackson 
a écrit :

> What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic
> that I would like:
>
>
>
> If (MSVC)
>
> Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)
>
> Endif()
>
>
>
> I have always heard that appending to the compile flags in this way is
> “bad”. What is the best practice for doing this?
>
>
>
> Thanks
>
> --
>
> Michael Jackson | Owner, President
>
>   BlueQuartz Software
>
> [e] mike.jack...@bluequartz.net
>
> [w] www.bluequartz.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


[CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I 
would like:

 

If (MSVC)

    Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. 
What is the best practice for doing this?

 

Thanks

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.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


Re: [CMake] Problems with static jpeg library

2018-09-11 Thread Eric Noulard
Le mar. 11 sept. 2018 à 16:10,  a écrit :

> Hi,
>
> thank you for your reply. I could solve the problem. The part I didn't
> knew was that static libraries also needed to be compiled with -fPIC.
> I've found a good summary of this topic at
> https://lists.debian.org/debian-devel/2016/05/msg00309.html
> I want to share it for those, who also stumble upon this problem.
>


And for project using CMake as build system one can use,
POSITION_INDEPENDENT_CODE
target property:
https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html#prop_tgt:POSITION_INDEPENDENT_CODE
or globally:
https://cmake.org/cmake/help/latest/variable/CMAKE_POSITION_INDEPENDENT_CODE.html#variable:CMAKE_POSITION_INDEPENDENT_CODE

in order to enable such flags.



>
> On 2018-09-11 13:47, Rolf Eike Beer wrote:
> > wo...@masterdevops.eu wrote:
> >> Hi,
> >>
> >> I am trying to compile the project libgd
> >> (https://github.com/libgd/libgd) with the option ENABLE_JPEG enabled.
> >>
> >> I.e. first I downloaded the source code of libjpeg-turbo from
> >> https://sourceforge.net/projects/libjpeg-turbo/files/2.0.0/, compiled
> >> it
> >
> > You need to make sure that this compile includes -fPIC in the
> > compileflags of
> > libjpeg.
> >
> >> But I get several errors like this one:
> >> > /usr/bin/ld: .../libjpeg-turbo-2.0.0/libjpeg.a(jcmainct.c.o):
> >> > relocation R_X86_64_32S against `.text' can not be used when making a
> >> > shared object; recompile with -fPIC
> >
> > As said here.
> >
> > Eike
> > --
>
> --
> German DevPos site: https://www.masterdevops.eu
> --
>
> 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
>


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


Re: [CMake] Problems with static jpeg library

2018-09-11 Thread world

Hi,

thank you for your reply. I could solve the problem. The part I didn't 
knew was that static libraries also needed to be compiled with -fPIC. 
I've found a good summary of this topic at 
https://lists.debian.org/debian-devel/2016/05/msg00309.html

I want to share it for those, who also stumble upon this problem.


On 2018-09-11 13:47, Rolf Eike Beer wrote:

wo...@masterdevops.eu wrote:

Hi,

I am trying to compile the project libgd
(https://github.com/libgd/libgd) with the option ENABLE_JPEG enabled.

I.e. first I downloaded the source code of libjpeg-turbo from
https://sourceforge.net/projects/libjpeg-turbo/files/2.0.0/, compiled 
it


You need to make sure that this compile includes -fPIC in the 
compileflags of

libjpeg.


But I get several errors like this one:
> /usr/bin/ld: .../libjpeg-turbo-2.0.0/libjpeg.a(jcmainct.c.o):
> relocation R_X86_64_32S against `.text' can not be used when making a
> shared object; recompile with -fPIC


As said here.

Eike
--


--
German DevPos site: https://www.masterdevops.eu
--

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.12.2-598-g528d762

2018-09-11 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  528d7625b89e0343bbf541edd256971493a6e455 (commit)
   via  9a5b04a5f6cc3f6e8e35b9b2e6858406c4ecf4a1 (commit)
   via  f13d4b10775cd4d6a604a7f1b013b5d064864a41 (commit)
   via  e9f72e9c94e17758aada77c5ba05502739242432 (commit)
   via  5ff7149298971e87df5e28b1bc5f48785bce551a (commit)
   via  a26ebb894b192b0156f6a0802ecc4b1f872fcff3 (commit)
   via  6d8cabe8d40d09827d0353b7553a27d61ca60846 (commit)
   via  7b9d8ce168a707c0a9aa81e945eef82e231db9ba (commit)
   via  ab2e35d6144c6e666eb0cfffe144d2b93c72949b (commit)
   via  fc1602456abf04f301a8fcd9ac71fd0975c6bbde (commit)
  from  b1c8d95dbe97ab2511e08518bf8eee1f5da2e941 (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=528d7625b89e0343bbf541edd256971493a6e455
commit 528d7625b89e0343bbf541edd256971493a6e455
Merge: 9a5b04a a26ebb8
Author: Brad King 
AuthorDate: Tue Sep 11 12:31:13 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:31:19 2018 -0400

Merge topic 'iar-fail-early'

a26ebb894b IAR: Abort if compiler version or target architecture is not 
detected

Acked-by: Kitware Robot 
Merge-request: !2353


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a5b04a5f6cc3f6e8e35b9b2e6858406c4ecf4a1
commit 9a5b04a5f6cc3f6e8e35b9b2e6858406c4ecf4a1
Merge: f13d4b1 5ff7149
Author: Brad King 
AuthorDate: Tue Sep 11 12:30:09 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:30:15 2018 -0400

Merge topic 'cmake_cpack_command-doc'

5ff7149298 Help: Document existence of CMAKE_CPACK_COMMAND

Acked-by: Kitware Robot 
Merge-request: !2367


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f13d4b10775cd4d6a604a7f1b013b5d064864a41
commit f13d4b10775cd4d6a604a7f1b013b5d064864a41
Merge: e9f72e9 ab2e35d
Author: Brad King 
AuthorDate: Tue Sep 11 12:27:58 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:28:05 2018 -0400

Merge topic 'replace-os-x-name-with-macos'

ab2e35d614 Replace occurrences of "Mac OS X" with "macOS" in comments
fc1602456a Help: Replace occurrences of "Mac OS X" with "macOS"

Acked-by: Kitware Robot 
Reviewed-by: Gregor Jasny 
Reviewed-by: Clinton Stimpson 
Merge-request: !2351


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9f72e9c94e17758aada77c5ba05502739242432
commit e9f72e9c94e17758aada77c5ba05502739242432
Merge: b1c8d95 6d8cabe
Author: Brad King 
AuthorDate: Tue Sep 11 12:26:37 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:26:42 2018 -0400

Merge topic 'docs/setdirproprs'

6d8cabe8d4 Help: Clarify INCLUDE_DIRECTORIES directory property behavior
7b9d8ce168 Help: Clarify wording of set_directory_properties docs

Acked-by: Kitware Robot 
Merge-request: !2337


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ff7149298971e87df5e28b1bc5f48785bce551a
commit 5ff7149298971e87df5e28b1bc5f48785bce551a
Author: Kyle Edwards 
AuthorDate: Mon Sep 10 12:36:41 2018 -0400
Commit: Kyle Edwards 
CommitDate: Mon Sep 10 12:36:41 2018 -0400

Help: Document existence of CMAKE_CPACK_COMMAND

This useful variable was previously undocumented. This commit adds
brief documentation for it.

diff --git a/Help/manual/cmake-variables.7.rst 
b/Help/manual/cmake-variables.7.rst
index 3eea8a2..d8a5def 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -24,6 +24,7 @@ Variables that Provide Information
/variable/CMAKE_CACHE_PATCH_VERSION
/variable/CMAKE_CFG_INTDIR
/variable/CMAKE_COMMAND
+   /variable/CMAKE_CPACK_COMMAND
/variable/CMAKE_CROSSCOMPILING
/variable/CMAKE_CROSSCOMPILING_EMULATOR
/variable/CMAKE_CTEST_COMMAND
diff --git a/Help/variable/CMAKE_CPACK_COMMAND.rst 
b/Help/variable/CMAKE_CPACK_COMMAND.rst
new file mode 100644
index 000..559108a
--- /dev/null
+++ b/Help/variable/CMAKE_CPACK_COMMAND.rst
@@ -0,0 +1,8 @@
+CMAKE_CPACK_COMMAND
+---
+
+Full path to :manual:`cpack(1)` command installed with CMake.
+
+This is the full path to the CPack executable :manual:`cpack(1)` which is
+useful from custom commands that want to use the :manual:`cmake(1)` ``-E``
+option for portable system commands.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a26ebb894b192b0156f6a0802ecc4b1f872fcff3
commit a26ebb894b192b0156f6a0802ecc4b1f872fcff3
Author: Daniel Schürmann 
AuthorDate: Mon Sep 10 13:44:26 2018 +0200
Commit: Brad King 
CommitDate: Mon Sep 10 09:03:47 2018 -0400

IAR: Abort if compiler 

[Cmake-commits] CMake branch, master, updated. v3.12.2-588-gb1c8d95

2018-09-11 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  b1c8d95dbe97ab2511e08518bf8eee1f5da2e941 (commit)
   via  4188b8fd6a17b7959aff8cf695ad02c291171950 (commit)
   via  dcbad14d23c8ca6673251a3f6ea9587ee0fe3d51 (commit)
   via  bb59e362cca795543a551f765fb8d39c0236df45 (commit)
   via  e0e56abe3479efddd994cc1a3ee9b8a123111903 (commit)
   via  3eda5cdd939e0bae5241e2286e7524d552ab455c (commit)
   via  e374b9f1ebae70ca4381588362d6d3418f832ea7 (commit)
   via  09f0325eaffb6b32b570e3339aa8b8332350b31d (commit)
   via  f35be599612b788125d08a7c3e61d0fad3805bdd (commit)
   via  68f2b471df7687e37ab2a5808585aad76c7c3122 (commit)
   via  1b57f49586afc9e8663d5e146732b1cd0597e7ef (commit)
   via  bea390e9bd68e1aa7d86b6aef7384f502c39068c (commit)
   via  fc7e4d1ed85370d03acbd62bc753cced3550752b (commit)
  from  c669b59095bf01ab0e254949989677496946ec08 (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=b1c8d95dbe97ab2511e08518bf8eee1f5da2e941
commit b1c8d95dbe97ab2511e08518bf8eee1f5da2e941
Merge: 4188b8f f35be59
Author: Brad King 
AuthorDate: Tue Sep 11 12:20:44 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:20:50 2018 -0400

Merge topic 'imported-same-name'

f35be59961 Fix transitive usage requirements through same-name imported 
targets
1b57f49586 genex: Simplify cmGeneratorExpressionInterpreter
bea390e9bd Fix dependency propagation through same-name imported targets
fc7e4d1ed8 cmLinkItem: Convert to a "sum type" over a string and target 
pointer

Acked-by: Kitware Robot 
Merge-request: !2359


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4188b8fd6a17b7959aff8cf695ad02c291171950
commit 4188b8fd6a17b7959aff8cf695ad02c291171950
Merge: dcbad14 e0e56ab
Author: Brad King 
AuthorDate: Tue Sep 11 08:19:44 2018 -0400
Commit: Brad King 
CommitDate: Tue Sep 11 08:19:44 2018 -0400

Merge branch 'release-3.12'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcbad14d23c8ca6673251a3f6ea9587ee0fe3d51
commit dcbad14d23c8ca6673251a3f6ea9587ee0fe3d51
Merge: bb59e36 e374b9f
Author: Brad King 
AuthorDate: Tue Sep 11 12:18:38 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:18:55 2018 -0400

Merge topic 'FindMPI-restore-flags-string'

e374b9f1eb FindMPI: Restore MPI__COMPILE_FLAGS as a command-line 
string

Acked-by: Kitware Robot 
Reviewed-by: Christoph Junghans 
Reviewed-by: Christian Pfeiffer 
Merge-request: !2368


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bb59e362cca795543a551f765fb8d39c0236df45
commit bb59e362cca795543a551f765fb8d39c0236df45
Merge: c669b59 09f0325
Author: Brad King 
AuthorDate: Tue Sep 11 12:18:01 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:18:08 2018 -0400

Merge topic 'fix-ctest_start-track'

09f0325eaf CTest: Fix regression in ctest_start()

Acked-by: Kitware Robot 
Merge-request: !2366


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f35be599612b788125d08a7c3e61d0fad3805bdd
commit f35be599612b788125d08a7c3e61d0fad3805bdd
Author: Brad King 
AuthorDate: Thu Sep 6 18:22:31 2018 -0400
Commit: Brad King 
CommitDate: Mon Sep 10 07:51:44 2018 -0400

Fix transitive usage requirements through same-name imported targets

If two imported targets in different directories have the same name we
should still be able to propagate transitive usage requirements from
both.  Fix the DAG checker to work with target pointers instead of
target names since the pointers will not be duplicated even if the names
are.

Fixes: #18345

diff --git a/Source/cmExportBuildAndroidMKGenerator.cxx 
b/Source/cmExportBuildAndroidMKGenerator.cxx
index bb370c4..3d32b84 100644
--- a/Source/cmExportBuildAndroidMKGenerator.cxx
+++ b/Source/cmExportBuildAndroidMKGenerator.cxx
@@ -108,7 +108,7 @@ void 
cmExportBuildAndroidMKGenerator::GenerateInterfaceProperties(
 // build type of the makefile
 cmGeneratorExpression ge;
 cmGeneratorExpressionDAGChecker dagChecker(
-  target->GetName(), "INTERFACE_LINK_LIBRARIES", nullptr, nullptr);
+  target, "INTERFACE_LINK_LIBRARIES", nullptr, nullptr);
 std::unique_ptr cge =
   ge.Parse(property.second);
 std::string evaluated = cge->Evaluate(
diff --git a/Source/cmExportTryCompileFileGenerator.cxx 
b/Source/cmExportTryCompileFileGenerator.cxx
index 87648cb..c169032 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -65,8 

[Cmake-commits] CMake branch, release, updated. v3.12.2-6-ge0e56ab

2018-09-11 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, release has been updated
   via  e0e56abe3479efddd994cc1a3ee9b8a123111903 (commit)
   via  3eda5cdd939e0bae5241e2286e7524d552ab455c (commit)
   via  e374b9f1ebae70ca4381588362d6d3418f832ea7 (commit)
   via  09f0325eaffb6b32b570e3339aa8b8332350b31d (commit)
   via  68f2b471df7687e37ab2a5808585aad76c7c3122 (commit)
   via  292ec157b67b5570d5bc2e00bba554cc157d9dae (commit)
  from  f478fa633daeb1432805821adddc40730ffd283d (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 -
---

Summary of changes:
 Modules/FindMPI.cmake  |  2 +-
 Source/CTest/cmCTestMultiProcessHandler.cxx| 59 ++
 Source/CTest/cmCTestMultiProcessHandler.h  |  5 ++
 Source/cmCTest.cxx |  6 ++-
 Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake |  4 +-
 .../CTestCommandLine/test-load-fail-stderr.txt |  1 -
 .../CTestCommandLine/test-load-fail-stdout.txt |  2 -
 .../CTestCommandLine/test-load-pass-stderr.txt |  1 -
 ...nvalid-stdout.txt => test-load-wait-stdout.txt} |  1 +
 .../ctest_start/NoAppendDifferentTrack-stdout.txt  |  8 +++
 Tests/RunCMake/ctest_start/RunCMakeTest.cmake  |  1 +
 Tests/RunCMake/ctest_start/test.cmake.in   |  2 +-
 .../ctest_test/CTestTestLoadFail-result.txt|  1 -
 .../ctest_test/CTestTestLoadFail-stderr.txt|  1 -
 .../ctest_test/CTestTestLoadFail-stdout.txt|  2 -
 ...ass-stdout.txt => CTestTestLoadWait-stdout.txt} |  3 +-
 Tests/RunCMake/ctest_test/RunCMakeTest.cmake   |  8 +--
 Tests/RunCMake/ctest_test/TestLoadFail-result.txt  |  1 -
 Tests/RunCMake/ctest_test/TestLoadFail-stderr.txt  |  1 -
 Tests/RunCMake/ctest_test/TestLoadFail-stdout.txt  |  2 -
 ...LoadPass-stdout.txt => TestLoadWait-stdout.txt} |  3 +-
 21 files changed, 70 insertions(+), 44 deletions(-)
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-fail-stderr.txt
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-fail-stdout.txt
 delete mode 100644 Tests/RunCMake/CTestCommandLine/test-load-pass-stderr.txt
 copy Tests/RunCMake/CTestCommandLine/{test-load-invalid-stdout.txt => 
test-load-wait-stdout.txt} (74%)
 create mode 100644 Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt
 delete mode 100644 Tests/RunCMake/ctest_test/CTestTestLoadFail-result.txt
 delete mode 100644 Tests/RunCMake/ctest_test/CTestTestLoadFail-stderr.txt
 delete mode 100644 Tests/RunCMake/ctest_test/CTestTestLoadFail-stdout.txt
 copy Tests/RunCMake/ctest_test/{CTestTestLoadPass-stdout.txt => 
CTestTestLoadWait-stdout.txt} (52%)
 delete mode 100644 Tests/RunCMake/ctest_test/TestLoadFail-result.txt
 delete mode 100644 Tests/RunCMake/ctest_test/TestLoadFail-stderr.txt
 delete mode 100644 Tests/RunCMake/ctest_test/TestLoadFail-stdout.txt
 copy Tests/RunCMake/ctest_test/{CTestTestLoadPass-stdout.txt => 
TestLoadWait-stdout.txt} (52%)


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


[Cmake-commits] CMake branch, master, updated. v3.12.2-575-gc669b59

2018-09-11 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  c669b59095bf01ab0e254949989677496946ec08 (commit)
   via  292ec157b67b5570d5bc2e00bba554cc157d9dae (commit)
  from  78d165c9905f73237229497772769a6dc2c32982 (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=c669b59095bf01ab0e254949989677496946ec08
commit c669b59095bf01ab0e254949989677496946ec08
Merge: 78d165c 292ec15
Author: Brad King 
AuthorDate: Tue Sep 11 12:12:03 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 08:12:09 2018 -0400

Merge topic 'ctest-fix-test-load'

292ec157b6 CTest: Fix --test-load regression

Acked-by: Kitware Robot 
Merge-request: !2362


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=292ec157b67b5570d5bc2e00bba554cc157d9dae
commit 292ec157b67b5570d5bc2e00bba554cc157d9dae
Author: Brad King 
AuthorDate: Sun Sep 9 11:11:38 2018 -0400
Commit: Brad King 
CommitDate: Mon Sep 10 07:32:16 2018 -0400

CTest: Fix --test-load regression

The `ctest --test-load` option is implemented in `StartNextTests` by not
starting any tests when the load is too high and instead sleeping and
then returning.  Prior to commit v3.11.0-rc1~117^2 (CTest: Re-implement
test process handling using libuv, 2017-12-10) our outer loop in
`RunTests` would immediately call `StartNextTests` again.  However, now
the `uv_run` loop may simply terminate if there are no tests running
because no events are left pending.

Fix this by converting the sleep in `StartNextTests` into a libuv timer
that it starts instead.  This avoids leaving `uv_run` with no pending
events.  In the case that there are other running tests this also allows
CTest to detect when they finish even if it during the wait period where
we previously slept.

This regression was not caught by the test suite because it only
verified that we do not start new tests when the load was too high and
not that we proceed to start tests when the load drops.  Revise the test
suite to cover both.

Fixes: #18338

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx 
b/Source/CTest/cmCTestMultiProcessHandler.cxx
index dcef8a0..322da23 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -5,7 +5,6 @@
 #include "cmAffinity.h"
 #include "cmCTest.h"
 #include "cmCTestRunTest.h"
-#include "cmCTestScriptHandler.h"
 #include "cmCTestTestHandler.h"
 #include "cmSystemTools.h"
 #include "cmWorkingDirectory.h"
@@ -53,6 +52,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
 {
   this->ParallelLevel = 1;
   this->TestLoad = 0;
+  this->FakeLoadForTesting = 0;
   this->Completed = 0;
   this->RunningCount = 0;
   this->ProcessorsAvailable = cmAffinity::GetProcessorsAvailable();
@@ -97,6 +97,16 @@ void cmCTestMultiProcessHandler::SetParallelLevel(size_t 
level)
 void cmCTestMultiProcessHandler::SetTestLoad(unsigned long load)
 {
   this->TestLoad = load;
+
+  std::string fake_load_value;
+  if (cmSystemTools::GetEnv("__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING",
+fake_load_value)) {
+if (!cmSystemTools::StringToULong(fake_load_value.c_str(),
+  >FakeLoadForTesting)) {
+  cmSystemTools::Error("Failed to parse fake load value: ",
+   fake_load_value.c_str());
+}
+  }
 }
 
 void cmCTestMultiProcessHandler::RunTests()
@@ -259,12 +269,19 @@ bool cmCTestMultiProcessHandler::StartTest(int test)
 
 void cmCTestMultiProcessHandler::StartNextTests()
 {
-  size_t numToStart = 0;
+  if (this->TestLoadRetryTimer.get() != nullptr) {
+// This timer may be waiting to call StartNextTests again.
+// Since we have been called it is no longer needed.
+uv_timer_stop(this->TestLoadRetryTimer);
+  }
 
   if (this->Tests.empty()) {
+this->TestLoadRetryTimer.reset();
 return;
   }
 
+  size_t numToStart = 0;
+
   if (this->RunningCount < this->ParallelLevel) {
 numToStart = this->ParallelLevel - this->RunningCount;
   }
@@ -280,7 +297,6 @@ void cmCTestMultiProcessHandler::StartNextTests()
   }
 
   bool allTestsFailedTestLoadCheck = false;
-  bool usedFakeLoadForTesting = false;
   size_t minProcessorsRequired = this->ParallelLevel;
   std::string testWithMinProcessors;
 
@@ -293,15 +309,11 @@ void cmCTestMultiProcessHandler::StartNextTests()
 allTestsFailedTestLoadCheck = true;
 
 // Check for a fake load average value used in testing.
-std::string fake_load_value;
-if 

Re: [CMake] Joining an OBJECT and a SHARED library

2018-09-11 Thread Robert Maynard
I believe what you are looking for in the CMake 3.12 improvements to
object libraries. In 3.12  the target_link_libraries command now
supports linking to an object library to embed the object files ( only
on direct dependencies, no propagation of .objs ) and also propagates
usage requirements like any other library.


On Wed, Sep 5, 2018 at 12:27 PM George PF  wrote:
>
> Hi,
>
> is there a way to "join" an the OBJECT library with a SHARED library it 
> creates?
>
> The abclib and its component abc_tmp, all .c file have #include "foo.h":
>
> add_library(abc_tmp OBJECT z1. z2.c)
> # generate...
> add_library(abclib SHARED $ generated.c)
>
> Then adding the library foo, which adds the include path to "foo.h" - but 
> this only
> works for 'generated.c', the include path for z1/z1 is not extended:
>
> target_link_libraries(abclib PUBLIC foo)
>
> Repeating the same for 'abc_tmp' is really cumbersome, I want to this to 
> apply to everything
> which goes into creating the abclib, directly or indirectly, is that possible?
>
>
> Regards
>
> GPF
> --
>
> 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


Re: [CMake] Problems with static jpeg library

2018-09-11 Thread Rolf Eike Beer
wo...@masterdevops.eu wrote:
> Hi,
> 
> I am trying to compile the project libgd
> (https://github.com/libgd/libgd) with the option ENABLE_JPEG enabled.
> 
> I.e. first I downloaded the source code of libjpeg-turbo from
> https://sourceforge.net/projects/libjpeg-turbo/files/2.0.0/, compiled it

You need to make sure that this compile includes -fPIC in the compileflags of 
libjpeg.

> But I get several errors like this one:
> > /usr/bin/ld: .../libjpeg-turbo-2.0.0/libjpeg.a(jcmainct.c.o):
> > relocation R_X86_64_32S against `.text' can not be used when making a
> > shared object; recompile with -fPIC

As said here.

Eike
-- 

signature.asc
Description: This is a digitally signed message part.
-- 

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] Problems with static jpeg library

2018-09-11 Thread world

Hi,

I am trying to compile the project libgd 
(https://github.com/libgd/libgd) with the option ENABLE_JPEG enabled.


I.e. first I downloaded the source code of libjpeg-turbo from 
https://sourceforge.net/projects/libjpeg-turbo/files/2.0.0/, compiled it 
and afterwards I started to compile libgd with this command:



cmake -G "Unix Makefiles" \

-DENABLE_JPEG=ON \
-DJPEG_INCLUDE_DIR="../${JPEG_DIR}" \
-DJPEG_LIBRARY="../${JPEG_DIR}/libjpeg.a" \
.

You can check the CMakeLists.txt in that project 
(https://github.com/libgd/libgd/blob/master/CMakeLists.txt)


As you can see, I want to compile libgd with a static libjpeg library. 
But I get several errors like this one:


/usr/bin/ld: .../libjpeg-turbo-2.0.0/libjpeg.a(jcmainct.c.o): 
relocation R_X86_64_32S against `.text' can not be used when making a 
shared object; recompile with -fPIC


When I use the shared library version of libjpeg, i.e. I try to compile 
libgd with the shared version of libjpeg, i.e.



cmake -G "Unix Makefiles" \

-DENABLE_JPEG=ON \
-DJPEG_INCLUDE_DIR="../${JPEG_DIR}" \
-DJPEG_LIBRARY="../${JPEG_DIR}/libjpeg.so" \
.

then there is no error.

Is this a problem of CMake or a problem of the CMakeLists.txt of the 
libgd project?

--

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.12.2-573-g78d165c

2018-09-11 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  78d165c9905f73237229497772769a6dc2c32982 (commit)
   via  151fc668273ca69ce0a75c1c03b489b08e531f10 (commit)
   via  3914108c4aecc758e0f23dda76ca4ad5cc1c1085 (commit)
   via  228a2b0d825712d6648f7bdf920850c7f38ed2b4 (commit)
  from  e895a8f050d5e68a8e23dea7fb3e5a718344cd03 (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=78d165c9905f73237229497772769a6dc2c32982
commit 78d165c9905f73237229497772769a6dc2c32982
Merge: 151fc66 3914108
Author: Craig Scott 
AuthorDate: Tue Sep 11 09:50:55 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 05:51:03 2018 -0400

Merge topic 'generator_expressions_typo_fix'

3914108c4a Help: Formatting typo fix in cmake-generator-expressions(7)

Acked-by: Kitware Robot 
Merge-request: !2360


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=151fc668273ca69ce0a75c1c03b489b08e531f10
commit 151fc668273ca69ce0a75c1c03b489b08e531f10
Merge: e895a8f 228a2b0
Author: Craig Scott 
AuthorDate: Tue Sep 11 09:48:33 2018 +
Commit: Kitware Robot 
CommitDate: Tue Sep 11 05:48:43 2018 -0400

Merge topic 'cmake-host-system-information-doc-fix'

228a2b0d82 Help: Clarify cmake_host_system_information memory units

Acked-by: Kitware Robot 
Merge-request: !2339


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3914108c4aecc758e0f23dda76ca4ad5cc1c1085
commit 3914108c4aecc758e0f23dda76ca4ad5cc1c1085
Author: Raul Tambre 
AuthorDate: Mon Sep 10 15:08:02 2018 +0300
Commit: Raul Tambre 
CommitDate: Mon Sep 10 15:08:02 2018 +0300

Help: Formatting typo fix in cmake-generator-expressions(7)

diff --git a/Help/manual/cmake-generator-expressions.7.rst 
b/Help/manual/cmake-generator-expressions.7.rst
index 8fd07d7..c3428d1 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -51,7 +51,7 @@ Available logical expressions are:
   ``0`` if all ``?`` are ``0``, else ``1``
 ``$``
   ``0`` if ``?`` is ``1``, else ``1``
-``$```
+``$``
   ``true-value...`` if ``?`` is ``1``, ``false-value...`` if ``?`` is ``0``
 ``$``
   ``1`` if ``a`` is STREQUAL ``b``, else ``0``

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=228a2b0d825712d6648f7bdf920850c7f38ed2b4
commit 228a2b0d825712d6648f7bdf920850c7f38ed2b4
Author: Taylor Holberton 
AuthorDate: Sun Sep 2 10:16:56 2018 -0400
Commit: Craig Scott 
CommitDate: Mon Sep 10 15:55:07 2018 +0800

Help: Clarify cmake_host_system_information memory units

The memory size query implementations report in units of one mebibyte
(2^20).  Clarify the unit in the documentation because "megabyte" might
also be interpreted as 10^6.

diff --git a/Help/command/cmake_host_system_information.rst 
b/Help/command/cmake_host_system_information.rst
index 9893151..2dee93a 100644
--- a/Help/command/cmake_host_system_information.rst
+++ b/Help/command/cmake_host_system_information.rst
@@ -20,10 +20,10 @@ Key   Description
 ``NUMBER_OF_PHYSICAL_CORES``  Number of physical cores
 ``HOSTNAME``  Hostname
 ``FQDN``  Fully qualified domain name
-``TOTAL_VIRTUAL_MEMORY``  Total virtual memory in megabytes
-``AVAILABLE_VIRTUAL_MEMORY``  Available virtual memory in megabytes
-``TOTAL_PHYSICAL_MEMORY`` Total physical memory in megabytes
-``AVAILABLE_PHYSICAL_MEMORY`` Available physical memory in megabytes
+``TOTAL_VIRTUAL_MEMORY``  Total virtual memory in MiB [#mebibytes]_
+``AVAILABLE_VIRTUAL_MEMORY``  Available virtual memory in MiB [#mebibytes]_
+``TOTAL_PHYSICAL_MEMORY`` Total physical memory in MiB [#mebibytes]_
+``AVAILABLE_PHYSICAL_MEMORY`` Available physical memory in MiB [#mebibytes]_
 ``IS_64BIT``  One if processor is 64Bit
 ``HAS_FPU``   One if processor has floating point unit
 ``HAS_MMX``   One if processor supports MMX instructions
@@ -44,3 +44,7 @@ Key   Description
 ``OS_VERSION``The OS build ID
 ``OS_PLATFORM``   See :variable:`CMAKE_HOST_SYSTEM_PROCESSOR`
 = 
+
+.. rubric:: Footnotes
+
+.. [#mebibytes] One MiB (mebibyte) is equal to 1024x1024 bytes.

---

Summary of changes:
 Help/command/cmake_host_system_information.rst | 12 
 Help/manual/cmake-generator-expressions.7.rst  |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)