[Cmake-commits] CMake branch, master, updated. v3.10.1-686-g89ed729

2017-12-22 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  89ed729af150b7850976843475bc1f3058eea86d (commit)
  from  4309ed25eee874ee73a715897550e2ea18631f41 (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=89ed729af150b7850976843475bc1f3058eea86d
commit 89ed729af150b7850976843475bc1f3058eea86d
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Sat Dec 23 00:01:14 2017 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Sat Dec 23 00:01:14 2017 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b7e2d42..ebea228 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 10)
-set(CMake_VERSION_PATCH 20171222)
+set(CMake_VERSION_PATCH 20171223)
 #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


Re: [CMake] ExternalProject_Add and Git Update? How do I make these work?

2017-12-22 Thread Konstantin Tokarev


> ExternalProject_Add(${extProjectName}
> GIT_REPOSITORY "git://github.com/BlueQuartzSoftware/discount.git"
> GIT_PROGRESS 1
> #GIT_TAG master
> 
> TMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/tmp/${CMAKE_BUILD_TYPE}"
> STAMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Stamp"
> DOWNLOAD_DIR ${DREAM3D_SDK}/superbuild/${extProjectName}/Download
> SOURCE_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Source"
> BINARY_DIR 
> "${DREAM3D_SDK}/superbuild/${extProjectName}/Build/${CMAKE_BUILD_TYPE}"
> INSTALL_DIR 
> "${DREAM3D_SDK}/${extProjectName}-${discount_VERSION}-${CMAKE_BUILD_TYPE}"
> 
> #UPDATE_COMMAND "${GIT_EXECUTABLE} pull --rebase origin master"
> PATCH_COMMAND ""
> 
> CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
> 
> LOG_DOWNLOAD 1
> LOG_UPDATE 1
> LOG_CONFIGURE 1
> LOG_BUILD 1
> LOG_TEST 1
> LOG_INSTALL 1
> )
> 
> The above is my cmake code. This worked great the first time through. Then I 
> discovered an issue in the project that I was cloning (discount) and fixed it 
> and pushed it. Now the repository at GitHub is a few commits ahead of what I 
> have. 

If you want to make modifications in projects that you build with 
ExternalProject, you might want to use
git submodules instead of specifying GIT_REPOSITORY in ExternalProject_Add

>So I rerun CMake and then "ninja" and I get an error when the "update" command 
>is run:
> 
> Cannot rebase: You have unstaged changes.
> Please commit or stash them.
> No rebase in progress?
> CMake Error at 
> /Users/Shared/DREAM3D_SDK/superbuild/discount/tmp/Debug/discount-gitupdate.cmake:105
>  (message):
> 
> Failed to rebase in:
> '/Users/Shared/DREAM3D_SDK/superbuild/discount/Source/'.
> 
> You will have to resolve the conflicts manually
> 
> Doing a "git status" in the "Source" directory gives this:
> 
> [mjackson@ferb:Source]$ git status
> On branch master
> Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
> (use "git pull" to update your local branch)
> Untracked files:
> (use "git add ..." to include in what will be committed)
> 
> "tests/mu\303\261oz.t"
> 
> nothing added to commit but untracked files present (use "git add" to track)
> 
> There was something funning with the file that is untracked. Not sure if this 
> is causing the issues?
> 
> --
> Michael Jackson | Owner, President
> BlueQuartz Software
> [e] mike.jack...@bluequartz.net
> [w] www.bluequartz.net
> 
> --
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
-- 
Regards,
Konstantin
-- 

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] ExternalProject_Add and Git Update? How do I make these work?

2017-12-22 Thread Michael Jackson
ExternalProject_Add(${extProjectName}
  GIT_REPOSITORY "git://github.com/BlueQuartzSoftware/discount.git"
  GIT_PROGRESS 1
  #GIT_TAG master

  TMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/tmp/${CMAKE_BUILD_TYPE}"
  STAMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Stamp"
  DOWNLOAD_DIR ${DREAM3D_SDK}/superbuild/${extProjectName}/Download
  SOURCE_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Source"
  BINARY_DIR 
"${DREAM3D_SDK}/superbuild/${extProjectName}/Build/${CMAKE_BUILD_TYPE}"
  INSTALL_DIR 
"${DREAM3D_SDK}/${extProjectName}-${discount_VERSION}-${CMAKE_BUILD_TYPE}"

  #UPDATE_COMMAND "${GIT_EXECUTABLE} pull --rebase origin master"
  PATCH_COMMAND ""

  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=

  LOG_DOWNLOAD 1
  LOG_UPDATE 1
  LOG_CONFIGURE 1
  LOG_BUILD 1
  LOG_TEST 1
  LOG_INSTALL 1
)

The above is my cmake code. This worked great the first time through. Then I 
discovered an issue in the project that I was cloning (discount) and fixed it 
and pushed it. Now the repository at GitHub is a few commits ahead of what I 
have. So I rerun CMake and then "ninja" and I get an error when the "update" 
command is run:

Cannot rebase: You have unstaged changes.
Please commit or stash them.
No rebase in progress?
CMake Error at 
/Users/Shared/DREAM3D_SDK/superbuild/discount/tmp/Debug/discount-gitupdate.cmake:105
 (message):
  

  Failed to rebase in:
  '/Users/Shared/DREAM3D_SDK/superbuild/discount/Source/'.

  You will have to resolve the conflicts manually


Doing a "git status" in the "Source" directory gives this:

[mjackson@ferb:Source]$ git status
On branch master
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Untracked files:
  (use "git add ..." to include in what will be committed)

"tests/mu\303\261oz.t"

nothing added to commit but untracked files present (use "git add" to track)


There was something funning with the file that is untracked. Not sure if this 
is causing the issues? 
--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net


-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags issues

2017-12-22 Thread Robert Maynard
Hi,

I have a MR open for CMake that resolves this bug
(https://gitlab.kitware.com/cmake/cmake/merge_requests/1618)

On Thu, Sep 7, 2017 at 9:48 AM, Robert Maynard
 wrote:
> Okay I have opened an issue on CMake for handling multiple gencode with
> multiple code targets.
>
> On Wed, Sep 6, 2017 at 3:19 PM, Mueller-Roemer, Johannes Sebastian
>  wrote:
>>
>> Yes
>>
>> 
>> From: Robert Maynard [robert.mayn...@kitware.com]
>> Sent: Wednesday, September 06, 2017 6:58 PM
>> To: Mueller-Roemer, Johannes Sebastian
>> Cc: cmake@cmake.org
>> Subject: Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags
>> issues
>>
>> So it works when they are separate gen-code options, but fails when they
>> are combined. Is that correct?
>>
>>
>> On Wed, Sep 6, 2017 at 11:16 AM, Mueller-Roemer, Johannes Sebastian
>> >
>> wrote:
>> The long form fills the Code Generation field with
>> compute_20,sm_20;compute_20,compute_20 (the default without gencode
>> parameters is compute_20,sm_20) and results in the following command line:
>>
>> D:\jsroemer\projects\cuda-pdb-test\build\a>"C:\Program Files\NVIDIA GPU
>> Computing Toolkit\CUDA\v8.0\bin\nvcc.exe"
>> -gencode=arch=compute_20,code=\"sm_20,compute_20\"
>> -gencode=arch=compute_20,code=\"compute_20,compute_20\" --use-local-env
>> --cl-version 2015 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio
>> 14.0\VC\bin\amd64"  -I"C:\Program Files\NVIDIA GPU Computing
>> Toolkit\CUDA\v8.0\include" -I"C:\Program Files\NVIDIA GPU Computing
>> Toolkit\CUDA\v8.0\include"  -G   --keep-dir x64\Debug -maxrregcount=0
>> --machine 64 --compile -cudart static -Xcompiler="/EHsc -Zi -Ob0" -g
>> -D_WINDOWS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o
>> A.dir\Debug\a.cu.obj
>> "D:\jsroemer\projects\cuda-pdb-test\a\a.cu"
>>
>> Which is somewhat redundant
>>
>> MSVC turns compute_20,sm_20 into
>> -gencode=arch=compute_20,code=\"sm_20,compute_20\" and compute_20,compute_20
>> into -gencode=arch=compute_20,code=\"compute_20,compute_20\"
>>
>>
>> Fraunhofer-Institut für Graphische Datenverarbeitung IGD
>> Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
>> Tel +49 6151 155-606  |  Fax +49 6151
>> 155-139
>>
>> johannes.mueller-roe...@igd.fraunhofer.de
>> | www.igd.fraunhofer.de
>>
>> From: Robert Maynard
>> [mailto:robert.mayn...@kitware.com]
>> Sent: Wednesday, September 6, 2017 16:44
>>
>> To: Mueller-Roemer, Johannes Sebastian
>> >
>> Cc: cmake@cmake.org
>> Subject: Re: [CMake] CMake 3.9.x Visual Studio CUDA PDB/compiler flags
>> issues
>>
>> Yes I was responding to comment 3.
>>
>> I am curious, does the longer form signature "-gencode
>> arch=compute_20,code=sm_20  -gencode arch=compute_20,code=compute_20" work
>> correctly? CMake has to parse the gencode flags and move them to special
>> msbuild entries, and I wonder if there is a bug when parsing multiple code
>> options.
>>
>> On Wed, Sep 6, 2017 at 10:36 AM, Mueller-Roemer, Johannes Sebastian
>> >
>> wrote:
>> If the comment is wrt 3., the result is the same no matter if I use a
>> space or an equals sign, if I double escape the quotes (e.g., use the value
>> as you wrote it in the cmake-gui for CMAKE_CUDA_FLAGS), the value in VS
>> becomes compute_20,"sm_20,compute_20" instead of
>> compute_20,sm_20,compute_20, which is equally illegal and will cause the
>> same error message, also double escaping should not be necessary for a
>> subset of flags (Xcompiler works fine without it, even if the default values
>> are pointless).
>> If the comment is wrt 2., this is the line automatically generated by
>> CMake/VS when not passing in any gencode flags explicitly.
>>
>> Or am I misunderstanding what you mean?
>>
>> Fraunhofer-Institut für Graphische Datenverarbeitung IGD
>> Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
>> Tel +49 6151 155-606  |  Fax +49 6151
>> 155-139
>>
>> johannes.mueller-roe...@igd.fraunhofer.de
>> | www.igd.fraunhofer.de
>>
>> From: Robert Maynard
>> [mailto:robert.mayn...@kitware.com]
>> Sent: Wednesday, September 6, 2017 15:38
>> To: Mueller-Roemer, Johannes Sebastian
>> >
>> Cc: 

Re: [CMake] absolute library path, sorry for the question

2017-12-22 Thread Mario Emmenlauer

Can anyone help to force cmake use absolute paths?

On 13.12.2017 11:45, Mario Emmenlauer wrote:
> Thank you for your reply!! Your explanation is very helpful for writing
> my own CMakeLists.txt. But in my case, I use the standard CMakeLists.txt
> that comes with the libraries. For example libtiff, turbojpeg, thrift,
> and many others...
> 
> As an example, I build libtiff in the following way:
> cmake ../$TIFFVERSION \
> -Wno-dev \
> -G"Unix Makefiles" \
> -DCMAKE_PREFIX_PATH="$THIRDPARTYTARGETDIR" \
> -DCMAKE_INSTALL_PREFIX="$THIRDPARTYTARGETDIR" \
> -DCMAKE_BUILD_TYPE="Release" \
> -DBUILD_SHARED_LIBS="ON" \
> -Djpeg="ON" \
> -DJPEG_INCLUDE_DIR="$THIRDPARTYTARGETDIR/include" \
> -DJPEG_LIBRARY="$THIRDPARTYTARGETDIR/lib/libjpeg.so" && \
> make VERBOSE="1" && make install
> 
> In the build log, I can see that cmake detects the jpeg library to be
> '$THIRDPARTYTARGETDIR/lib/libjpeg.so'. However, in the later build, the
> Makefile links with '-ljpeg' instead of '$THIRDPARTYTARGETDIR/lib/libjpeg.so'.
> And this in turn will make 'ld' use '/usr/lib/x86_64-linux-gnu/libjpeg.so'
> instead of my thirdparty libjpeg.
> 
> So at some point between FindJPEG.cmake and the final Makefile, cmake
> changed the JPEG_LIBRARIES variable from absolute to relative. And I can
> not understand why or when this happens. The documentation also does not
> help me, because it explains that this should happen 'if the full path is
> not know or if the full path is one of the system library dirs' (see
> https://cmake.org/pipermail/cmake/2015-September/061462.html). In my case,
> I override to use jpeg with a known, existing path that is not a system
> library.
> 
> All the best,
> 
>Mario
> 
> 
> 
> 
> On 13.12.2017 11:12, Bo Zhou wrote:
>> Hi
>>
>> CMAKE_SKIP_RPATH usually is used for the shared module which might want to 
>> have the customized distributed path such as within the application. 
>> According
>> personal experience on POSIX systems (Linux, UNIX, OSX), always enable 
>> CMAKE_SKIP_RPATH for the all local shared dependencies, and to the final 
>> distribution,
>> (if needed) put shared libraries into the lib folder of distribution.
>>
>> According your description, I'm not sure how did you pick up your library 
>> into the application from CMake, usually we have to make sure the CMake 
>> always chooses
>> the libraries from 3rd-party directory not system or another places. In our 
>> system, it has a variable THIRDPARTY_DIR for command FIND_PATH() to locate 
>> the
>> folder which contains the all built libraries, then use HINTS and NAMES in 
>> the command FIND_PATH() and FIND_LIBRARY() to locate the correct paths for 
>> the
>> pre-built libraries, so the linking should be okay.
>>
>> If everything has no error, but just the application always picks up the 
>> system's library not the 3rd-party libraries we prepared, one solution would 
>> add
>> another loader script for the application, from the loader script it appends 
>> the local lib folder to LD_LIBRARY_PATH, then launch the actual application
>> executable file. A lot of commercial application on Linux solve the similar 
>> issue by this way.
>>
>> Wish my reply is helpful.
>>
>> Thank you very much.
>>
>> On Wed, Dec 13, 2017 at 6:06 PM, Mario Emmenlauer > > wrote:
>>
>>
>> Dear cmake users,
>>
>> I have found good documentation on the cmake wiki about RPATH and
>> its different variables, and also on the mailing lists. But somehow
>> it still does not add up for me. Can you please help?
>>
>> I use cmake 3.9.5 on different platforms, CentOS 6 and Ubuntu 14.04
>> amongst others. I build many standard libraries (like tiff and jpeg)
>> into my own thirdparty directory, and set CMAKE_PREFIX_PATH to find
>> them there. On newer Linux and Windows, cmake uses always the absolute
>> path to those libraries, and everything works fine. But on older Linux
>> like Ubuntu 14.04 and CentOS 6 it does not. cmake will first find the
>> library in the correct absolute thirdparty directory, and I can confirm
>> this by printing the 'XXX_LIBRARIES' variable in the find script. But
>> later the Makefile will link with '-lxxx' instead of the full path.
>> This makes 'ld' use the system library instead!
>>
>> I completely fail to understand at what point cmake changes XXX_LIBRARIES
>> from an absolute path to '-lxxx', for example for libjpeg.
>>
>> I have experimented with CMAKE_SKIP_BUILD_RPATH, but it does not help.
>> The only workaround I could find is to add the thirdparty directory to
>> LDFLAGS. Then 'ld' will also find the correct library.
>>
>>
>> Is this a bug, or an expected behavior? What parameters should I add
>> when I invoke cmake so that it will always use libraries with their
>> full path?
>>
>>
>> 

[CMake] Include directories of IMPORTED libraries not propagating

2017-12-22 Thread Saad Khattak
Hi,

I have the following setup:

ImportedLib (sets location of library files and public include directories)
LibA (publicly includes ImporteLib with
target_link_libraries(...))
Exe  (finds LibA and links against it)

Where ImportedLib uses "set_target_properties(ImportedLib PROPERTIES
IMPORTED_LOCATION_DEBUG ... INTERFACE_INCLUDE_DIRECTORIES ...)" to set its
include directories and prebuilt libraries for linking.

LibA uses "target_link_libraries(LibA PUBLIC ImportedLib)". CMake correctly
generates the project such that LibA now has the include directories of the
ImportedLib. LibA then uses the "install(...)" feature so that "Exe" can
find LibA.

With Exe, I find LibA using "find_package(LibA REQUIRED)" and then
"target_link_libraries(Exe LibA)". Exe inherits LibA's include directories
and links against it. Exe is also able to link against ImportedLib.
However, what Exe does not inherit is the public include directories
specified by ImportedLib. This seems like a bug because it is able to know
about and is able to link against ImportLib prebuilt library files.

If it's not a bug, how do I make sure ImportedLib include directories are
propagated properly?

Regards,
Saad
-- 

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.10.1-685-g4309ed2

2017-12-22 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  4309ed25eee874ee73a715897550e2ea18631f41 (commit)
   via  40b95ee8e6ee57ee87b791e831ac3508f77db9a4 (commit)
   via  b0ff528adc3ec53c06bcead3845f9c2f7251c4d3 (commit)
  from  1f29bc4092edf57cfb61882d7d7358db7e53ebe6 (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=4309ed25eee874ee73a715897550e2ea18631f41
commit 4309ed25eee874ee73a715897550e2ea18631f41
Merge: 1f29bc4 40b95ee
Author: Brad King 
AuthorDate: Fri Dec 22 13:42:58 2017 +
Commit: Kitware Robot 
CommitDate: Fri Dec 22 08:43:05 2017 -0500

Merge topic 'FindPkgConfig_search_path_fix'

40b95ee8 FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling
b0ff528a FindPkgConfig: Make IMPORTED_TARGET test verify NO...PATH properly

Acked-by: Kitware Robot 
Acked-by: Rolf Eike Beer 
Merge-request: !1602


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40b95ee8e6ee57ee87b791e831ac3508f77db9a4
commit 40b95ee8e6ee57ee87b791e831ac3508f77db9a4
Author: Craig Scott 
AuthorDate: Sat Dec 16 21:49:10 2017 +1100
Commit: Craig Scott 
CommitDate: Sat Dec 16 22:40:40 2017 +1100

FindPkgConfig: Fix IMPORTED_TARGET NO...PATH option handling

diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index aad3b74..952ca92 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -191,10 +191,10 @@ function(_pkg_create_imp_target _prefix _no_cmake_path 
_no_cmake_environment_pat
   # set the options that are used as long as the .pc file does not provide a 
library
   # path to look into
   if(_no_cmake_path)
-set(_find_opts "NO_CMAKE_PATH")
+list(APPEND _find_opts "NO_CMAKE_PATH")
   endif()
   if(_no_cmake_environment_path)
-string(APPEND _find_opts " NO_CMAKE_ENVIRONMENT_PATH")
+list(APPEND _find_opts "NO_CMAKE_ENVIRONMENT_PATH")
   endif()
 
   unset(_search_paths)
@@ -458,7 +458,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent 
_no_cmake_path _no_cma
   _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" 
CFLAGS_OTHER""--cflags-only-other )
 
   if (_imp_target)
-_pkg_create_imp_target("${_prefix}" _no_cmake_path 
_no_cmake_environment_path)
+_pkg_create_imp_target("${_prefix}" ${_no_cmake_path} 
${_no_cmake_environment_path})
   endif()
 endif()
 
@@ -590,7 +590,7 @@ macro(pkg_check_modules _prefix _module0)
   _pkgconfig_set(__pkg_config_arguments_${_prefix} "${_module0};${ARGN}")
 endif()
   elseif (${_prefix}_FOUND AND ${_imp_target})
-_pkg_create_imp_target("${_prefix}" _no_cmake_path 
_no_cmake_environment_path)
+_pkg_create_imp_target("${_prefix}" ${_no_cmake_path} 
${_no_cmake_environment_path})
   endif()
 endmacro()
 
@@ -644,7 +644,7 @@ macro(pkg_search_module _prefix _module0)
 
 _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
   elseif (${_prefix}_FOUND AND ${_imp_target})
-_pkg_create_imp_target("${_prefix}" _no_cmake_path 
_no_cmake_environment_path)
+_pkg_create_imp_target("${_prefix}" ${_no_cmake_path} 
${_no_cmake_environment_path})
   endif()
 endmacro()
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0ff528adc3ec53c06bcead3845f9c2f7251c4d3
commit b0ff528adc3ec53c06bcead3845f9c2f7251c4d3
Author: Craig Scott 
AuthorDate: Sat Dec 16 19:21:24 2017 +1100
Commit: Craig Scott 
CommitDate: Sat Dec 16 22:38:56 2017 +1100

FindPkgConfig: Make IMPORTED_TARGET test verify NO...PATH properly

diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake 
b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
index 00cbb7b..606b1df 100644
--- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_IMPORTED_TARGET.cmake
@@ -24,3 +24,64 @@ if (NCURSES_FOUND)
 else ()
   message(STATUS "skipping test; ncurses not found")
 endif ()
+
+
+# Setup for the remaining package tests below
+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH)
+set(fakePkgDir ${CMAKE_CURRENT_BINARY_DIR}/pc-fakepackage)
+foreach(i 1 2)
+  set(pname cmakeinternalfakepackage${i})
+  file(WRITE ${fakePkgDir}/lib/lib${pname}.a "")
+  file(WRITE ${fakePkgDir}/lib/${pname}.lib  "")
+  file(WRITE ${fakePkgDir}/lib/pkgconfig/${pname}.pc
+"Name: CMakeInternalFakePackage${i}
+Description: Dummy package (${i}) for FindPkgConfig