Re: [CMake] Change C_INCLUDES in flags.make

2016-11-23 Thread Zlatan
I tried:

get_directory_property(cmake_include_directories INCLUDE_DIRECTORIES)
set(include_dirs)
foreach(it ${cmake_include_directories})
   set(include_dirs ${include_dirs} "${it}/")
endforeach()
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES
"${include_dirs}")
#set_property(TARGET ${PROJECT_NAME}.hex  PROPERTY INCLUDE_DIRECTORIES
${include_dirs})
message(STATUS "New Dir: ${include_dirs}")

but the values in include_dir will not override the values in
INCLUDE_DIRECTORIES



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Change-C-INCLUDES-in-flags-make-tp7594641p7594650.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[Cmake-commits] CMake branch, master, updated. v3.7.0-618-g129c21d

2016-11-23 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  129c21d260af045b0a9ef16921303c5b37885192 (commit)
  from  8288d16126193e86bb6880a7d7b749649ad83e2c (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=129c21d260af045b0a9ef16921303c5b37885192
commit 129c21d260af045b0a9ef16921303c5b37885192
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Thu Nov 24 00:01:04 2016 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Thu Nov 24 00:01:04 2016 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index e9c340f..dab51df 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 7)
-set(CMake_VERSION_PATCH 20161123)
+set(CMake_VERSION_PATCH 20161124)
 #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] FindMPI

2016-11-23 Thread Zaak Beekman
Hi,

I want to be able to pass FC=mpif90 (or FC=$(which mpif90)) and CC=mpicc
etc. OR also be able to pass a compiler and use FindMPI to add link,
compile and include flags. I'm encountering an issue when my MPI
implementation is not on my PATH, I want CMake to be able to look in an
additional location (our build script can download and build MPICH and by
default installs it in user space) and also resolve where mpif90 is coming
from and look there too.

Whats the correct way to pass HINTS or PATHS to FindMPI? i.e., how do I
specify additional locations to search?

Using `find_package` with HINTS and PATHS means that it doesn't use
FindMPI. I also tried setting CMAKE_SYSTEM PREFIX_PATH, but I think that's
a cache variable set early, so it's not having an effect.

It would be great if FindMPI used the realpath of mpif90 etc when passed as
$FC.

TIA
-- 

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] Find packages coming from homebrew

2016-11-23 Thread Roger Leigh

On 23/11/16 14:55, Cedric Doucet wrote:


Hello,

I would like to write some FindFoo.cmake files to find packages
installed on different systems including Mac.
I have noticed that homebrew install packages in a repertory whose name
depends on the version of the package.
For example, I have installed a scientific library called scotch, and it
is now installed here:

/usr/local/Cellar/scotch/6.0.4_4


You should never need to use the Cellar directories directly.  It should 
also be linked under /usr/local/opt/scotch *and* linked directly into 
/usr/local.


When writing a FindFoo.cmake file, you shouldn't need to do anything 
special to handle this.  Just find the headers and libraries as usual.


If it's linked into /usr/local (brew link scotch) then it should be 
picked up without any special action


If it's not linked into /usr/local then the user should be able to add 
/usr/local/opt/scotch (or /usr/local/Cellar/scotch/) to 
CMAKE_PREFIX_PATH and it should then be picked up, again with no special 
casing in your FindFoo script



Regards,
Roger
--

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] VS2017 + CMake integration

2016-11-23 Thread Marian Luparu via CMake
Thanks Robert -- this is great feedback

Yes, VS ships with a patched 3.6 CMake that includes both changes to find the 
VS 2017 installation as well as the CMake-Server functionality needed for the 
IDE services. We have not yet started upstreaming these changes (got totally 
sidetracked by getting the VS 2017 RC release out the door) but are absolutely 
committed to do so. As a first step, we will be rebasing our changes to the 3.7 
CMake release and then start contributing these pieces. 

Once the changes are in PR, at a minimum, you will be able to compile your own 
version of CMake if you wanted to, to replace the one shipping in VS. But 
currently, to answer your other question, we have no capability of pointing VS 
to a different version of CMake. That's primarily because of the thick-coupling 
between VS and the custom patches we need in CMake to make the end-to-end 
experience work. 

Thanks,
Marian Luparu
Visual C++ PM Lead

-Original Message-
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Robert Dailey
Sent: Tuesday, November 22, 2016 10:58 AM
To: CMake 
Subject: [CMake] VS2017 + CMake integration

First of all, I personally find the CMake integration in Visual Studio just 
absolutely amazing. Granted I am not doing any cross-compiling with Android 
yet, but for just building on Windows it's phenomenal.

I noticed that Visual Studio 2017 RC is actually packaging its own version of 
CMake:

E:\PROGRAM FILES (X86)\MICROSOFT VISUAL
STUDIO\2017\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe

Is Microsoft patching the CMake code base to support what they are doing? And 
if so, are those changes not upstream yet? Personally, I'd rather have the 
ability to tell Visual Studio to use my external version of CMake that is on 
PATH, rather than its own. I can understand if that isn't possible right now 
due to custom changes, but I'm curious to learn more, assuming Kitware has had 
a partnership with Microsoft for this integration with Visual Studio.

Would anyone be able to provide more news here? Is there a way to make VS 2017 
use my separate install of CMake? Are the Microsoft-specific patches 
contributed to upstream (or planned to be)?
-- 

Powered by 
https://na01.safelinks.protection.outlook.com/?url=www.kitware.com=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=Plv73v%2B4m3KwGsh6VinIPPgg1qUsCdmDlx%2F9U2urOqA%3D=0

Please keep messages on-topic and check the CMake FAQ at: 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cmake.org%2FWiki%2FCMake_FAQ=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=qBtWeiauHkzD7ISZxtqz3Q72SaDZZwKwdY%2F1voAI2U8%3D=0

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

CMake Support: 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fsupport.html=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=NZgcc%2BxtLPkIWXjqcIwItZr7KXAe6cqbcQaLpAMMA9Q%3D=0
CMake Consulting: 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fconsulting.html=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=YXiCCEGtOMh3qvpKtXTgiL86czKy8xedQbUOoFaTsXA%3D=0
CMake Training Courses: 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Ftraining.html=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=Paz%2Ft%2Bm63qi1AavokeWDNrR69wIUD2Tzjuyp7gUHORk%3D=0

Visit other Kitware open-source projects at 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=MkwbFPZ3eC9DrFysQTnnHA6CYFuNLTCt5%2FLdCrxLaXo%3D=0

Follow this link to subscribe/unsubscribe:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fcmake=02%7C01%7Cmluparu%40microsoft.com%7C00957bc2ac4847ee794f08d413098464%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636154378985417863=JYhOwViUGadM%2FOGbf3X8cs3fwjCArFZnUz92Q1wK5VY%3D=0
-- 

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: 

Re: [CMake] Determine which files have changed during a CMake run

2016-11-23 Thread Michael Jackson
Thanks! This worked for my needs. Ninja said my command line changed. So 
I used the generated compile_commands.json before and after a cmake run, 
diff'ed those two files and was able to zero in on the issue. Thanks for 
the tip. Worked great. Have to store that one away for future use.


--
Mike Jackson  [mike.jack...@bluequartz.net]


Craig Scott wrote:

Does "ninja -d explain" tell you what you need?

On Thu, Nov 24, 2016 at 5:34 AM, Michael Jackson
> wrote:

Is there a way to determine which files in my build directory have
changed for a given run of CMake? The use case is that I made what I
thought was a small change to my configuration using cmake and when
I went to build it was basically a full recompile. During our cmake
run we do use configure_file(...) to generate headers and sources
some of which basically get included in every source file. I am
thinking that I have a dependency on generating those files when I
probably do not have to.

I use Ninja as my build system if that helps. I could always just
hack a local git repo for the build folder, commit everything, run
cmake and see what got changed. Anybody have a better idea?

Thanks

--
Mike Jackson  [mike.jack...@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:
http://public.kitware.com/mailman/listinfo/cmake





--
Craig Scott
Melbourne, Australia
https://crascit.com

--

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] Determine which files have changed during a CMake run

2016-11-23 Thread David Cole via CMake
Using git like that is actually the perfect way to do it if you just want
to analyze it manually. I've actually done that with other projects source
trees when something seems to appear there even when doing an out of source
build... It's a great way to see what's changed (and how) easily.

You could also write a CMake script that iterates files in the build
directory, and uses IS_NEWER in conjunction with a reference file touched
just prior to running CMake if you need to generate a report like this
frequently for some reason.

HTH,
David C.


On Wednesday, November 23, 2016, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

> Is there a way to determine which files in my build directory have changed
> for a given run of CMake? The use case is that I made what I thought was a
> small change to my configuration using cmake and when I went to build it
> was basically a full recompile. During our cmake run we do use
> configure_file(...) to generate headers and sources some of which basically
> get included in every source file. I am thinking that I have a dependency
> on generating those files when I probably do not have to.
>
> I use Ninja as my build system if that helps. I could always just hack a
> local git repo for the build folder, commit everything, run cmake and see
> what got changed. Anybody have a better idea?
>
> Thanks
>
> --
> Mike Jackson  [mike.jack...@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/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

Powered by www.kitware.com

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

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

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

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Determine which files have changed during a CMake run

2016-11-23 Thread Craig Scott
Does "ninja -d explain" tell you what you need?

On Thu, Nov 24, 2016 at 5:34 AM, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

> Is there a way to determine which files in my build directory have changed
> for a given run of CMake? The use case is that I made what I thought was a
> small change to my configuration using cmake and when I went to build it
> was basically a full recompile. During our cmake run we do use
> configure_file(...) to generate headers and sources some of which basically
> get included in every source file. I am thinking that I have a dependency
> on generating those files when I probably do not have to.
>
> I use Ninja as my build system if that helps. I could always just hack a
> local git repo for the build folder, commit everything, run cmake and see
> what got changed. Anybody have a better idea?
>
> Thanks
>
> --
> Mike Jackson  [mike.jack...@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/opensou
> rce/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Craig Scott
Melbourne, Australia
https://crascit.com
-- 

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] Determine which files have changed during a CMake run

2016-11-23 Thread Michael Jackson
Is there a way to determine which files in my build directory have 
changed for a given run of CMake? The use case is that I made what I 
thought was a small change to my configuration using cmake and when I 
went to build it was basically a full recompile. During our cmake run we 
do use configure_file(...) to generate headers and sources some of which 
basically get included in every source file. I am thinking that I have a 
dependency on generating those files when I probably do not have to.


I use Ninja as my build system if that helps. I could always just hack a 
local git repo for the build folder, commit everything, run cmake and 
see what got changed. Anybody have a better idea?


Thanks

--
Mike Jackson  [mike.jack...@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:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Find packages coming from homebrew

2016-11-23 Thread Harry Mallon
Hi Cedric,

You might be interested in "brew --prefix" which gives you the location of the 
brew install. e.g. for me.

% brew --prefix
/usr/local

Also brew symlinks the current version of all programs into the "brew --prefix" 
folder. Do "ls -lah /usr/local/bin" and you should see what I mean.

I hope some of this is helpful.

Harry

Harry Mallon

CODEX | Software Engineer

60 Poland Street | London | England | W1F 7NT

E ha...@codexdigital.com | T +44 203 7000 
989

Website | Facebook 
| Twitter

[http://codex.online/?action=asset=5B21DF7C-EC27-4199-852F-D596F5F28DA9]
-- 

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.7.0-1322-g86d0d04

2016-11-23 Thread Gregor Jasny via Cmake-commits
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  86d0d04211c1102be5449a18825aec645c7b6942 (commit)
   via  82564914ff697b04cbc1f4978f9569ba14b33203 (commit)
   via  8288d16126193e86bb6880a7d7b749649ad83e2c (commit)
  from  6e51a624401016e1df34a70e273574ba0ab1bcf5 (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=86d0d04211c1102be5449a18825aec645c7b6942
commit 86d0d04211c1102be5449a18825aec645c7b6942
Merge: 6e51a62 8256491
Author: Gregor Jasny 
AuthorDate: Wed Nov 23 12:38:17 2016 -0500
Commit: CMake Topic Stage 
CommitDate: Wed Nov 23 12:38:17 2016 -0500

Merge topic '16449-revert-xcode-system-includes' into next

82564914 Revert "Xcode: Obey SYSTEM keyword for includes (#15687)"
8288d161 CMake Nightly Date Stamp


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82564914ff697b04cbc1f4978f9569ba14b33203
commit 82564914ff697b04cbc1f4978f9569ba14b33203
Author: Gregor Jasny 
AuthorDate: Wed Nov 23 18:19:54 2016 +0100
Commit: Gregor Jasny 
CommitDate: Wed Nov 23 18:19:54 2016 +0100

Revert "Xcode: Obey SYSTEM keyword for includes (#15687)"

This reverts commit 93ac2a78d5e0dbb6607105cc8d2a3f19ebdd8583
and restores include flags handling for GNU assembly files.

Closes: #16449

diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index 84a8c5e..4a75b4d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1925,40 +1925,24 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
 
   BuildObjectListOrString dirs(this, this->XcodeVersion >= 30);
   BuildObjectListOrString fdirs(this, this->XcodeVersion >= 30);
+  std::vector includes;
+  this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, "C",
+ configName);
   std::set emitted;
   emitted.insert("/System/Library/Frameworks");
 
-  if (this->XcodeVersion < 60) {
-std::vector includes;
-this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, "C",
-   configName);
-for (std::vector::iterator i = includes.begin();
- i != includes.end(); ++i) {
-  if (this->NameResolvesToFramework(*i)) {
-std::string frameworkDir = *i;
-frameworkDir += "/../";
-frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
-if (emitted.insert(frameworkDir).second) {
-  fdirs.Add(this->XCodeEscapePath(frameworkDir));
-}
-  } else {
-std::string incpath = this->XCodeEscapePath(*i);
-dirs.Add(incpath);
-  }
-}
-  } else {
-for (std::set::iterator li = languages.begin();
- li != languages.end(); ++li) {
-  std::vector includes;
-  this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt, *li,
- configName);
-  std::string includeFlags = this->CurrentLocalGenerator->GetIncludeFlags(
-includes, gtgt, *li, true, false, configName);
-
-  std::string& flags = cflags[*li];
-  if (!includeFlags.empty()) {
-flags += " " + includeFlags;
+  for (std::vector::iterator i = includes.begin();
+   i != includes.end(); ++i) {
+if (this->NameResolvesToFramework(*i)) {
+  std::string frameworkDir = *i;
+  frameworkDir += "/../";
+  frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
+  if (emitted.insert(frameworkDir).second) {
+fdirs.Add(this->XCodeEscapePath(frameworkDir));
   }
+} else {
+  std::string incpath = this->XCodeEscapePath(*i);
+  dirs.Add(incpath);
 }
   }
   // Add framework search paths needed for linking.
diff --git a/Tests/IncludeDirectories/CMakeLists.txt 
b/Tests/IncludeDirectories/CMakeLists.txt
index db18462..4920582 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -3,9 +3,7 @@ project(IncludeDirectories)
 
 if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION 
VERSION_GREATER 4.4)
 OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL 
AppleClang)
-AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles"
-  OR CMAKE_GENERATOR STREQUAL "Ninja"
-  OR (CMAKE_GENERATOR STREQUAL "Xcode" AND NOT XCODE_VERSION VERSION_LESS 
6.0)))
+AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL 
"Ninja"))
   include(CheckCXXCompilerFlag)
   

[CMake] Find packages coming from homebrew

2016-11-23 Thread Cedric Doucet

Hello, 

I would like to write some FindFoo.cmake files to find packages installed on 
different systems including Mac. 
I have noticed that homebrew install packages in a repertory whose name depends 
on the version of the package. 
For example, I have installed a scientific library called scotch, and it is now 
installed here: 



/usr/local/Cellar/scotch/6.0.4_4 




What is the best way to handle such a path in FindScotch.cmake? 




I have think about these ones: 

- looking for /usr/local/Cellar/scotch/${SCOTCH_VERSION} where SCOTCH_VERSION 
has to be provided by users; 

- force users to install a specific version of Scotch which is hardcoded in 
SCOTCH_VERSION variable. 

I think the latter option is better since there is no reason that any version 
of scotch will be compatible with my own code. 

Is there a better way? 

Best regards, 

Cédric 
-- 

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