Re: [CMake] find_library/find_path not working on mingw

2015-03-02 Thread Karolin Varner
Hi Clément, hi Omar,
thanks for all you're tipps!

It turns out that I had CMAKE_FIND_ROOT_PATH and the PATHS as well as
the HINTS are not used if they're not somewhere under
CMAKE_FIND_ROOT_PATH.  Since all the libs are in a common prefix, I just
added that to CMAKE_FIND_ROOT_PATH.

On 02/27/2015 01:24 AM, Clément Gregoire wrote:
 Hi, you probably want to take a look at
 http://www.cmake.org/Bug/view.php?id=15370

On 02/27/2015 10:27 AM, Omar Valerio wrote:
 FIND_LIBRARY(ZMQ_LIB zmq HINTS /usr/lib)

 Instead of FIND_PATH, you may want to use INCLUDE_DIRECTORIES.
 http://www.cmake.org/cmake/help/v3.0/command/include_directories.html

I am actually passing the result of find_path into include_directories.
The point of using find_path is mostly to give some feedback Hey, we
could not find that stuff.

Thank you very much,
Karolin
-- 

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:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] creating a DLL with an OpenCV dependency

2015-03-02 Thread Dave Yost

Hi.

I can’t divine how to get find_package to look for boost in the various places 
it might be on the various systems where we do builds.

Boost might be in any of these places
  /usr/local/include/boost
  /usr/local/boost/1.57.0/include
  /usr/local/boost/1.56.0/include   etc.
  /opt/local/include/boost
  
/opt/local/var/macports/build/_private_tmp_boost149_boost/boost/work/boost_1_49_0/boost/

I tried modifying this in various ways according to the docs to no avail.

find_package(Boost ${BOOST_VERSION} EXACT 
 COMPONENTS filesystem program_options serialization system
 REQUIRED)

Thanks
-- 

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:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Linking header-only lib with external lib dependency in a subfolder

2015-03-02 Thread Pablo Hernández
I am generating libs from header-only source files, I have a simple header with 
no dependencies, and a header with boost_filesystem and boost_system 
dependencies.
I am facing linking problems (ld)  against boost, when I link the library to 
the test executable. Tests are in a subdirectory, with an extra CMakeLists.txt. 
With the no-dependency header, I have no problems.
Top CMakeLists.txt:
add_library(histo-header histo-header.h)
set_target_properties(histo-header PROPERTIES LINKER_LANGUAGE CXX)
FILE(COPY histo-header.h DESTINATION include)

test/CMakeLists.txt:
add_executable(test_histo.exe test_histo.cpp)
target_link_libraries(test_histo.exe ${test_libraries})
target_link_libraries(test_histo.exe histo-header)

All good here.

But when I do the same with the library with boost dependencies:
Top CMakeLists.txt:
find_package(Boost COMPONENTS
system filesystem
REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
add_library(histo-header-boost histo-header-boost.h )
target_link_libraries(histo-header-boost PUBLIC ${Boost_Libraries})
set_target_properties(histo-header-boost PROPERTIES LINKER_LANGUAGE CXX)
FILE(COPY histo-header-boost.h DESTINATION include)

test/CMakeLists.txt:
SET( Boost_LIBRARIES ${Boost_LIBRARIES} PARENT_SCOPE )
add_executable(test_histo-boost.exe test_histo-boost.cpp )
target_link_libraries(test_histo-boost.exe ${test_libraries})
target_link_libraries(test_histo-boost.exe histo-header-boost)

I face this error:

CMakeFiles/test_histo-boost.exe.dir/test_histo-boost.cpp.o: In function 
`__static_initialization_and_destruction_0(int, int)':
test_histo-boost.cpp:(.text+0x1c2): undefined reference to 
`boost::system::generic_category()'
test_histo-boost.cpp:(.text+0x1ce): undefined reference to 
`boost::system::generic_category()'
test_histo-boost.cpp:(.text+0x1da): undefined reference to 
`boost::system::system_category()'
collect2: error: ld returned 1 exit status
m

What am I missing here?

So 
  -- 

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:
http://public.kitware.com/mailman/listinfo/cmake

Re: [cmake-developers] Extracting target metadata, IDE integration

2015-03-02 Thread Aleix Pol
On Fri, Aug 29, 2014 at 4:20 AM, Aleix Pol aleix...@kde.org wrote:
 Dear cmake'rs,
 I'm rewriting the KDevelop plugin from scratch to fetch the information from
 the build directory.

 Now in the first implementation I'm using the compile_commands.json file
 that cmake already can generate for some time. It works quite well already,
 given how data just comes out ready to be consumed (almost). The problem now
 is that we're lacking some information, namely information about the
 targets, their location and such *.

 To that end, I wrote a little patch to be taken as a proof of concept, that
 generates (some of) the needed information. I would like to know if you
 think it's an approach that would be accepted in the cmake code-base or if I
 need to take a different approach.

 Patch http://proli.net/meu/kdevelop/cmake-targetsdata.patch
 Output: http://proli.net/meu/kdevelop/AwesomeTargets.json

 Cheers!
 Aleix

 * Yes, I'm aware of generators, but I'm not comfortable with the idea of
 tying a build directory to an editor (even if it's my editor). Our users
 usually build the projects with different tools and asking them to re-create
 their build only for being comfortable with KDevelop sometimes is a burden.
 It would be for me too!

I created a new version of the patch:
http://proli.net/meu/kdevelop/0001-cmake-Add-option-to-generate-target-metadata-for-IDE-v2.patch

Main differences are:
* Uses JsonCpp to generate json (makes the code much easier to read!).
* Adds a CMAKE_EXPORT_PROJECT_METADATA.rst file for documentation.
* Adds a test that checks some of the parameters in the file.
* Uses for directory the directory where the target was generated
rather than the output directory.

I hope this helps.
Aleix

Samples:
LLVM: https://paste.kde.org/pelr1ditp
A small random KDE project: https://paste.kde.org/pgkbecv5p
-- 

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:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [CMake] Linking header-only lib with external lib dependency in a subfolder

2015-03-02 Thread Pablo Hernández
By the way, I am using:

cmake version 3.2.20150216-gf724a

  -- 

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:
http://public.kitware.com/mailman/listinfo/cmake

[Cmake-commits] CMake branch, master, updated. v3.2.0-rc2-358-g0261198

2015-03-02 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  02611986539366644661138153ebf816a0febd61 (commit)
  from  56be75b3107b210631919c13496060d648f97b14 (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02611986539366644661138153ebf816a0febd61
commit 02611986539366644661138153ebf816a0febd61
Author: Kitware Robot kwro...@kitware.com
AuthorDate: Tue Mar 3 00:01:09 2015 -0500
Commit: Kitware Robot kwro...@kitware.com
CommitDate: Tue Mar 3 00:01:09 2015 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 22af221..e4956c8 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 2)
-set(CMake_VERSION_PATCH 20150302)
+set(CMake_VERSION_PATCH 20150303)
 #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
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.2.0-rc2-813-g0c438b9

2015-03-02 Thread Brad King
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, next has been updated
   via  0c438b962c6585043dc055d3e4b6aaa2e99e090e (commit)
   via  e88f3b3bcc18ec04e567025872f0008eea00c3a9 (commit)
   via  7c9afb573844fdef0a8c29bb7f8c4474b910d83f (commit)
  from  ac5440e7341faeac3598711f62eee8039462f72b (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0c438b962c6585043dc055d3e4b6aaa2e99e090e
commit 0c438b962c6585043dc055d3e4b6aaa2e99e090e
Merge: ac5440e e88f3b3
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:54:28 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 08:54:28 2015 -0500

Merge topic 'update-kwsys' into next

e88f3b3b Merge branch 'upstream-kwsys' into update-kwsys
7c9afb57 KWSys 2015-02-27 (d2aa1afd)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e88f3b3bcc18ec04e567025872f0008eea00c3a9
commit e88f3b3bcc18ec04e567025872f0008eea00c3a9
Merge: 56be75b 7c9afb5
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:41:17 2015 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Mon Mar 2 08:41:17 2015 -0500

Merge branch 'upstream-kwsys' into update-kwsys


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c9afb573844fdef0a8c29bb7f8c4474b910d83f
commit 7c9afb573844fdef0a8c29bb7f8c4474b910d83f
Author: KWSys Robot kwro...@kitware.com
AuthorDate: Fri Feb 27 11:12:18 2015 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Mon Mar 2 08:41:11 2015 -0500

KWSys 2015-02-27 (d2aa1afd)

Extract upstream KWSys using the following shell commands.

$ git archive --prefix=upstream-kwsys/ d2aa1afd | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 1b75ad3d..d2aa1afd
Paul Martin (1):
  d2aa1afd SystemTools: Update CopyFileAlways stream library workarounds

Change-Id: I676f2f11ac0d52f7ffc3af5bb444d3726c121be0

diff --git a/SystemTools.cxx b/SystemTools.cxx
index bf6f458..8a481d6 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -2375,6 +2375,10 @@ bool SystemTools::CopyFileAlways(const 
kwsys_stl::string source, const kwsys_st
   {
   fout.write(buffer, fin.gcount());
   }
+else
+  {
+  break;
+  }
 }
 
   // Make sure the operating system has finished writing the file

---

Summary of changes:
 Source/kwsys/SystemTools.cxx |4 
 1 file changed, 4 insertions(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.2.0-rc2-815-gb80f57d

2015-03-02 Thread Brad King
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, next has been updated
   via  b80f57d14676b2f639554496c0b9d19c67e0aa2b (commit)
   via  3b9f963f3fb1db05e90cfad606c62a7b3e9b18dc (commit)
  from  0c438b962c6585043dc055d3e4b6aaa2e99e090e (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b80f57d14676b2f639554496c0b9d19c67e0aa2b
commit b80f57d14676b2f639554496c0b9d19c67e0aa2b
Merge: 0c438b9 3b9f963
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 09:06:04 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 09:06:04 2015 -0500

Merge topic 'cpack-strict-variable-selection' into next

3b9f963f CPack: be more stringent when selecting variables to encode


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b9f963f3fb1db05e90cfad606c62a7b3e9b18dc
commit 3b9f963f3fb1db05e90cfad606c62a7b3e9b18dc
Author: Роман Донченко d...@corrigendum.ru
AuthorDate: Sun Mar 1 02:38:52 2015 +0300
Commit: Brad King brad.k...@kitware.com
CommitDate: Mon Mar 2 09:01:31 2015 -0500

CPack: be more stringent when selecting variables to encode

The old version would admit, for example, a variable named xxxCPACK.

diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index ce1536e..532596d 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -314,7 +314,7 @@ macro(cpack_encode_variables)
   set(_CPACK_OTHER_VARIABLES_)
   get_cmake_property(res VARIABLES)
   foreach(var ${res})
-if(xxx${var} MATCHES xxxCPACK)
+if(var MATCHES ^CPACK)
   set(_CPACK_OTHER_VARIABLES_
 ${_CPACK_OTHER_VARIABLES_}\nSET(${var} \${${var}}\))
   endif()

---

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


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, release, updated. v3.2.0-rc2-8-g6b6852a

2015-03-02 Thread Brad King
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  6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9 (commit)
   via  00d66557d49989f9813ba9f04beaa0a984699cf0 (commit)
  from  4932f59b4cd903169f691f708949ea2afb595492 (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:
 Source/cmLocalGenerator.cxx   |9 -
 .../NotAStandard-result.txt}  |0
 Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt|4 
 Tests/RunCMake/CompileFeatures/NotAStandard.cmake |2 ++
 Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake |2 ++
 5 files changed, 16 insertions(+), 1 deletion(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt = 
CompileFeatures/NotAStandard-result.txt} (100%)
 create mode 100644 Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt
 create mode 100644 Tests/RunCMake/CompileFeatures/NotAStandard.cmake


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, next, updated. v3.2.0-rc2-807-gae266f0

2015-03-02 Thread Brad King
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, next has been updated
   via  ae266f05ef6da227ba295ed22291e1fe746aaf05 (commit)
   via  5261c357aef02f63a44060a6bea3e7f614758e08 (commit)
   via  b3381c5c79e2b7ef57a1d035e73d37ec2ee0aa45 (commit)
   via  e2055b172eb4ed40893bc2e110a5640d078eef22 (commit)
   via  17b4423c4509e747814f2c5564239ec72659b6f0 (commit)
   via  a8b2224eb64e9a8b55634ba40dc1354bd3880d3d (commit)
   via  1c29a5583c55f5388f0be230f9cffa660398968e (commit)
  from  7f827ece69940026a557f7906ac6436d24962f57 (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae266f05ef6da227ba295ed22291e1fe746aaf05
commit ae266f05ef6da227ba295ed22291e1fe746aaf05
Merge: 7f827ec 5261c35
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:36:39 2015 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Mon Mar 2 08:36:39 2015 -0500

Merge branch 'master' into next


---

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
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.2.0-rc2-351-ge2055b1

2015-03-02 Thread Brad King
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  e2055b172eb4ed40893bc2e110a5640d078eef22 (commit)
   via  6a661f06030b85b4484733375bbb0aa23eca7446 (commit)
  from  17b4423c4509e747814f2c5564239ec72659b6f0 (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2055b172eb4ed40893bc2e110a5640d078eef22
commit e2055b172eb4ed40893bc2e110a5640d078eef22
Merge: 17b4423 6a661f0
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:36:26 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 08:36:26 2015 -0500

Merge topic 'fix-ctest-update-locale'

6a661f06 CTest: To enforce the C locale use LC_ALL instead of LC_MESSAGES.


---

Summary of changes:
 Source/CTest/cmCTestUpdateHandler.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.2.0-rc2-355-g5261c35

2015-03-02 Thread Brad King
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  5261c357aef02f63a44060a6bea3e7f614758e08 (commit)
   via  cfb22354b8bff1f7eddc117616a80774d456f467 (commit)
  from  b3381c5c79e2b7ef57a1d035e73d37ec2ee0aa45 (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5261c357aef02f63a44060a6bea3e7f614758e08
commit 5261c357aef02f63a44060a6bea3e7f614758e08
Merge: b3381c5 cfb2235
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:36:31 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 08:36:31 2015 -0500

Merge topic 'locale-agnostic-findhg'

cfb22354 FindHg: Run hg with C locale when querying its version.


---

Summary of changes:
 Modules/FindHg.cmake |   10 ++
 1 file changed, 10 insertions(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.2.0-rc2-353-gb3381c5

2015-03-02 Thread Brad King
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  b3381c5c79e2b7ef57a1d035e73d37ec2ee0aa45 (commit)
   via  a7631fc4e026f2e330b10eae73f473f240c3d0c1 (commit)
  from  e2055b172eb4ed40893bc2e110a5640d078eef22 (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3381c5c79e2b7ef57a1d035e73d37ec2ee0aa45
commit b3381c5c79e2b7ef57a1d035e73d37ec2ee0aa45
Merge: e2055b1 a7631fc
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:36:29 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 08:36:29 2015 -0500

Merge topic 'modules-check-ARGC'

a7631fc4 Modules: Check for ARGC before using ARGV#


---

Summary of changes:
 Modules/BundleUtilities.cmake  |6 ++-
 Modules/DeployQt4.cmake|   90 
 Modules/ExternalProject.cmake  |2 +-
 Modules/FeatureSummary.cmake   |   10 +++-
 Modules/FindPkgConfig.cmake|2 +-
 Modules/GenerateExportHeader.cmake |2 +-
 Modules/GetPrerequisites.cmake |   36 ++-
 Modules/Qt4Macros.cmake|   12 +++--
 8 files changed, 121 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.2.0-rc2-349-g17b4423

2015-03-02 Thread Brad King
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  17b4423c4509e747814f2c5564239ec72659b6f0 (commit)
   via  00d66557d49989f9813ba9f04beaa0a984699cf0 (commit)
  from  a8b2224eb64e9a8b55634ba40dc1354bd3880d3d (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17b4423c4509e747814f2c5564239ec72659b6f0
commit 17b4423c4509e747814f2c5564239ec72659b6f0
Merge: a8b2224 00d6655
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:36:24 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 08:36:24 2015 -0500

Merge topic 'fix-crash-on-bad-LANG_STANDARD'

00d66557 Diagnose invalid LANG_STANDARD value instead of crashing (#15426)


---

Summary of changes:
 Source/cmLocalGenerator.cxx   |9 -
 .../NotAStandard-result.txt}  |0
 Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt|4 
 Tests/RunCMake/CompileFeatures/NotAStandard.cmake |2 ++
 Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake |2 ++
 5 files changed, 16 insertions(+), 1 deletion(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt = 
CompileFeatures/NotAStandard-result.txt} (100%)
 create mode 100644 Tests/RunCMake/CompileFeatures/NotAStandard-stderr.txt
 create mode 100644 Tests/RunCMake/CompileFeatures/NotAStandard.cmake


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] CMake Version Compatibility Matrix

2015-03-02 Thread blessjah
Hi,

Wouldn't it be better to have compability matrix generated automatically? 
Assuming we can automate process of building CMake and executing tests for any 
particular version we want, couldn't we create test suite checking if feature X 
works in version Y of CMake? This way we could maintain compability matrix by 
simply adding tests for new features?

Also, including annotations Available since in documentations would be great 
idea.

BR
Michal


On Mon, Mar 02, 2015 at 11:35:12AM +0100, Johannes Zarl wrote:
 Hi,
 
  Is there any chance that the version compatibility matrix will be
  updated for cmake 3.x features?
 
 Short answer: no.
 
 Longer answer:
 I've written and maintained the compatibility matrix before.
 
 The reasons I've stopped maintaining the page:
 (1) Distilling the changes between versions is quite some manual effort 
 (diffing 
 the help text and checking whether something some change reflects a change in 
 cmake or just a doc change) .
 (2) The documentation format changed in cmake 3, which would have meant a 
 very 
 big one-time effort toget the differences between 2.8 and 3.
 (3) I still believe that this could be done much better by including 
 annotations in the documentation itself (Available since:, Deprecated 
 in:).
 
 Hope that explains my reasons,
   Johannes
 
 -- 
 
 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:
 http://public.kitware.com/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:
http://public.kitware.com/mailman/listinfo/cmake


[Cmake-commits] CMake branch, next, updated. v3.2.0-rc2-810-gac5440e

2015-03-02 Thread Brad King
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, next has been updated
   via  ac5440e7341faeac3598711f62eee8039462f72b (commit)
   via  56be75b3107b210631919c13496060d648f97b14 (commit)
   via  6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9 (commit)
  from  ae266f05ef6da227ba295ed22291e1fe746aaf05 (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac5440e7341faeac3598711f62eee8039462f72b
commit ac5440e7341faeac3598711f62eee8039462f72b
Merge: ae266f0 56be75b
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 08:37:35 2015 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Mon Mar 2 08:37:35 2015 -0500

Merge branch 'master' into next


---

Summary of changes:


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.2.0-rc2-357-g56be75b

2015-03-02 Thread Brad King
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  56be75b3107b210631919c13496060d648f97b14 (commit)
   via  6b6852a0ebe6d2c05ea500f78349e4fdbadcecd9 (commit)
  from  5261c357aef02f63a44060a6bea3e7f614758e08 (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:


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] CMake Version Compatibility Matrix

2015-03-02 Thread Johannes Zarl
Hi,

 Is there any chance that the version compatibility matrix will be
 updated for cmake 3.x features?

Short answer: no.

Longer answer:
I've written and maintained the compatibility matrix before.

The reasons I've stopped maintaining the page:
(1) Distilling the changes between versions is quite some manual effort 
(diffing 
the help text and checking whether something some change reflects a change in 
cmake or just a doc change) .
(2) The documentation format changed in cmake 3, which would have meant a very 
big one-time effort toget the differences between 2.8 and 3.
(3) I still believe that this could be done much better by including 
annotations in the documentation itself (Available since:, Deprecated 
in:).

Hope that explains my reasons,
  Johannes

-- 

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:
http://public.kitware.com/mailman/listinfo/cmake


[Cmake-commits] CMake branch, next, updated. v3.2.0-rc2-817-gcf240df

2015-03-02 Thread Brad King
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, next has been updated
   via  cf240dfa5d985e5ac8f7e11abf1bc2646b8b0a9e (commit)
   via  3e98ebbaef9cfa1544f960320ebc4258e82909bd (commit)
  from  b80f57d14676b2f639554496c0b9d19c67e0aa2b (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf240dfa5d985e5ac8f7e11abf1bc2646b8b0a9e
commit cf240dfa5d985e5ac8f7e11abf1bc2646b8b0a9e
Merge: b80f57d 3e98ebb
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 10:11:39 2015 -0500
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 2 10:11:39 2015 -0500

Merge topic 'fix-JOM-quiet-make' into next

3e98ebba JOM: Pass /NOLOGO when driving builds as is done for NMake


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e98ebbaef9cfa1544f960320ebc4258e82909bd
commit 3e98ebbaef9cfa1544f960320ebc4258e82909bd
Author: Brad King brad.k...@kitware.com
AuthorDate: Mon Mar 2 10:08:09 2015 -0500
Commit: Brad King brad.k...@kitware.com
CommitDate: Mon Mar 2 10:08:09 2015 -0500

JOM: Pass /NOLOGO when driving builds as is done for NMake

This fixes RunCMake.(Configure|configure_file|try_compile) test
failures that failed to match empty stderr due to jom printing
its identification line.

diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx 
b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 1d2dd34..5701564 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -563,7 +563,7 @@ void cmGlobalUnixMakefileGenerator3
 
   // Since we have full control over the invocation of nmake, let us
   // make it quiet.
-  if ( this-GetName() == NMake Makefiles )
+  if (cmHasLiteralPrefix(this-GetName(), NMake Makefiles))
 {
 makeCommand.push_back(/NOLOGO);
 }

---

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


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Are CMAKE_CXX_FLAGS supposed to go on the link line?

2015-03-02 Thread Roman Bolshakov
Apparently, command line to link executable is quite different from a
shared library (Modules/CMakeCXXInformation.cmake):

if(NOT CMAKE_CXX_LINK_EXECUTABLE)
  set(CMAKE_CXX_LINK_EXECUTABLE
CMAKE_CXX_COMPILER  FLAGS CMAKE_CXX_LINK_FLAGS LINK_FLAGS
OBJECTS  -o TARGET LINK_LIBRARIES)
endif()


  set(CMAKE_CXX_CREATE_SHARED_LIBRARY
  CMAKE_CXX_COMPILER CMAKE_SHARED_LIBRARY_CXX_FLAGS
LANGUAGE_COMPILE_FLAGS LINK_FLAGS
CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS SONAME_FLAGTARGET_SONAME
-o TARGET OBJECTS LINK_LIBRARIES)

CMAKE_CXX_FLAGS/CMAKE_C_FLAGS which are filled into
LANGUAGE_COMPILE_FLAGS don't go into a linker command for
executable.


2015-01-22 19:11 GMT+03:00 Paul Smith p...@mad-scientist.net:
 I didn't get a response to the question below.  I've since reproduced
 this with a simple test case; maybe someone can let me know why this
 difference appears and how I should handle it?  I'm using cmake 3.1.0:

 Sample CMakeLists.txt:

   $ cat CMakeLists.txt EOF
   cmake_minimum_required(VERSION 3.1.0)
   project(FlagTest)
   set(CMAKE_CXX_FLAGS -pthread)
   add_executable(foo foo.cpp)
   EOF

   $ echo 'int main(int argc, char**argv) { return 0; }'  foo.cpp

 On MacOSX with Xcode installed, I see the following behavior:

   $ cmake -G Xcode .  cmake --build . 21 | tee xc.out

 In the output I see that the -pthread flag DOES appear on the compile
 line for foo.o, but DOES NOT appear in the link line for foo:

   $ grep pthread xc.out
   /.../clang -x c++ ... -pthread ...  -c /.../foo.cpp -o /.../foo.o

 This is correct for clang, which does not want -pthread on the link line
 (unlike GCC, which wants it in both places).  Now, I clean that up and
 try with the Makefile generator, and I see the following behavior:

   $ cmake -G 'Unix Makefiles' .  cmake --build . -- VERBOSE=1 21 | tee 
 mk.out
   clang: warning: argument unused during compilation: '-pthread'

 Now in this case we can see that the -pthread flag was added to BOTH the
 compile and the link line:

   $ grep pthread mk.out
   /usr/bin/c++ -pthread -o .../foo.cpp.o -c .../foo.cpp
   /usr/bin/c++ -pthread .../foo.cpp.o -o foo
   clang: warning: argument unused during compilation: '-pthread'

 This warning is totally bogus: it really means unused during LINKING,
 but anyway: I'm not sure what to do to get rid of this warning: I need
 to support both Xcode and Makefiles on MacOSX (and Makefiles on Linux as
 well as both GCC and Clang).

 Is the intent that CMAKE_CXX_FLAGS only ever appear on the compile line?
 Or should it appear on both the compile and link lines?  Is there an
 equivalent flag to CMAKE_EXE_LINKER_FLAGS that always applies only to
 compile lines, in all generators?  Do we just have to continue to
 bastardize add_definitions() for this, maybe?


 On Thu, 2015-01-08 at 18:52 -0500, Paul Smith wrote:
 If I'm on OSX, then when I set CMAKE_CXX_FLAGS and do not set
 CMAKE_EXE_LINKER_FLAGS, for example, and I use the Xcode generator,
 then
 I see:
   * CMAKE_CXX_FLAGS show up on the compilation line
   * CMAKE_CXX_FLAGS do NOT show up in the linker line

 On the other hand if I'm on OSX and I use the Unix Makefiles
 generator,
 then I see:
   * CMAKE_CXX_FLAGS show up on the compilation line
   * CMAKE_CXX_FLAGS ALSO show up in the linker line

 I assume the Xcode output is correct and the makefile output (with
 CMAKE_CXX_FLAGS in both) is not correct... but there's nothing I can
 find in the docs that says this explicitly.

 I've printed the contents of the CMAKE_CXX_FLAGS and
 CMAKE_EXE_LINKER_FLAGS at the end of my CMakeLists.txt and they're
 just
 what I expect.  It's just that the link line has extra flags, when
 invoked from make.


 --

 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:
 http://public.kitware.com/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:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] FindMPI.cmake and MS-MPI

2015-03-02 Thread Todd Gamblin
Andrew,

Thanks for letting me know.  Let me know if you have any more issues.

Ben: at some point I was the maintainer for FindMPI.  Are you the official
maintainer now?  Do you want to be?  I have very limited ability to test on
Windows, and that seems to be where most of the problems are.

-Todd


From:  Andrew Maclean andrew.amacl...@gmail.com
Reply-To:  andrew.amacl...@gmail.com andrew.amacl...@gmail.com
Date:  Sunday, March 1, 2015 at 11:31 PM
To:  Todd Gamblin tgamb...@llnl.gov, cmake@cmake.org cmake@cmake.org,
Ben Boeckel ben.boec...@kitware.com
Subject:  Re: FindMPI.cmake and MS-MPI

 Please ignore my emails regarding this. Apparently Ben Boeckel has fixed these
 issues in CMake 3.2.0-rc1. Sorry for the unnecessary bandwidth utilization!
 
 I can confirm that the VTK master version works OK with MS-MPI.
 
 Regards
Andrew
 
 
 On Mon, Mar 2, 2015 at 9:58 AM, Andrew Maclean andrew.amacl...@gmail.com
 wrote:
 Some further information, ignore the CMP0054 warning it is not triggered when
 the CMake Minimum Version is 3.1
 
 When running FindMPI.cmake, I discovered that I had a spurious registry entry
 for an older version of MPI so mpiexec.exe was not being found. When I
 deleted this it found mpiexec.exe in C:/Program Files/Microsoft
 MPI/Bin/mpiexec.exe OK. I think the key for
 HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI should still be there before the
 other registry keys.
 
 You definitely need the new lib and include paths.
 
 I was able to use FindMPI.cmake and just add in these paths manually.
 
 Hope this helps.
 
 Regards
Andrew
 
 
 On Sun, Mar 1, 2015 at 3:54 PM, Andrew Maclean andrew.amacl...@gmail.com
 wrote:
 Re-sending because David in no longer at Kitware.
 
 I downloaded and installed MS-MPI from
 http://www.microsoft.com/en-us/download/details.aspx?id=44990
 
 This implementation does not work with FindMPI.cmake.
 
 The includes and libs are found in:
 C:/Program Files (x86)/Microsoft SDKs/MPI/
 and mpiexec.exe is in: C:/Program Files/Microsoft MPI/Bin/
 
 I had to do the following changes to get it working. Perhaps you would like
 to edit FIndMPI.cmake to incorporate these changes:
 --
 # Require MPI for this project:
 if(WIN32)
   #This is for finding MS-MPI.
   #set(_MPI_PREFIX_PATH)
   #list(APPEND _MPI_PREFIX_PATH
 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;Path]/..)
   set(MPIEXEC C:/Program Files/Microsoft MPI/Bin/mpiexec.exe)
   # For building MPI programs the selected Visual Studio compiler is used,
 namely cl.exe.
   # So there is no need to set a specific MPI compiler.
   #set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
   set(MPI_CXX_INCLUDE_PATH C:/Program Files (x86)/Microsoft
 SDKs/MPI/Include)
   # Make sure the correct libraries (64-bit or 32-bit) are selected.
   # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
   if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
 set(MS_MPI_ARCH_DIR x64)
   else()
 set(MS_MPI_ARCH_DIR x86)
   endif()
   set(MPI_CXX_LIBRARIES C:/Program Files (x86)/Microsoft
 SDKs/MPI/Lib/${MS_MPI_ARCH_DIR}/msmpi.lib)
   set(MPI_C_INCLUDE_PATH ${MPI_CXX_INCLUDE_PATH})
   set(MPI_C_LIBRARIES {${MPI_CXX_LIBRARIES})
   set(MPIEXEC_NUMPROC_FLAG -np CACHE STRING Flag used by MPI to specify
 the number of processes for MPIEXEC; the next option will be the number of
 processes.)
 else()
 find_package(MPI REQUIRED)
 endif()
 
 Some of this is taken from FindMPI.cmake.
 
 Attached is a zipped up file of the working CMakeLists.txt file and a test
 file for you.
 
 I looked at FindMPI.cmake but I think you guys are better placed to make the
 changes.
 
 Also in the case of FindMPI.cmake, you will need to fix the following
 warning message:
 
 CMake Warning (dev) at C:/Program Files
 (x86)/CMake/share/cmake-3.1/Modules/FindMPI.cmake:163 (if):
 Policy CMP0054 is not set: Only interpret if() arguments as variables or
 keywords when unquoted. Run cmake --help-policy CMP0054 for policy
 details. Use the cmake_policy command to set the policy and suppress this
 warning.
 
 Quoted variables like MSVC will no longer be dereferenced when the policy
 is set to NEW. Since the policy is not set the OLD behavior will be used.
 Call Stack (most recent call first):
 CMakeLists.txt:5 (find_package)
 This warning is for project developers. Use -Wno-dev to suppress it.CMake
 Warning (dev) at C:/Program Files
 (x86)/CMake/share/cmake-3.1/Modules/FindMPI.cmake:163 (if):
 Policy CMP0054 is not set: Only interpret if() arguments as variables or
 keywords when unquoted. Run cmake --help-policy CMP0054 for policy
 details. Use the cmake_policy command to set the policy and suppress this
 warning.
 
 Quoted variables like MSVC will no longer be dereferenced when the policy
 is set to NEW. Since the policy is not set the OLD behavior will be used.
 Call Stack (most recent call first):
 CMakeLists.txt:5 (find_package)
 This warning is for project developers. Use -Wno-dev to suppress it.
 
 
 Regards
 
 Andrew
 
 
 -- 
 

Re: [CMake] Are CMAKE_CXX_FLAGS supposed to go on the link line?

2015-03-02 Thread Clinton Stimpson
FYI,

I also came across this discrepancy recently, and logged a bug for it.
http://www.cmake.org/Bug/view.php?id=15427

With the example provided in the bug report, I am seeing link errors under 
Xcode which I do not see under Makefiles.

Clint 

On Monday, March 02, 2015 07:33:38 PM Roman Bolshakov wrote:
 Apparently, command line to link executable is quite different from a
 shared library (Modules/CMakeCXXInformation.cmake):
 
 if(NOT CMAKE_CXX_LINK_EXECUTABLE)
   set(CMAKE_CXX_LINK_EXECUTABLE
 CMAKE_CXX_COMPILER  FLAGS CMAKE_CXX_LINK_FLAGS LINK_FLAGS
 OBJECTS  -o TARGET LINK_LIBRARIES)
 endif()
 
 
   set(CMAKE_CXX_CREATE_SHARED_LIBRARY
   CMAKE_CXX_COMPILER CMAKE_SHARED_LIBRARY_CXX_FLAGS
 LANGUAGE_COMPILE_FLAGS LINK_FLAGS
 CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS SONAME_FLAGTARGET_SONAME
 -o TARGET OBJECTS LINK_LIBRARIES)
 
 CMAKE_CXX_FLAGS/CMAKE_C_FLAGS which are filled into
 LANGUAGE_COMPILE_FLAGS don't go into a linker command for
 executable.
 
 2015-01-22 19:11 GMT+03:00 Paul Smith p...@mad-scientist.net:
  I didn't get a response to the question below.  I've since reproduced
  this with a simple test case; maybe someone can let me know why this
  difference appears and how I should handle it?  I'm using cmake 3.1.0:
  
  Sample CMakeLists.txt:
$ cat CMakeLists.txt EOF
cmake_minimum_required(VERSION 3.1.0)
project(FlagTest)
set(CMAKE_CXX_FLAGS -pthread)
add_executable(foo foo.cpp)
EOF

$ echo 'int main(int argc, char**argv) { return 0; }'  foo.cpp
  
  On MacOSX with Xcode installed, I see the following behavior:
$ cmake -G Xcode .  cmake --build . 21 | tee xc.out
  
  In the output I see that the -pthread flag DOES appear on the compile
  
  line for foo.o, but DOES NOT appear in the link line for foo:
$ grep pthread xc.out
/.../clang -x c++ ... -pthread ...  -c /.../foo.cpp -o /.../foo.o
  
  This is correct for clang, which does not want -pthread on the link line
  (unlike GCC, which wants it in both places).  Now, I clean that up and
  
  try with the Makefile generator, and I see the following behavior:
$ cmake -G 'Unix Makefiles' .  cmake --build . -- VERBOSE=1 21 | tee
mk.out clang: warning: argument unused during compilation: '-pthread'
  
  Now in this case we can see that the -pthread flag was added to BOTH the
  
  compile and the link line:
$ grep pthread mk.out
/usr/bin/c++ -pthread -o .../foo.cpp.o -c .../foo.cpp
/usr/bin/c++ -pthread .../foo.cpp.o -o foo
clang: warning: argument unused during compilation: '-pthread'
  
  This warning is totally bogus: it really means unused during LINKING,
  but anyway: I'm not sure what to do to get rid of this warning: I need
  to support both Xcode and Makefiles on MacOSX (and Makefiles on Linux as
  well as both GCC and Clang).
  
  Is the intent that CMAKE_CXX_FLAGS only ever appear on the compile line?
  Or should it appear on both the compile and link lines?  Is there an
  equivalent flag to CMAKE_EXE_LINKER_FLAGS that always applies only to
  compile lines, in all generators?  Do we just have to continue to
  bastardize add_definitions() for this, maybe?
  
  On Thu, 2015-01-08 at 18:52 -0500, Paul Smith wrote:
  If I'm on OSX, then when I set CMAKE_CXX_FLAGS and do not set
  CMAKE_EXE_LINKER_FLAGS, for example, and I use the Xcode generator,
  then
  
  I see:
* CMAKE_CXX_FLAGS show up on the compilation line
* CMAKE_CXX_FLAGS do NOT show up in the linker line
  
  On the other hand if I'm on OSX and I use the Unix Makefiles
  generator,
  
  then I see:
* CMAKE_CXX_FLAGS show up on the compilation line
* CMAKE_CXX_FLAGS ALSO show up in the linker line
  
  I assume the Xcode output is correct and the makefile output (with
  CMAKE_CXX_FLAGS in both) is not correct... but there's nothing I can
  find in the docs that says this explicitly.
  
  I've printed the contents of the CMAKE_CXX_FLAGS and
  CMAKE_EXE_LINKER_FLAGS at the end of my CMakeLists.txt and they're
  just
  what I expect.  It's just that the link line has extra flags, when
  invoked from make.
  
  --
  
  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:
  http://public.kitware.com/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, 

Re: [CMake] FindMPI.cmake and MS-MPI

2015-03-02 Thread Todd Gamblin
Ok, sounds good to me!

On 3/2/15, 11:10 AM, Ben Boeckel ben.boec...@kitware.com wrote:

On Mon, Mar 02, 2015 at 09:19:00 -0800, Todd Gamblin wrote:
 Thanks for letting me know.  Let me know if you have any more issues.
 
 Ben: at some point I was the maintainer for FindMPI.  Are you the
official
 maintainer now?  Do you want to be?  I have very limited ability to
test on
 Windows, and that seems to be where most of the problems are.

I'm not the official maintainer and am not *that* familiar with MPI, so
I'm probably not the best choice. If you have issues with MPI on
Windows, you can push them my way to test if you'd like.

--Ben


-- 

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:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] FindMPI.cmake and MS-MPI

2015-03-02 Thread Ben Boeckel
On Mon, Mar 02, 2015 at 09:19:00 -0800, Todd Gamblin wrote:
 Thanks for letting me know.  Let me know if you have any more issues.
 
 Ben: at some point I was the maintainer for FindMPI.  Are you the official
 maintainer now?  Do you want to be?  I have very limited ability to test on
 Windows, and that seems to be where most of the problems are.

I'm not the official maintainer and am not *that* familiar with MPI, so
I'm probably not the best choice. If you have issues with MPI on
Windows, you can push them my way to test if you'd like.

--Ben
-- 

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:
http://public.kitware.com/mailman/listinfo/cmake