Re: [CMake] find_library doesn't find .dll on windows

2018-06-12 Thread Bo Zhou
Hi,

This is a feature/problem on Windows, the library used for dynamic linking
is not the runtime module as Linux or OSX but the .lib, a collection of
symbols.

I suggest you could still use find_library() to locate the .lib file for
linking, then use find_file() to collect the runtime file then install it
to the distribution.

Thanks.

On Fri, Jun 1, 2018 at 11:53 PM Romain LEGUAY 
wrote:

> Hi everyone,
>
> I try to find MYSQL dynamic library on windows.
> For this, I use the following command:
>
> set(_PF86 "ProgramFiles(x86)")
> find_library( MYSQL_LIBRARY
> NAME "libmysql.dll"
> PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib"
>   "$ENV{${_PF86}}/MySQL/*/lib"
>   "$ENV{SYSTEMDRIVE}/MySQL/*/lib"
>   NO_DEFAULT_PATH)
>
> This command doesn't work on my computer (Windows 10 Pro x64, CMake
> 3.11.3).
> If I remove the .dll extension, find_library find libmysql.lib which is in
> the same folder as libmysql.dll.
>
> How to say to CMake to use the name I chosen?
>
> Thank you!
> Romain
> --
>
> 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-commits] CMake branch, master, updated. v3.11.3-946-gcfac183

2018-06-12 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  cfac183295d9ce18403b0aa22c038a814f06832f (commit)
  from  71f58d6bf7e02cd44c5d49d7b127ca6d99abdbeb (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=cfac183295d9ce18403b0aa22c038a814f06832f
commit cfac183295d9ce18403b0aa22c038a814f06832f
Author: Kitware Robot 
AuthorDate: Wed Jun 13 00:01:12 2018 -0400
Commit: Kitware Robot 
CommitDate: Wed Jun 13 00:01:12 2018 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 8662efc..96228d8 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 20180612)
+set(CMake_VERSION_PATCH 20180613)
 #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] CMakeLists.txt in different place than source

2018-06-12 Thread Andrew White
I have a situation where I want my CMakeLists.txt in a different place than my 
source.

e.g.:

/some/path/project/CMakeLists.txt
/other/path/source/src/a.c
/other/path/source/include/a.h

Is there an easy way to say "process this CMakeLists.txt as if it were in 
/other/path/source" (at least as far as file paths are concerned)?

e.g.:

add_library(my_lib
src/a.c
include/a.h
)

target_include_directories(my_lib PUBLIC include)

I know I can add a full path prefix to every file, but there are a lot of them. 
 I'm hoping for a shortcut.

--
Andrew


-- 

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] Is there a way to customize the generate step trigger?

2018-06-12 Thread Ulrich Hierl

Hi folks,

my cmake code reads version tags from the underlying git repository, 
derives a new version with the help of the existing tags and then sets 
that new version to the project() call. However, the cmake generate step 
is not triggered when the version tags in the repository change, so the 
version that is compiled into the project is not always up-to-date. So I 
was wondering if CMake offers the possibility to customize the 
up-to-date check of the generate step, to make it automatically re-run 
when the tags in the repository are changed?


Thank you for your time.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


[cmake-developers] Using pkgconf

2018-06-12 Thread Paul Fultz II via cmake-developers
Hi All,

So from a previous threads, we were discussing pkgconfig and cmake 
interoperability. One issue with using pkgconfig currently, is that the results 
are completely flat. This is due to using the CLI to retrieve pkgconfig, which 
gives the user all the flags from every transitive package. This is great from 
a user perspective, but from cmake perspective not so because may already being 
using one of the transitive dependencies.

So instead of using the CLI, there is a library implementation of pkgconfig 
called pkgconf:

https://github.com/pkgconf/pkgconf 
http://pkgconf.readthedocs.io/en/latest/ 


CMake could use pkgconf internally, and then use functions like 
`pkgconf_pkg_traverse` to iterate over the transitive dependencies. We could 
use variable in the .pc files like `cmake_package` to know which cmake package 
the dependency belongs to or perhaps `cmake_target` to set the name of the 
cmake imported target. 

Daniel Pfeiffer proposed supporting pkgconfig by extending `find_package`, like 
this:

find_package(zlib CONF)

And this would look up zlib using pkgconfig. The advantage of this, is that the 
transitive dependencies can be specified in the same manner as 
`find_dependency(zlib CONF)`.

Paul-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


[Cmake-commits] CMake branch, master, updated. v3.11.3-945-g71f58d6

2018-06-12 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  71f58d6bf7e02cd44c5d49d7b127ca6d99abdbeb (commit)
   via  c8868d727cdd9e2fb780d6d09beec2889e2ee0e7 (commit)
   via  1f3221f365f269f3356de0ad0112cf68e4831fe6 (commit)
   via  b6e7f2c37fbc4498324995928521a4335fc8ac32 (commit)
  from  f49870e372d87e6c191d13811d2218e4825b55a9 (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=71f58d6bf7e02cd44c5d49d7b127ca6d99abdbeb
commit 71f58d6bf7e02cd44c5d49d7b127ca6d99abdbeb
Merge: c8868d7 1f3221f
Author: Brad King 
AuthorDate: Tue Jun 12 09:51:06 2018 -0400
Commit: Brad King 
CommitDate: Tue Jun 12 09:51:06 2018 -0400

Merge branch 'release-3.12'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8868d727cdd9e2fb780d6d09beec2889e2ee0e7
commit c8868d727cdd9e2fb780d6d09beec2889e2ee0e7
Merge: f49870e b6e7f2c
Author: Brad King 
AuthorDate: Tue Jun 12 13:48:59 2018 +
Commit: Kitware Robot 
CommitDate: Tue Jun 12 09:49:05 2018 -0400

Merge topic 'FindPython-3.8'

b6e7f2c37f FindPython: Add support for version 3.8

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


---

Summary of changes:
 Modules/FindPython/Support.cmake |2 +-
 Modules/FindPythonInterp.cmake   |2 +-
 Modules/FindPythonLibs.cmake |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


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


[Cmake-commits] CMake branch, release, updated. v3.11.3-925-g1f3221f

2018-06-12 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  1f3221f365f269f3356de0ad0112cf68e4831fe6 (commit)
   via  b6e7f2c37fbc4498324995928521a4335fc8ac32 (commit)
  from  c984bf668bb46aa335c61d54c3fe62ef3fae20a9 (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/FindPython/Support.cmake |2 +-
 Modules/FindPythonInterp.cmake   |2 +-
 Modules/FindPythonLibs.cmake |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


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


Re: [cmake-developers] cmake on AIX

2018-06-12 Thread Brad King
On 06/12/2018 09:36 AM, REIX, Tony wrote:
> I never saw any package built on AIX using pthread or ppc64/pthread
> We have to understand why cmake is different.

We use C++11 std::thread.  It requires GCC's -pthread flag on AIX,
and that flag changes the standard library that is used.

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-12 Thread REIX, Tony
Hi Brad,

You said:

> I think that should solve any problems with running CMake in environments 
> different than it was built.

Yes. Tests may be OK though cmake does not work with complex package to build.


> The LIBPATH is
>  
> /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread:/opt/freeware/lib/pthread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0:/opt/freeware/lib:/usr/lib:/lib
> 
> ldd shows for the C++ and C runtime libraries:
> 
>  
> /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libstdc++.a(libstdc++.so.6)
>  /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libgcc_s.a(shr.o)

OK. Interesting. That looks the same we have here:  pthread/libstdc++.a  .
GCC on AIX is built in 4 flavors (default is 32bit, pthread, ppc64, and 
ppc64/pthread). However, I never saw any package built on AIX using pthread or 
ppc64/pthread ...
And that is an issue since we use /opt/freeware/lib or /opt/freeware/lib64 and 
NEVER pthread...
We have to understand why cmake is different.


>> Looking at your build farm: 
>> https://open.cdash.org/index.php?project=CMake=2018-06-12 , I see no 
>> AIX machine.
>
> That view is paged.  One can use filters to see just the AIX builds:
>  
> https://open.cdash.org/index.php?project=CMake=1=1=buildname=63=AIX

Thanks !  I saw it is paged, but I missed the AIX cases.
I've had a look at: https://open.cdash.org/buildSummary.php?buildid=5415006 . 
However, the traces are only high-level information. On our side, we are adding 
traces in order to see the details for figuring out what is really done.

We have to investigate more. Both cmake build and how/why cmake fails with 
mariadb.

Thanks!

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-12 Thread Brad King
On 06/12/2018 03:38 AM, REIX, Tony wrote:
> Did you use cmake built on AIX for building a project with it?
> cmake tests are 98% OK here though that does not work with mariaDB.

The test suite passes and that is mostly made up of project-like tests.
It's also built using an existing CMake/CTest on the machine (3.11).

> Thanks for the idea with static C++ runtime library!

I think that should solve any problems with running CMake in environments
different than it was built.

> Would you mind run the commands:
>dump -Hv cmake
>ldd cmake
> on the cmake command that you build, so that we can see which LIBPATH is set 
> into the executable.

The LIBPATH is

  
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread:/opt/freeware/lib/pthread:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0:/opt/freeware/lib:/usr/lib:/lib

ldd shows for the C++ and C runtime libraries:

  
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libstdc++.a(libstdc++.so.6)
  /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/pthread/libgcc_s.a(shr.o)

> Did you build it by hand or with a script or a .spec file or anything that we 
> could look at?

It's build nightly by an existing CTest on the machine.  One of the
tests is the BootstrapTest which verifies that `./bootstrap` works.

> Looking at your build farm: 
> https://open.cdash.org/index.php?project=CMake=2018-06-12 , I see no AIX 
> machine.

That view is paged.  One can use filters to see just the AIX builds:

  
https://open.cdash.org/index.php?project=CMake=1=1=buildname=63=AIX

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] cmake on AIX

2018-06-12 Thread REIX, Tony
Hi Brad,

GCC : 6.1 and 7.2 on your side, and 6.3.0 on our side. That should be ok.
Did you build GCC on AIX by yourself or did you take it on some repository, 
like BullFreeware?

Did you use cmake built on AIX for building a project with it? cmake tests are 
98% OK here though that does not work with mariaDB.

Thanks for the idea with static C++ runtime library ! We'll experiment with it 
asap.

Would you mind run the commands:
   dump -Hv cmake
   ldd cmake
on the cmake command that you build, so that we can see which LIBPATH is set 
into the executable.

Or, is there a way to get the traces of the build of cmake?
Did you build it by hand or with a script or a .spec file or anything that we 
could look at?

Looking at your build farm: 
https://open.cdash.org/index.php?project=CMake=2018-06-12 , I see no AIX 
machine.

Cordialement,

Tony Reix

ATOS / Bull SAS
ATOS Expert
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net


De : Brad King [brad.k...@kitware.com]
Envoyé : lundi 11 juin 2018 19:25
À : REIX, Tony; cmake-developers@cmake.org
Cc : APEKE, SENA (ext)
Objet : Re: [cmake-developers] cmake on AIX

On 06/11/2018 11:16 AM, REIX, Tony wrote:
> We are building cmake now only with GCC (6.3.0 for now) on AIX 6.1 .
> Which GCC compiler version are you using on AIX ?

GCC 7.2.  We previously tested with 6.1 and that worked too.

> It appears that the cmake executable has been built so that it looks for:
> libstdc++.a(libstdc++.so.6) in
>   
> /opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread:/opt/freeware/lib/pthread/
> first, before the base /opt/freeware/lib. However, when we use it for building
> mariadb, we have to set the LIBPATH to: /opt/freeware/lib64:/usr/lib

Try switching to a static C++ runtime library:

  ./bootstrap -- -DCMAKE_EXE_LINKER_FLAGS='-static-libstdc++ -static-libgcc 
-Wl,-bbigtoc'

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers