[Cmake-commits] CMake branch, master, updated. v3.8.0-rc1-23-gada0bc2

2017-02-09 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  ada0bc21f42e25882ddf5a8aab10eaf3ea7e0b89 (commit)
  from  90a55bb1d2b18d14eec3c972e1b045205acfd708 (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=ada0bc21f42e25882ddf5a8aab10eaf3ea7e0b89
commit ada0bc21f42e25882ddf5a8aab10eaf3ea7e0b89
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Fri Feb 10 00:01:08 2017 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Fri Feb 10 00:01:08 2017 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 61ac90e..070abf8 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 8)
-set(CMake_VERSION_PATCH 20170209)
+set(CMake_VERSION_PATCH 20170210)
 #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] Cross project include/link pathing?

2017-02-09 Thread Chris Johnson
We've been using CMake for a couple of years for C++ application
building.  We effectively set up our CMake project structure once, and
mostly only change it to add new source files, etc.

Currently, all C++ source is checked out of our SVN repository into one
large tree.  This tree actually contains multiple applications.  Many,
but not all, depend on libraries which are also in this same source tree
checkout.  Executables are statically linked to the libraries.

Our source tree has grown to the point where this arrangement really
does not make sense, and is quite far from best practices.  We want to
move to a more project-oriented structure, where there will be multiple
projects, but where the libraries are still shared.

How do I go about this?

In particular, how do I structure each project to find the common,
shared (but statically linked) libraries?  I would assume that each
library itself or the collection of libraries would be a project, with a
top-level CMakeLists.txt file.

Note that each project could be installed in its own unique location in
its deployed VM or container, so placing the libraries into, say,
hard-coded /usr/local/lib is not a feasible solution for us.


Pictorially (use fixed width font for best results):
=

Current single source tree layout
-

.
|-- CMakeLists.txt
|-- application_1/
|   `-- CMakeLists.txt
|-- application_2/
|   |-- CMakeLists.txt
|   |-- util_1/
|   |   `-- CMakeLists.txt
|   |-- util_2/
|   |   `-- CMakeLists.txt
|   `-- util_3/
|   `-- CMakeLists.txt
`-- lib/
|-- CMakeLists.txt
|-- lib_1/
|   `-- CMakeLists.txt
`-- lib_2/
`-- CMakeLists.txt


Desired project-oriented layout
---

[Application 1 Project]
.
`-- CMakeLists.txt

[Application 2 Project]
.
|-- CMakeLists.txt
|-- util_1/
|   `-- CMakeLists.txt
|-- util_2/
|   `-- CMakeLists.txt
`-- util_3/
`-- CMakeLists.txt

[Libraries Project]
.
|-- CMakeLists.txt
|-- lib_1/
|   `-- CMakeLists.txt
`-- lib_2/
`-- CMakeLists.txt



Presently, all of the applications know where to find the library header
files, because they are all in the same tree.  When we run "cmake ." at
the root of the source checkout, CMake knows where everything is, and
correctly provides the include paths to C++ compiler.

Similarly, at link time, CMake has automatically determined where the
compiled static libraries are, and our CMakeLists.txt files only need
mention them by name.  CMake has been brilliant at making this kind of
stuff simple.

But how do I make CMake generate the correct include and link paths when
"cmake ." is run on some individual project's source code, when those
paths will be outside the current tree, i.e. elsewhere?


..chris
-- 

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.8.0-rc1-51-ge703924

2017-02-09 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  e70392430de41387679706c6c1b01cc74b261aa5 (commit)
   via  e2ee0971474ce92766f77d77025319ef575aa303 (commit)
  from  b9bc47f7cb9806eb328f830ca162d1b08222b247 (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=e70392430de41387679706c6c1b01cc74b261aa5
commit e70392430de41387679706c6c1b01cc74b261aa5
Merge: b9bc47f e2ee097
Author: Brad King 
AuthorDate: Thu Feb 9 16:05:42 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 9 16:05:42 2017 -0500

Merge topic 'gcc-cpp98' into next

e2ee0971 g++ knows about C++98 selection flags since at least 3.4


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2ee0971474ce92766f77d77025319ef575aa303
commit e2ee0971474ce92766f77d77025319ef575aa303
Author: Rolf Eike Beer 
AuthorDate: Wed Feb 8 18:18:17 2017 +0100
Commit: Rolf Eike Beer 
CommitDate: Wed Feb 8 21:04:31 2017 +0100

g++ knows about C++98 selection flags since at least 3.4


https://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/C-Dialect-Options.html#C-Dialect-Options

diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index c007c98..2499d2f 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -11,8 +11,7 @@ else()
   endif()
 endif()
 
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
-  # Supported since 4.3
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
   set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
   set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
 endif()

---

Summary of changes:
 Modules/Compiler/GNU-CXX.cmake |3 +--
 1 file changed, 1 insertion(+), 2 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, next, updated. v3.8.0-rc1-49-gb9bc47f

2017-02-09 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  b9bc47f7cb9806eb328f830ca162d1b08222b247 (commit)
   via  9f1f05fa14b26f45b664fba54c084cde36b22edb (commit)
  from  3373f1efa71ea5cc3cb98238b25c5dd08420748c (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=b9bc47f7cb9806eb328f830ca162d1b08222b247
commit b9bc47f7cb9806eb328f830ca162d1b08222b247
Merge: 3373f1e 9f1f05f
Author: Brad King 
AuthorDate: Thu Feb 9 16:03:59 2017 -0500
Commit: CMake Topic Stage 
CommitDate: Thu Feb 9 16:03:59 2017 -0500

Merge topic 'update-curl' into next

9f1f05fa fixup! Tests: Fix `file://` URLs given to curl


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f1f05fa14b26f45b664fba54c084cde36b22edb
commit 9f1f05fa14b26f45b664fba54c084cde36b22edb
Author: Brad King 
AuthorDate: Thu Feb 9 16:00:26 2017 -0500
Commit: Brad King 
CommitDate: Thu Feb 9 16:03:25 2017 -0500

fixup! Tests: Fix `file://` URLs given to curl

diff --git a/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in 
b/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in
index 82280dd..64b45ed 100644
--- a/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in
+++ b/Tests/CMakeTests/FileDownloadBadHashTest.cmake.in
@@ -1,4 +1,7 @@
-set(url "file:///@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
+if(NOT "@CMAKE_CURRENT_SOURCE_DIR@" MATCHES "^/")
+  set(slash /)
+endif()
+set(url "file://${slash}@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
 set(dir "@CMAKE_CURRENT_BINARY_DIR@/downloads")
 
 file(DOWNLOAD
diff --git a/Tests/CMakeTests/FileDownloadTest.cmake.in 
b/Tests/CMakeTests/FileDownloadTest.cmake.in
index 48b4afe..f6d9ad9 100644
--- a/Tests/CMakeTests/FileDownloadTest.cmake.in
+++ b/Tests/CMakeTests/FileDownloadTest.cmake.in
@@ -1,4 +1,7 @@
-set(url "file:///@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
+if(NOT "@CMAKE_CURRENT_SOURCE_DIR@" MATCHES "^/")
+  set(slash /)
+endif()
+set(url "file://${slash}@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
 set(dir "@CMAKE_CURRENT_BINARY_DIR@/downloads")
 
 message(STATUS "FileDownload:1")
diff --git a/Tests/CMakeTests/FileUploadTest.cmake.in 
b/Tests/CMakeTests/FileUploadTest.cmake.in
index 452090f..9e22909 100644
--- a/Tests/CMakeTests/FileUploadTest.cmake.in
+++ b/Tests/CMakeTests/FileUploadTest.cmake.in
@@ -10,7 +10,10 @@ endif()
 file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/uploads")
 
 set(filename "@CMAKE_CURRENT_SOURCE_DIR@/FileDownloadInput.png")
-set(urlbase "file:///@CMAKE_CURRENT_BINARY_DIR@/uploads")
+if(NOT "@CMAKE_CURRENT_BINARY_DIR@" MATCHES "^/")
+  set(slash /)
+endif()
+set(urlbase "file://${slash}@CMAKE_CURRENT_BINARY_DIR@/uploads")
 
 message(STATUS "FileUpload:1")
 file(UPLOAD
diff --git a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake 
b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake
index 02e67dc..a91b217 100644
--- a/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake
+++ b/Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake
@@ -1,5 +1,8 @@
+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
+  set(slash /)
+endif()
 file(DOWNLOAD
-  "file:///${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-hash-mismatch.txt"
+  "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-hash-mismatch.txt"
   ${CMAKE_CURRENT_BINARY_DIR}/hash-mismatch.txt
   EXPECTED_HASH SHA1=0123456789abcdef0123456789abcdef01234567
   STATUS status
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake 
b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
index 862d833..2fa5482 100644
--- a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
+++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
@@ -1,5 +1,8 @@
+if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "^/")
+  set(slash /)
+endif()
 file(DOWNLOAD
-  "file:///${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt"
+  "file://${slash}${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt"
   "${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
   JUNK
   )
diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument.cmake 
b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake
index 408da0e..92c878c 100644
--- a/Tests/RunCMake/file/UPLOAD-unused-argument.cmake
+++ b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake
@@ -1,5 +1,8 @@
+if(NOT "${CMAKE_CURRENT_BINARY_DIR}" MATCHES "^/")
+  set(slash /)
+endif()
 file(UPLOAD
   "${CMAKE_CURRENT_SOURCE_DIR}/UPLOAD-unused-argument.txt"
-  "file:///${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
+  "file://${slash}${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
   JUNK
   )


Re: [cmake-developers] ​Qt Creator vs CMake server mode

2017-02-09 Thread Konstantin Podsvirov
Ping and hello again! 25.12.2016, 21:42, "Konstantin Podsvirov" :Since Qt Creator 4.3 release (now aka master branch) will get project information via CMake server (since 3.7 release). For more info see: https://blog.qt.io/blog/2016/11/15/cmake-support-in-qt-creator-and-elsewhere In my expirienceit's look like utility targets (install, rebuild_cache, edit_cache, package) do not exported now. Now Qt Creator use project information via CodeBlocks extra generator (*.cbp files) and utility targets available now. I check it on Windows with "NMake Makefiles" generator. You can try my experimental prebuilt binaries: http://download.podsvirov.pro/installers/dad-0.3.1-windows-vc14x64-unstable.exe Can anybody check it too?  Fresh CMake and QtCreator binaries form `master` branches available via my new experimental installer: http://download.podsvirov.pro/installers/dad-0.3.1-windows-mingw64-unstable.exe (Windows, MinGW-w64 64bit) You need components: MinGW, CMake, QtCreator (cofigure Kit manualy). > In my expirienceit's look like utility targets (install, rebuild_cache, edit_cache, package) do not exported now. Any help and feedback? --Regards,Konstantin Podsvirov -- 

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] Using CMAKE_INSTALL_PREFIX in custom install command fails with CPack

2017-02-09 Thread Domen Vrankar
2017-02-09 12:08 GMT+01:00 Martin Craig :

> Hi, got this problem which I've boiled down to a simple test case. My
> source dir contains just one file (realfile) and the installation should
> install this in bin and make a symlink from linkfile to it. This is the
> CMakeLists.txt file:
>
> cmake_minimum_required(VERSION 2.8.0)
>
> INSTALL(FILES realfile DESTINATION bin)
> INSTALL(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E
> create_symlink realfile ${CMAKE_INSTALL_PREFIX}/bin/linkfile)")
>

You could do it in two separate steps and without absolute path:

execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
../../some_relative_path/bin/realfile linkfile) # at this point path
doesn't need to point to the location of existing file
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/linkfile DESTINATION
some_relative_path COMPONENT libraries)

Not certain which CPack package generator you're using but in case of
CPackRPM there is quite some automated handling of symlink paths (even
support for symlinks in relocatable rpm packages).

In this file are some examples of using symlinks in combination with
CPackRPM (never checked how they behave with other CPack package generators
though...):

https://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/CPackComponentsForAll/CMakeLists.txt;h=344084317166ff4f62850ed77807af2647db6d6a;hb=HEAD

Side note - during packaging CPACK_PACKAGING_INSTALL_PREFIX is used instead
of CMAKE_INSTALL_PREFIX.

Regards,
Domen
-- 

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] cmake -DX=Y -P : problem unsetting variables defined on command line

2017-02-09 Thread Sergey Zakharchenko
Hello Nils,

>> cmake -DX=Y -P x.cmake
>
>
> The above sets the *cache* variable X.

OK, I didn't think that really applied as the script is executed
standalone, so there's no cache in the regular sense of the word.
Thanks for the explanation.

Best regards,

-- 
DoubleF
-- 

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] cmake -DX=Y -P : problem unsetting variables defined on command line

2017-02-09 Thread Nils Gladitz

On 02/09/2017 04:10 PM, Sergey Zakharchenko wrote:


cmake -DX=Y -P x.cmake


The above sets the *cache* variable X.


This x.cmake gives "X=Y":

SET(X)
MESSAGE("X=${X}")


The above unsets the *regular* variable X (leaving the cache variable X 
intact).



This, too, gives "X=Y":

UNSET(X)
MESSAGE("X=${X}")


This also unsets the *regular* variable X.
To unset the cache variable unset(X CACHE) would have worked.


This one finally gives "X=" (which I would have expected in the first place):

SET(X "")
MESSAGE("X=${X}")


Now you've got both a regular and cache variable named X.
When expanded the regular variable takes precedence.


Is this OK? Is this documented anywhere?


https://cmake.org/cmake/help/v3.7/manual/cmake-language.7.html#variables

Nils
--

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] cmake -DX=Y -P : problem unsetting variables defined on command line

2017-02-09 Thread Sergey Zakharchenko
Hello list,

I've been using CMake for quite some time and have only now found out
this disturbing difference between SET(X) and SET(X ""). It happens in
cmake -P mode when you try to unset variables which are defined on the
command line, e.g.

cmake -DX=Y -P x.cmake

This x.cmake gives "X=Y":

SET(X)
MESSAGE("X=${X}")

This, too, gives "X=Y":

UNSET(X)
MESSAGE("X=${X}")

This one finally gives "X=" (which I would have expected in the first place):

SET(X "")
MESSAGE("X=${X}")

Is this OK? Is this documented anywhere?

Best regards,

-- 
DoubleF
-- 

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] cmake 3.7.2. find_package(OpenMP) MSVC

2017-02-09 Thread Georg Schramm
Dear all,

 

I recently switched to cmake 3.7.2 on windows 7.
I am building a project with openmp and use find_package(OpenMP).

With cmake 3.5.2 and 3.6.3 the generation of the .sln file for VS 14 2015 works fine.
However, with cmake 3.7.2 I get the error shown below.

 

All cmake versions were installed with the windows installer downloaded from the

cmake website.


As anybody an idea what is going wrong?

 

Bests,

Georg



-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindOpenMP.cmake:175 (try_compile):
  Cannot copy output executable

    ''

  to destination specified by COPY_FILE:

    'N:/georgschramm/kul_nm_software_gs/build_win/CMakeFiles/FindOpenMP/ompver_C.bin'

  Unable to find the executable at any of:

    N:/georgschramm/kul_nm_software_gs/build_win/CMakeFiles/CMakeTmp/cmTC_8cd34_win.exe
    N:/georgschramm/kul_nm_software_gs/build_win/CMakeFiles/CMakeTmp/Debug/cmTC_8cd34_win.exe
    N:/georgschramm/kul_nm_software_gs/build_win/CMakeFiles/CMakeTmp/Development/cmTC_8cd34_win.exe

Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.7/Modules/FindOpenMP.cmake:224 (_OPENMP_GET_SPEC_DATE)
  RECONSTRUCTION/CMakeLists.txt:142 (find_package)
#
-- 

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] Using CMAKE_INSTALL_PREFIX in custom install command fails with CPack

2017-02-09 Thread Martin Craig
Hi, got this problem which I've boiled down to a simple test case. My source 
dir contains just one file (realfile) and the installation should install this 
in bin and make a symlink from linkfile to it. This is the CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.0)

INSTALL(FILES realfile DESTINATION bin)
INSTALL(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink 
realfile ${CMAKE_INSTALL_PREFIX}/bin/linkfile)")

include(CPack)

This works fine with make install provided I can write to 
${CMAKE_INSTALL_PREFIX}, however with make package, CMAKE_INSTALL_PREFIX is not 
apparently set to the temporary install location that CPack is using, and so it 
fails.

Any idea how I can work around this, or a better way of doing this task? I need 
it for creating symlinks, and also another install command which generates an 
index file in the install directory.

Thanks for any help,
Martin.

-- 

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