[Cmake-commits] CMake branch, master, updated. v3.13.0-rc3-470-g7aa4109

2018-11-15 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  7aa41095fd23d31a4572966ba53ad85f61f5bc99 (commit)
  from  b32474322907fcd2658ad964847fc62b02659517 (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=7aa41095fd23d31a4572966ba53ad85f61f5bc99
commit 7aa41095fd23d31a4572966ba53ad85f61f5bc99
Author: Kitware Robot 
AuthorDate: Fri Nov 16 00:01:04 2018 -0500
Commit: Kitware Robot 
CommitDate: Fri Nov 16 00:01:04 2018 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 616e7d8..94e60fc 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 13)
-set(CMake_VERSION_PATCH 20181115)
+set(CMake_VERSION_PATCH 20181116)
 #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] How to fix the following based on CMP0053 policy

2018-11-15 Thread Scott Bloom
I have an older 3rd party (that is no longer supported) cmake file, that relies 
on the CMP0053 OLD setting

Since I have moved to 3.12, Im getting the warning that its deprecated etc...

SC_CHECK_BROKEN_FUNC(
  strstr "
extern int strstr();
exit(strstr(\"\\\0test\", \"test\") ? 1 : 0);"
  )


However, when I turn the policy to "NEW" it errors out with
Syntax error in cmake code at  when parsing string
extern int strstr();

exit(strstr(\"\\\0test\", \"test\") ? 1 : 0);

  Invalid character escape '\0'.


However, that is the whole test, ie that the escaped 0 check works.

How should I change the strings generation so it works with the new policy?

Scott
-- 

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.13.0-rc3-469-gb324743

2018-11-15 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  b32474322907fcd2658ad964847fc62b02659517 (commit)
   via  a26ac919ef0a098b88c3764d5471f5852071f239 (commit)
  from  1763f0428193cd6e28af4e49131516299acdf3b7 (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=b32474322907fcd2658ad964847fc62b02659517
commit b32474322907fcd2658ad964847fc62b02659517
Merge: 1763f04 a26ac91
Author: Brad King 
AuthorDate: Thu Nov 15 18:49:51 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 13:49:58 2018 -0500

Merge topic 'cpack'

a26ac919ef Help: Explain interaction of cpack(1) and CPack.

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a26ac919ef0a098b88c3764d5471f5852071f239
commit a26ac919ef0a098b88c3764d5471f5852071f239
Author: Joachim Wuttke (l) 
AuthorDate: Wed Nov 14 23:35:22 2018 +0100
Commit: Joachim Wuttke (o) 
CommitDate: Thu Nov 15 16:50:52 2018 +0100

Help: Explain interaction of cpack(1) and CPack.

In particular, make clear that package/installer generators
are not the makefile generators of the cmake command.

Also insert sections in CPack doc, and capitalize section titles.

diff --git a/Help/manual/cpack.1.rst b/Help/manual/cpack.1.rst
index 6159d7b..9ddab1e 100644
--- a/Help/manual/cpack.1.rst
+++ b/Help/manual/cpack.1.rst
@@ -13,12 +13,29 @@ Synopsis
 Description
 ===
 
-The ``cpack`` executable is the CMake packaging program.
-CMake projects use :command:`install` commands to define the contents of
-packages which can be generated in various formats by this tool.
-The :module:`CPack` module greatly simplifies the creation of the input file
-used by ``cpack``, allowing most aspects of the packaging configuration to be
-controlled directly from the CMake project's own ``CMakeLists.txt`` files.
+The ``cpack`` executable is the CMake packaging program.  It generates
+installers and source packages in a variety of formats.
+
+For each installer or package format, ``cpack`` has a specific backend,
+called "generator". A generator is responsible for generating the required
+inputs and invoking the specific package creation tools. These installer
+or package generators are not to be confused with the makefile generators
+of the :manual:`cmake ` command.
+
+All supported generators are specified in the :manual:`cpack-generators
+` manual.  The command ``cpack --help`` prints a
+list of generators supported for the target platform.  Which of them are
+to be used can be selected through the :variable:`CPACK_GENERATOR` variable
+or through the command-line option ``-G``.
+
+The ``cpack`` program is steered by a configuration file written in the
+:manual:`CMake language `. Unless chosen differently
+through the command-line option ``--config``, the file ``CPackConfig.cmake``
+in the current directory is used.
+
+In the standard CMake workflow, the file ``CPackConfig.cmake`` is generated
+by the :manual:`cmake ` executable, provided the :module:`CPack`
+module is included by the project's ``CMakeLists.txt`` file.
 
 Options
 ===
@@ -27,14 +44,9 @@ Options
    is a :ref:`semicolon-separated list `
   of generator names.  ``cpack`` will iterate through this list and produce
   package(s) in that generator's format according to the details provided in
-  the ``CPackConfig.cmake`` configuration file.  A generator is responsible for
-  generating the required inputs for a particular package system and invoking
-  that system's package creation tools.  All supported generators are specified
-  in the :manual:`Generators ` section of the manual and
-  the ``--help`` option lists the generators supported for the target platform.
-
-  If this option is not given, the :variable:`CPACK_GENERATOR` variable
-  determines the default set of generators that will be used.
+  the ``CPackConfig.cmake`` configuration file.  If this option is not given,
+  the :variable:`CPACK_GENERATOR` variable determines the default set of
+  generators that will be used.
 
 ``-C ``
   Specify the project configuration to be packaged (e.g. ``Debug``,
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index ebce851..c9008db 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -10,20 +10,23 @@ Build binary and source package installers.
 Introduction
 
 
-The CPack module generates binary and source installers in a variety of
-formats using the cpack program.  Inclusion of the CPack module adds
-two new build targets, ``package`` and ``package_source``, which build
-the binary and source 

[Cmake-commits] CMake branch, master, updated. v3.13.0-rc3-467-g1763f04

2018-11-15 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  1763f0428193cd6e28af4e49131516299acdf3b7 (commit)
   via  20aab1a4e7e42ac400a34143403a00c0ac0ec947 (commit)
   via  59fc717c252fb6613b35ff3a7d2cf01e91ab6a69 (commit)
   via  0f5c1b404b0f9cbe652cf306e9dca0c25c70876f (commit)
   via  f3a381115fcd9046d754697a67b65a22e05554b5 (commit)
   via  0dbcc1afbf9c85ac938f533fd7756f0dec9bef70 (commit)
   via  6199637e9540627b03d9018ff53a14f005274607 (commit)
  from  64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034 (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=1763f0428193cd6e28af4e49131516299acdf3b7
commit 1763f0428193cd6e28af4e49131516299acdf3b7
Merge: 20aab1a f3a3811
Author: Brad King 
AuthorDate: Thu Nov 15 15:40:56 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 10:41:07 2018 -0500

Merge topic 'test-WriteBasicConfigVersionFile'

f3a381115f Tests: Simplify RunCMake.WriteBasicConfigVersionFile
0dbcc1afbf Tests: Factor out RunCMake.WriteBasicConfigVersionFile test

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20aab1a4e7e42ac400a34143403a00c0ac0ec947
commit 20aab1a4e7e42ac400a34143403a00c0ac0ec947
Merge: 59fc717 6199637
Author: Brad King 
AuthorDate: Thu Nov 15 15:40:12 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 10:40:33 2018 -0500

Merge topic 'configure_file-canonical-deps'

6199637e95 configure_file: canonicalize input and output path in 
dependencies

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59fc717c252fb6613b35ff3a7d2cf01e91ab6a69
commit 59fc717c252fb6613b35ff3a7d2cf01e91ab6a69
Merge: 64df9ef 0f5c1b4
Author: Brad King 
AuthorDate: Thu Nov 15 15:39:48 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 10:39:55 2018 -0500

Merge topic 'deprecate-findqt'

0f5c1b404b find_package(): Add policy to remove the FindQt module

Acked-by: Kitware Robot 
Acked-by: noo mook 
Merge-request: !2554


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f5c1b404b0f9cbe652cf306e9dca0c25c70876f
commit 0f5c1b404b0f9cbe652cf306e9dca0c25c70876f
Author: Kyle Edwards 
AuthorDate: Wed Oct 31 13:26:04 2018 -0400
Commit: Brad King 
CommitDate: Wed Nov 14 15:05:06 2018 -0500

find_package(): Add policy to remove the FindQt module

Removing FindQt.cmake gives Qt upstream a path forward to export its
own QtConfig.cmake files which can be found by find_package()
without having to explicitly specify CONFIG. Projects that still
want to use Qt3/4 can call find_package(Qt[34]), include(FindQt),
or add FindQt.cmake to their CMAKE_MODULE_PATH.

diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index 95744df..68bbc12 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -225,7 +225,6 @@ They are normally called through the 
:command:`find_package` command.
/module/FindPython3
/module/FindQt3
/module/FindQt4
-   /module/FindQt
/module/FindQuickTime
/module/FindRTI
/module/FindRuby
@@ -283,6 +282,7 @@ Deprecated Find Modules
/module/FindCUDA
/module/FindPythonInterp
/module/FindPythonLibs
+   /module/FindQt
/module/FindwxWindows
 
 Legacy CPack Modules
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 98279ef..7c0fe6d 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.14
 .. toctree::
:maxdepth: 1
 
+   CMP0084: The FindQt module does not exist for find_package(). 

CMP0083: Add PIE options when linking executable. 
CMP0082: Install rules from add_subdirectory() are interleaved with those 
in caller. 
 
diff --git a/Help/policy/CMP0084.rst b/Help/policy/CMP0084.rst
new file mode 100644
index 000..713d295
--- /dev/null
+++ b/Help/policy/CMP0084.rst
@@ -0,0 +1,26 @@
+CMP0084
+---
+
+The :module:`FindQt` module does not exist for :command:`find_package`.
+
+The existence of :module:`FindQt` means that for Qt upstream to provide
+package config files that can be found by ``find_package(Qt)``, the consuming
+project has to explicitly specify ``find_package(Qt CONFIG)``. Removing this
+module gives Qt a path forward for exporting its own config files which can
+easily be found by consuming projects.
+
+This policy pretends that CMake's internal :module:`FindQt` module does not
+exist for :command:`find_package`. If a project 

Re: [CMake] Windows .rc resource files in Fortran projects?

2018-11-15 Thread Volker Enderlein

Hi,

how does the project command looks inside your CMakeLists.txt file?

project( LANGUAGES Fortran) should work

Cheers Volker

Am 15.11.2018 um 14:35 schrieb Magne Rudshaug:


Hi,

In some of my Fortran projects I have Windows resource files of type 
.rc associated. Just listing this file along with the other Fortran 
source files doesn’t work.


In this case the project is interpreted as a C/C++ project. How can I 
get cmake to treat the .rc file correctly (compiled by the resource 
compiler) and at the same


time interpret the project as a Fortran project?

Thanks in advance for any reply?

Magne




--

--

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.13.0-rc3-460-g64df9ef

2018-11-15 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  64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034 (commit)
   via  f21bad80a297e26b886f15f38f4d87cc5ce9687f (commit)
   via  b3d1d6d895355ee64c74cef1ab0040db02f81894 (commit)
   via  bd2c17d614e89b5786937565302c6fa54f121d22 (commit)
   via  22cca9b8100a59cd156e2ba39819171a0cf71881 (commit)
   via  a82282a08c2ddf2eb3a89d61fbf53af1af3c4de9 (commit)
   via  b90ae70a3b3c77109a31dfc275b778205a817d1a (commit)
   via  bfbc5241e928203f934fd4fd83fa8beb35b0fe96 (commit)
   via  3e5a047f1aee1059d262b4096c5059ce2acad147 (commit)
   via  06cc050c1fa6141e5c376230ef7ab19ba2942a08 (commit)
   via  e0c26406aa53b5dc4c942017eaf2410d0057aa9a (commit)
   via  83bbfb1d53077176af86d637f713652e3ee01198 (commit)
   via  01d5e5c460a2a9cb3962990f8ef278389254f30a (commit)
   via  ca355d92d827a26d626a241535fe710600eead0d (commit)
  from  44a5400d105b957d27780d515d0f1d51781f8de9 (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=64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034
commit 64df9ef33a2f4eb9ef0cb17a2844308d9c7f7034
Merge: f21bad8 e0c2640
Author: Brad King 
AuthorDate: Thu Nov 15 13:37:48 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 08:38:12 2018 -0500

Merge topic 'autogen_info_write'

e0c26406aa Autogen: Sort tests
83bbfb1d53 Autogen: Add a definitions test to the MocOnly test
01d5e5c460 Autogen: Add and use cmQtAutoGenInitializer::InfoWriter class

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f21bad80a297e26b886f15f38f4d87cc5ce9687f
commit f21bad80a297e26b886f15f38f4d87cc5ce9687f
Merge: b3d1d6d ca355d9
Author: Brad King 
AuthorDate: Thu Nov 15 13:37:22 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 08:37:32 2018 -0500

Merge topic 'test-XcodeProject-timeout'

ca355d92d8 Tests: Add option for custom RunCMake.XcodeProject timeout

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3d1d6d895355ee64c74cef1ab0040db02f81894
commit b3d1d6d895355ee64c74cef1ab0040db02f81894
Merge: bd2c17d a82282a
Author: Brad King 
AuthorDate: Thu Nov 15 13:36:18 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 08:36:52 2018 -0500

Merge topic 'doc-developer-to-source-guide'

a82282a08c Help/dev: Factor out a CMake Documentation Guide for developing 
the docs
bfbc5241e9 Help: Fix policy markup example in cmake-developer(7)
3e5a047f1a Help: Drop compile features section from cmake-developer(7) 
manual
06cc050c1f Help/dev: Drop 'size_t' preference from source code guide

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd2c17d614e89b5786937565302c6fa54f121d22
commit bd2c17d614e89b5786937565302c6fa54f121d22
Merge: 44a5400 22cca9b
Author: Brad King 
AuthorDate: Thu Nov 15 13:35:54 2018 +
Commit: Kitware Robot 
CommitDate: Thu Nov 15 08:36:02 2018 -0500

Merge topic 'macro3'

22cca9b810 Help: describe differences between macro and function.
b90ae70a3b Help: in macro vs function example, use lowercase names.

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


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22cca9b8100a59cd156e2ba39819171a0cf71881
commit 22cca9b8100a59cd156e2ba39819171a0cf71881
Author: Joachim Wuttke (l) 
AuthorDate: Wed Nov 14 20:50:59 2018 +0100
Commit: Joachim Wuttke (l) 
CommitDate: Wed Nov 14 21:56:23 2018 +0100

Help: describe differences between macro and function.

diff --git a/Help/command/function.rst b/Help/command/function.rst
index 7b10381..53ba754 100644
--- a/Help/command/function.rst
+++ b/Help/command/function.rst
@@ -23,6 +23,9 @@ details.
 See the :command:`cmake_policy()` command documentation for the behavior
 of policies inside functions.
 
+See the :command:`macro()` command documentation for differences
+between CMake functions and macros.
+
 Invocation
 ^^
 
diff --git a/Help/command/macro.rst b/Help/command/macro.rst
index 7450929..42a99fc 100644
--- a/Help/command/macro.rst
+++ b/Help/command/macro.rst
@@ -21,6 +21,9 @@ argument of the opening ``macro`` command.
 See the :command:`cmake_policy()` command documentation for the behavior
 of policies inside macros.
 
+See the :ref:`Macro vs Function` section below for differences
+between CMake macros and :command:`functions `.
+
 Invocation
 ^^
 
@@ -65,13 +68,36 @@ behavior. Checking that ``${ARGC}`` is greater than 

[CMake] Windows .rc resource files in Fortran projects?

2018-11-15 Thread Magne Rudshaug
Hi,

In some of my Fortran projects I have Windows resource files of type .rc 
associated. Just listing this file along with the other Fortran source files 
doesn't work.
In this case the project is interpreted as a C/C++ project. How can I get cmake 
to treat the .rc file correctly (compiled by the resource compiler) and at the 
same
time interpret the project as a Fortran project?

Thanks in advance for any reply?

Magne
-- 

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] Odd Behavior in macOS Mojave

2018-11-15 Thread Bo Zhou
At MacOS, in 99% cases, the build task always needs to setup the variables

   - CMAKE_OSX_TARGET
   - CMAKE_OSX_DEPLOYMENT_TARGET

This 2 variables are important. The CMAKE_OSX_TARGET would define the
minimal set of API during compilation, and this affects the built binary.
The second is the path to the OSX SDK, usually it stays
in 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
. Since SDK changes file and directory structure according the language
feature, this is important to the program which has to use C++11 or C++14
or new header files.

Personally I only use 10.9 SDK, which is the first version migrated to
C++11, and SDK changed a lot compared to 10.8, and the program is
compatible with the later system.

On Thu, Nov 15, 2018 at 3:42 AM Steven Stallion  wrote:

> On Wed, Nov 14, 2018 at 10:54 AM Sean McBride 
> wrote:
>
> > I see.  Well, I just checked my macOS 10.14.1 / Xcode 10.1 bot
> "RogueResearch12" and indeed it does not have a /usr/include folder.  It is
> however able to build CMake, VTK, and ITK nightly without any compiler
> errors.
> >
> > Perhaps it's not so much a CMake bug as a bug in the project you're
> trying to build?
>
> Interesting. I'll take another look - I wonder if it's a bad
> interaction from calling clang from a custom command.
>
> Thanks for taking a look!
> Steve
> --
>
> 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] cmake 3.12 - python libs / 32 / 64 bits

2018-11-15 Thread Eric Noulard
Le jeu. 15 nov. 2018 à 09:47, Stéphane Ancelot  a
écrit :

> I agree. That was a debug snippet...but is wrong ... I setted up again the
> toolchain, but does not help.
>

If you are using a proper toolchain for 32bit compilation.
It looks like a bug in the find_package for Python in the cross-compiling
case.
Do you have a stripped down example which exhibit the issue?
Which version of CMake are you using?


>  So, I know where are include_dirs and libs  for 32 bits cross compiling,
> I have to hardcode it like this ?
>
>  add_library(python SHARED IMPORTED)
>  set_target_properties( python PROPERTIES IMPORTED_LOCATION /usr/lib32/
> libpython2.6.so )
>  target_include_directories(python SYSTEM ...
>

I think you can do that but it replaces the use of find_package(Python2
COMPONENTS Development)
may be fixing this would be a better long-term solution ?



>
>
> Le 14/11/2018 à 17:53, Marc CHEVRIER a écrit :
>
> The way you proceed is wrong.
> The system configuration is determined during the 'project' function call.
> Setting information after this call is useless. So, in your example, on a
> 64bit system, the compilation configuration will be 64bit (variable
> CMAKE_SIZEOF_VOID_P has value 8).
> This explain why 'FIND_LIBRARY_USE_LIB32_PATHS' has no effect. This
> property is taken in consideration only on 32bit systems.
>
> Moreover, I am not sure that modifying variable 'CMAKE_SYSTEM_PROCESSOR'
> is a valid action.
>
> To configure a 32bit compilation environment, two possibilities:
> * using environment variables: env CFLAGS=-m32 CXXFLAGS=-m32 cmake ...
> * using a toolchain file: see
> https://cmake.org/cmake/help/v3.13/manual/cmake-toolchains.7.html
>
>
> Le mer. 14 nov. 2018 à 14:06, Stéphane Ancelot 
> a écrit :
>
>> Hi,
>>
>> My system is 64 bits but I can cross compile python c modules for 32 bits
>> .
>>
>> Unfortunately I don't manage to retrieve python 32 libs , always the 64
>> bits version is found.
>>
>>
>> here is what I tried :
>>
>> cmake_minimum_required(VERSION 3.10)
>> project(py_autom)
>>
>>
>> set(CMAKE_SYSTEM_PROCESSOR "i686")
>>
>> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
>> set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
>>
>> set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
>> set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
>>
>> include_directories(python2.6)
>> find_package(Python2 COMPONENTS Development)
>>
>>
>>
>> message(STATUS "python ${PYTHON_INCLUDE_DIRS} ${Python2_LIBRARIES_DIR}
>> ${Python2_FOUND}")
>>
>> Regards
>>
>> Steph
>> --
>>
>> 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
>


-- 
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] cmake 3.12 - python libs / 32 / 64 bits

2018-11-15 Thread Stéphane Ancelot
I agree. That was a debug snippet...but is wrong ... I setted up again 
the toolchain, but does not help.


 So, I know where are include_dirs and libs  for 32 bits cross 
compiling, I have to hardcode it like this ?


 add_library(python SHARED IMPORTED)
 set_target_properties( python PROPERTIES IMPORTED_LOCATION 
/usr/lib32/libpython2.6.so )

 target_include_directories(python SYSTEM ...


Le 14/11/2018 à 17:53, Marc CHEVRIER a écrit :

The way you proceed is wrong.
The system configuration is determined during the 'project' function 
call. Setting information after this call is useless. So, in your 
example, on a 64bit system, the compilation configuration will be 
64bit (variable CMAKE_SIZEOF_VOID_P has value 8).
This explain why 'FIND_LIBRARY_USE_LIB32_PATHS' has no effect. This 
property is taken in consideration only on 32bit systems.


Moreover, I am not sure that modifying variable 
'CMAKE_SYSTEM_PROCESSOR' is a valid action.


To configure a 32bit compilation environment, two possibilities:
* using environment variables: env CFLAGS=-m32 CXXFLAGS=-m32 cmake ...
* using a toolchain file: see 
https://cmake.org/cmake/help/v3.13/manual/cmake-toolchains.7.html



Le mer. 14 nov. 2018 à 14:06, Stéphane Ancelot 
mailto:sance...@numalliance.com>> a écrit :


Hi,

My system is 64 bits but I can cross compile python c modules for
32 bits .

Unfortunately I don't manage to retrieve python 32 libs , always
the 64
bits version is found.


here is what I tried :

cmake_minimum_required(VERSION 3.10)
project(py_autom)


set(CMAKE_SYSTEM_PROCESSOR "i686")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++
flags")
set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")

set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)

include_directories(python2.6)
find_package(Python2 COMPONENTS Development)



message(STATUS "python ${PYTHON_INCLUDE_DIRS}
${Python2_LIBRARIES_DIR}
${Python2_FOUND}")

Regards

Steph
-- 


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