Re: [CMake] Missing dll on program startup - a way automate it?

2019-11-20 Thread Michael Jackson
You can also use cmake to just copy the DLLs into the appropriate directory. 
Here is a snippet from our own projects.

#---
#- This copies all the Prebuilt Pipeline files into the Build directory so the 
help
#- works from the Build Tree
add_custom_target(PrebuiltPipelinesCopy ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory 
${DREAM3D_SUPPORT_DIR}/PrebuiltPipelines

${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/PrebuiltPipelines/
COMMENT "Copying Prebuilt Pipelines into Binary Directory")
set_target_properties(PrebuiltPipelinesCopy PROPERTIES FOLDER ZZ_COPY_FILES)

--
Mike Jackson 


-- 
Michael A. Jackson                 400 S. Pioneer Blvd
Owner, President                   Springboro, Ohio 45066
BlueQuartz Software, LLC           EMail: mailto:mike.jack...@bluequartz.net
Voice: 937-790-1601                Web: http://www.bluequartz.net/
Fax: 937-746-0783



From: CMake  on behalf of Petr Kmoch 

Date: Wednesday, November 20, 2019 at 3:32 AM
To: cen 
Cc: CMake 
Subject: Re: [CMake] Missing dll on program startup - a way automate it?

Hi.

I haven't used it yet, but I believe the target property 
https://cmake.org/cmake/help/latest/prop_tgt/VS_DEBUGGER_ENVIRONMENT.html might 
help you.

Petr

On Wed, 20 Nov 2019 at 01:02, cen  wrote:
Hi

Perhaps not really a cmake problem but here we go. An exe depends on a 
few DLLs which I ship in the repo so the rest of the devs don't have to 
build them or fetch them somewhere else. Cmake finds the libraries and 
project builds just fine, until you run it from VS.. you are welcomed by 
the "missing dll" windows error. So I have to copy all the dlls to the 
build/run folder to make it work but this is a manual step. Is there 
some way in cmake/VS to somehow tell the IDE to append the execution 
$PATH with all the specified library dependencies or something along 
those lines? Ideally my goal is to just run cmake, open VS, build the 
project and run, all automagical.

I would prefer to keep the dynamic linking.


Best regards, cen

-- 

Powered by http://kitware.com/cmake

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

Visit other Kitware open-source projects at https://www.kitware.com/platforms

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

This mailing list is deprecated in favor of https://discourse.cmake.org
-- Powered by kitware.com/cmake Kitware offers various services to support the 
CMake community. For more information on each offering, please visit 
https://cmake.org/services Visit other Kitware open-source projects at 
https://www.kitware.com/platforms Follow this link to subscribe/unsubscribe: 
https://cmake.org/mailman/listinfo/cmake This mailing list is deprecated in 
favor of https://discourse.cmake.org 


-- 

Powered by kitware.com/cmake

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

Visit other Kitware open-source projects at https://www.kitware.com/platforms

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

This mailing list is deprecated in favor of https://discourse.cmake.org


Re: [CMake] Setting RPATH lookup on macOS

2019-09-12 Thread Michael Jackson
On macOS you really should _not_ have to copy the libraries into the build 
tree. I have never had to do that in 10 years of our product (Windows is a 
different story). The trick is setting the correct options to add in the paths 
to the libraries into the RPATH of the executable/library. (at least on macOS & 
Linux systems).

 

--

Mike Jackson

 

 

From: Juan Sanchez 
Date: Thursday, September 12, 2019 at 11:35 AM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Setting RPATH lookup on macOS

 

The macOS install_name_tool can be used to change the RPATH of your binaries.  
It can also be used to set the path for each of the libraries to be loaded.  
For a python module I compile, I copy each of its dylib into the appropriate 
directory relative to my shared library.  I then use the install_name_tool to 
change from an absolute path to a path relative to @loader_path.

 

install_name_tool -change $j "@loader_path/../gcc/`basename $j`" $i
where $j is the full path output from "otool -L" and "@loader_path/../gcc" 
would point to a directory "gcc" relative to the directory containing my python 
module.

For a binary executable, I would explore placing required dylib files into a 
directory relative to @executable_path.

Regards,

 

Juan


 

On Wed, Sep 11, 2019 at 4:33 PM Michael Jackson  
wrote:

Already looked on google and at the CMake documentation but everything listed 
does not seem to work so here is the setup.

I am using MKL and I have a home grown FindMKL since there isn’t an official 
one. Inside that is the typical find_library() calls which will find the 
libraries just fine. One of those libraries is a dynamic library (.dylib). 
Using otool -L on that library the install_name is encoded as @rpath. 

Now I have my add_executable(foo…) and target_link_libraries (Foo 
${MKL_LIBRARIES} ).

Everything compiles and links fine. The issue is at runtime. The app will not 
launch because libmkl_rt.dylib is not loaded because the path to that library 
is not encoded into the executable.

639:[mjackson@ferb:ifort-release]$ otool -l 
Bin/EMsoftWorkbench.app/Contents/MacOS/EMsoftWorkbench | grep "path"
 name @rpath/libEbsdLib.dylib (offset 24)
 name @rpath/libmkl_rt.dylib (offset 24)
 name @rpath/QtOpenGL.framework/Versions/5/QtOpenGL (offset 24)
 name @rpath/QtNetwork.framework/Versions/5/QtNetwork (offset 24)
 name @rpath/QtConcurrent.framework/Versions/5/QtConcurrent (offset 24)
 name @rpath/QtWidgets.framework/Versions/5/QtWidgets (offset 24)
 name @rpath/QtGui.framework/Versions/5/QtGui (offset 24)
 name @rpath/QtCore.framework/Versions/5/QtCore (offset 24)
 path /Users/Shared/EMsoft_SDK-ifort/EbsdLib-0.1-Release/lib (offset 12)
 path /Users/Shared/EMsoft_SDK-ifort/Qt5.12.3/5.12.3/clang_64/lib 
(offset 12)


Oddly the Qt libraries and one of my own libraries do get their rpaths encoded. 
I feel like I need to append to the RPATH that gets encoded into the executable 
but I am not really figuring out how to do that.

Help

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://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

-- 

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] Setting RPATH lookup on macOS

2019-09-11 Thread Michael Jackson

On 9/11/19, 5:42 PM, "Kyle Edwards"  wrote:

On Wed, 2019-09-11 at 17:33 -0400, Michael Jackson wrote:
> Already looked on google and at the CMake documentation but
> everything listed does not seem to work so here is the setup.
> 
> I am using MKL and I have a home grown FindMKL since there isn’t an
> official one. Inside that is the typical find_library() calls which
> will find the libraries just fine. One of those libraries is a
> dynamic library (.dylib). Using otool -L on that library the
> install_name is encoded as @rpath. 
> 
> Now I have my add_executable(foo…) and target_link_libraries (Foo
> ${MKL_LIBRARIES} ).
> 
> Everything compiles and links fine. The issue is at runtime. The app
> will not launch because libmkl_rt.dylib is not loaded because the
> path to that library is not encoded into the executable.
> 
> 639:[mjackson@ferb:ifort-release]$ otool -l
> Bin/EMsoftWorkbench.app/Contents/MacOS/EMsoftWorkbench | grep "path"
>  name @rpath/libEbsdLib.dylib (offset 24)
>  name @rpath/libmkl_rt.dylib (offset 24)
>  name @rpath/QtOpenGL.framework/Versions/5/QtOpenGL (offset
> 24)
>  name @rpath/QtNetwork.framework/Versions/5/QtNetwork (offset
> 24)
>  name @rpath/QtConcurrent.framework/Versions/5/QtConcurrent
> (offset 24)
>  name @rpath/QtWidgets.framework/Versions/5/QtWidgets (offset
> 24)
>  name @rpath/QtGui.framework/Versions/5/QtGui (offset 24)
>  name @rpath/QtCore.framework/Versions/5/QtCore (offset 24)
>  path /Users/Shared/EMsoft_SDK-ifort/EbsdLib-0.1-Release/lib
> (offset 12)
>  path /Users/Shared/EMsoft_SDK-
> ifort/Qt5.12.3/5.12.3/clang_64/lib (offset 12)
> 
> 
> Oddly the Qt libraries and one of my own libraries do get their
> rpaths encoded. I feel like I need to append to the RPATH that gets
> encoded into the executable but I am not really figuring out how to
> do that.
> 
> Help

Have you looked at the BUILD_RPATH and INSTALL_RPATH properties?

https://cmake.org/cmake/help/latest/prop_tgt/BUILD_RPATH.html
https://cmake.org/cmake/help/latest/prop_tgt/INSTALL_RPATH.html

Kyle

 Missed BUILD_RPATH property. Found every other 
one THanks

--
Mike Jackson



-- 

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] Setting RPATH lookup on macOS

2019-09-11 Thread Michael Jackson
Already looked on google and at the CMake documentation but everything listed 
does not seem to work so here is the setup.

I am using MKL and I have a home grown FindMKL since there isn’t an official 
one. Inside that is the typical find_library() calls which will find the 
libraries just fine. One of those libraries is a dynamic library (.dylib). 
Using otool -L on that library the install_name is encoded as @rpath. 

Now I have my add_executable(foo…) and target_link_libraries (Foo 
${MKL_LIBRARIES} ).

Everything compiles and links fine. The issue is at runtime. The app will not 
launch because libmkl_rt.dylib is not loaded because the path to that library 
is not encoded into the executable.

639:[mjackson@ferb:ifort-release]$ otool -l 
Bin/EMsoftWorkbench.app/Contents/MacOS/EMsoftWorkbench | grep "path"
 name @rpath/libEbsdLib.dylib (offset 24)
 name @rpath/libmkl_rt.dylib (offset 24)
 name @rpath/QtOpenGL.framework/Versions/5/QtOpenGL (offset 24)
 name @rpath/QtNetwork.framework/Versions/5/QtNetwork (offset 24)
 name @rpath/QtConcurrent.framework/Versions/5/QtConcurrent (offset 24)
 name @rpath/QtWidgets.framework/Versions/5/QtWidgets (offset 24)
 name @rpath/QtGui.framework/Versions/5/QtGui (offset 24)
 name @rpath/QtCore.framework/Versions/5/QtCore (offset 24)
 path /Users/Shared/EMsoft_SDK-ifort/EbsdLib-0.1-Release/lib (offset 12)
 path /Users/Shared/EMsoft_SDK-ifort/Qt5.12.3/5.12.3/clang_64/lib 
(offset 12)


Oddly the Qt libraries and one of my own libraries do get their rpaths encoded. 
I feel like I need to append to the RPATH that gets encoded into the executable 
but I am not really figuring out how to do that.

Help

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://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] How to specify VS2017 compilers when on VS2019

2019-08-16 Thread Michael Jackson
Why can't I do -T v141?

--
Mike Jackson 

On 8/16/19, 2:09 PM, "Kyle Edwards"  wrote:

On Fri, 2019-08-16 at 13:54 -0400, Michael Jackson wrote:
> What are the values to the -T argument that are to be used so that I
> can use VS2019 but have the 2017 compilers?

Rather than using a -T argument, you want to set the CC environment
variable or -DCMAKE_C_COMPILER on the command line (likewise for CXX
and CMAKE_CXX_COMPILER.)

Kyle



-- 

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] How to specify VS2017 compilers when on VS2019

2019-08-16 Thread Michael Jackson
What are the values to the -T argument that are to be used so that I can use 
VS2019 but have the 2017 compilers?

 

--

Mike Jackson 

-- 

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] How to support separate debug and release build directories?

2019-06-21 Thread Michael Jackson
David, 

I think a bit more explanation of the philosophy (at least how I interpret 
it) is needed. I see in your emails that you are “targeting makefiles”. With 
CMake you need to really stop thinking this way. Rarely do you need to target 
any specific build system (although those times do come up…). A lot of folks I 
see coming from autoconf to CMake still try to treat CMake in the same way. 
Don’t. There are a few golden rules with CMake that if you adhere to those will 
allow you to use CMake much easier.

 

1: NEVER have the Source directory and the Build directory be the same place.

2: PREFER out-of-source build directories (Not required but helpful)

3: Try not to target specific generators (makefiles, visual studio, xcode)

 

What this looks like is the following. Say I have a project from github called 
Foo and I clone it onto my local filesystem. From a command line perspective 
you get the following:

 

Git clone https://github.com/somebody/Foo

 

The *Preferred* way is this

Clone Foo

*At the same directory level as Foo*

Mkdir Debug && cd Debug

Cmake -DCMAKE_BUILD_TYPE=Release ../Foo

 

 

# We can break rule 2 a bit by making subdirectories inside of Foo

   cd Foo

   mkdir Debug && cd Debug

   cmake -DCMAKE_BUILD_TYPE=Debug ../

   make -j

 

We have just created a Debug build in the Debug Directory. Now, the same is 
analogous for the Release build.

 

Cd Foo

Mkdir Release && cd Release

Cmake -DCMAKE_BUILD_TYPE=Release ../

Make -j

 

*IF* you make these subdirectories in a source code top level be sure to add 
those directory names to the .gitignore file.

 

If your cmake is written properly then the build creates NOTHING inside of the 
source directory.

 

I hope this helps summarize all of the other emails. Glad to have you in the 
CMake community.

 

--

Mike Jackson 

 

From: CMake  on behalf of David Aldrich 

Date: Friday, June 21, 2019 at 12:10 PM
To: Braden McDaniel 
Cc: CMake 
Subject: Re: [CMake] How to support separate debug and release build 
directories?

 

> What would best practice be to provide convenient commands for our
> developers to easily build the target ?

For the Makefile generator, best practice is to use separate build
directories (i.e., places where you run cmake) for different
configurations (i.e., different settings recorded during the
configuration step).

If you want to provide developers with some known set(s) of
configuration settings, I suggest wrapper scripts that invoke cmake
with those settings.

Thanks for your advice. I am not finding it easy to find 'patterns' for these 
sort of issues. I would have thought that configuring a project with separate 
debug and release directories would be quite typical. But it's hard to find the 
recommended way of doing such things. Anyway, I think I am on the right track 
now.

-- 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] CTest not exporting users HOME environment variable?

2019-05-31 Thread Michael Jackson
We have a program written in Fortran that asks for the user’s HOME environment 
variable. If I run the program from my typical terminal then I get what I would 
expect on macOS: /Users/mjackson, BUT if I run CTest to execute the program I 
get an empty HOME variable. Is there something special that needs to be done to 
ensure that CTest exports the HOME variable for the user running the test?

 

--

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] How to use Ninja on Windows with MSVC?

2019-05-22 Thread Michael Jackson
Cool tip. Didn’t know that. I should compact my script a bit. I do that for the 
Intel Fortran compiler that we use but didn’t think of it for the vcvarsall.bat 
file.

 

--

Mike Jackson 

 

From: Juan Sanchez 
Date: Wednesday, May 22, 2019 at 11:41 AM
To: Michael Jackson 
Cc: Robert Dailey , CMake 
Subject: Re: [CMake] How to use Ninja on Windows with MSVC?

 

 

 

On Wed, May 22, 2019 at 10:27 AM Michael Jackson  
wrote:

Do this all the time both for our CDash nightlies and when I am developing on 
Windows. The essential pieces of the puzzle are the following:

1: Ninja needs to be on your path
2: The compilers need to be on your path.

1 can be solved in a few different ways. The brute force is to edit the system 
path variable and place the folder containing Ninja into the system path. I do 
NOT recommend doing this. Repeat. DON'T DO IT. You can edit your "User" PATH 
environment variable and add to the PATH. This is the more recommended way but 
a bit tedious to get into that dialog box to adjust. We will come back to this..

For 2, use the "Visual Studio Command Prompt" which has all the paths to the 
compilers setup for you. Now the question becomes, how to combine 1 and 2. My 
own solution (which is far from optimal, but works) is that I setup my own 
"short cut" to a command prompt that launches my own custom .bat file that sits 
on my desktop. In that .bat file is basically a copy of the vcvarsall.bat file 
and then I add to that my own specific PATH values for things like Qt, hdf5, 
cmake, ninja that on located on my system. I keep both the shortcut and the 
.bat file on my desktop so all I need to do is double click to get a correctly 
configured command prompt for my dev environment. If a version of something 
changes I just edit the .bat file and I am ready to go. You can then also do 
"cmake-gui.exe ." from inside a build folder to have CMake-Gui launch with all 
the correctly identified compilers. 

 

For this option, you can use the batch command, "call", to read in the 
environment of another ".bat" script, so that you do not have to make copies of 
the vcvarsall.bat files.  As long as you are not using "setlocal" in a script, 
then the environment variables will propagate up to the caller.

 

 For example your script can have (for VS 2015) :

call "%VS140COMNTOOLS%VsVars32.bat"  

 

and the add lines setting additional PATH values.

 

Regards,

 

Juan

 

 


I am happy to share the .bat file if you are interested. I have it updated for 
VS2017 at the moment but have been doing it this way since VS2013.

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://www.bluequartz.net>

On 5/22/19, 9:58 AM, "CMake on behalf of Robert Dailey" 
 wrote:

From the command line, I want to generate Ninja build scripts that
utilize a specific version of MSVC compiler. Basically I'd like the
combination of `-G"Visual Studio 15 2017"` with regards to its ability
to find the C and C++ compiler on the system via registry/environment
variables, and `-G"Ninja"` with regards to it being the build driver
for that compiler.

Is this even possible?
-- 



-- 

Powered by www.kitware.com

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

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

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

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

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

-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] How to use Ninja on Windows with MSVC?

2019-05-22 Thread Michael Jackson
Do this all the time both for our CDash nightlies and when I am developing on 
Windows. The essential pieces of the puzzle are the following:

1: Ninja needs to be on your path
2: The compilers need to be on your path.

1 can be solved in a few different ways. The brute force is to edit the system 
path variable and place the folder containing Ninja into the system path. I do 
NOT recommend doing this. Repeat. DON'T DO IT. You can edit your "User" PATH 
environment variable and add to the PATH. This is the more recommended way but 
a bit tedious to get into that dialog box to adjust. We will come back to this..

For 2, use the "Visual Studio Command Prompt" which has all the paths to the 
compilers setup for you. Now the question becomes, how to combine 1 and 2. My 
own solution (which is far from optimal, but works) is that I setup my own 
"short cut" to a command prompt that launches my own custom .bat file that sits 
on my desktop. In that .bat file is basically a copy of the vcvarsall.bat file 
and then I add to that my own specific PATH values for things like Qt, hdf5, 
cmake, ninja that on located on my system. I keep both the shortcut and the 
.bat file on my desktop so all I need to do is double click to get a correctly 
configured command prompt for my dev environment. If a version of something 
changes I just edit the .bat file and I am ready to go. You can then also do 
"cmake-gui.exe ." from inside a build folder to have CMake-Gui launch with all 
the correctly identified compilers. 

I am happy to share the .bat file if you are interested. I have it updated for 
VS2017 at the moment but have been doing it this way since VS2013.

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://www.bluequartz.net>

On 5/22/19, 9:58 AM, "CMake on behalf of Robert Dailey" 
 wrote:

From the command line, I want to generate Ninja build scripts that
utilize a specific version of MSVC compiler. Basically I'd like the
combination of `-G"Visual Studio 15 2017"` with regards to its ability
to find the C and C++ compiler on the system via registry/environment
variables, and `-G"Ninja"` with regards to it being the build driver
for that compiler.

Is this even possible?
-- 



-- 

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 Dependence on C: drive?

2019-02-20 Thread Michael Jackson
Thanks for the sanity check. I'm not really sure what is going wrong then.
Not a big deal per se but would really like to figure out what the issue
is. Maybe something funky with my PATH variable. This is on Windows 10 x64.

--
Mike Jackson

On Tue, Feb 19, 2019 at 7:21 PM J. Caleb Wherry 
wrote:

> Seems strange. Just yesterday I pulled down 3.13.4 and had no issues. I
> check cmake into our repo so it gets invoked on an assortment of different
> drives. I do the same thing you do and just change our bat config file to
> point to the new cmake binary. Never had any issues.
>
> I am running on Win7 but colleagues use Win10 and have not had any issues
> either.
>
> All that to say: shouldn’t be an issue.
>
> -Caleb
>
> On Tue, Feb 19, 2019 at 5:05 PM Michael Jackson <
> mike.jack...@bluequartz.net> wrote:
>
>> Currently using CMake 3.13.3 on Windows 10. I have “installed” cmake
>> through the .zip download and placed it in E:\DREAM3D_SDK\ 
>> cmake-3.13.3-win64-x64.
>>
>>
>>
>>
>> If I now try to use that cmake to configure my source codes I get very
>> strange errors (It cannot parse a simple project command) and then
>> complains that it cannot find a CMake_MAKE_PROGRAM matching the “-G Ninja”.
>>
>>
>>
>> I then went back to using the same version of CMake, but placed on the
>> C:/DREAM3D_SDK/cmake-3.13.3-win64-x64 and now everything works as in the
>> past, no problems. I have a .bat file that sets up my environment with
>> needed paths and such. The ONLY difference between the 2 invocations was
>> that I changed the path to reflect the alternate location of CMake. I can
>> have 2 difference command prompts open based on this difference and one
>> works and one does not.
>>
>>
>> Was/Is there a known limitation where CMake _*must*_ be run from the C:
>> drive?
>>
>>
>>
>> --
>>
>> 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


[CMake] CMake Dependence on C: drive?

2019-02-19 Thread Michael Jackson
Currently using CMake 3.13.3 on Windows 10. I have “installed” cmake through 
the .zip download and placed it in E:\DREAM3D_SDK\ cmake-3.13.3-win64-x64. 

 

If I now try to use that cmake to configure my source codes I get very strange 
errors (It cannot parse a simple project command) and then complains that it 
cannot find a CMake_MAKE_PROGRAM matching the “-G Ninja”.

 

I then went back to using the same version of CMake, but placed on the 
C:/DREAM3D_SDK/cmake-3.13.3-win64-x64 and now everything works as in the past, 
no problems. I have a .bat file that sets up my environment with needed paths 
and such. The ONLY difference between the 2 invocations was that I changed the 
path to reflect the alternate location of CMake. I can have 2 difference 
command prompts open based on this difference and one works and one does not. 


Was/Is there a known limitation where CMake _must_ be run from the C: drive?

 

--

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 GUI "Stop" button does not halt exec_process

2019-01-11 Thread Michael Jackson
This is interesting as I have come across something that sounds related but 
might not be. Inside of QtCreator my projects are setup to call “cmake –build 
${build_dir} –target all”. After updating to Xcode 10.1 from Xcode 9.4.x when I 
stop my build inside of QtCreator the cmake process itself is stopped BUT the 
actual compilers (clang in my case) keep going. I have to open a terminal and 
“killall clang” to get everything to stop. I never had a problem until I 
updated to Xcode 10.1. This is with CMake 3.13.0 and macOS 10.13.6. Again, 
maybe related, maybe not.

 

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: CMake  on behalf of Person Withhats 

Date: Friday, January 11, 2019 at 11:47 AM
To: Hendrik Sattler 
Cc: CMake 
Subject: Re: [CMake] CMake GUI "Stop" button does not halt exec_process

 

I don't follow. None of this looks like I can press stop in CMake and have the 
process die. I'm not making any additional children, just execute_process in 
CMak (so 1 child that never gets killed).

 

On Fri, Jan 11, 2019 at 7:58 AM Hendrik Sattler  wrote:

Hi,

killing everything might be problematic in some cases: MSVC uses some shared 
processes to write PDB files. Killing that will make an unrelated other build 
fail. That was real fun to find out when Jenkins was cleaning up. So kill your 
children but don't be too pedantic.

HS

Am 11. Januar 2019 10:43:05 MEZ schrieb Chris Wilson :

In case it helps, Box Backup uses Windows Job Objects to ensure that any 
daemons started during a test will automatically be killed when the test 
process exits (if not stopped cleanly beforehand):

 

https://github.com/boxbackup/boxbackup/blob/s3_support/infrastructure/buildenv-testmain-template.cpp#L367

 

On Linux you can use prctl(PR_SET_PDEATHSIG, SIGKILL) in the child process 
(between fork() and exec()) to achieve this.

 

On Thu, 10 Jan 2019 at 22:17, Person Withhats  wrote:

Pressing "STOP" in the CMake GUI interface halts CMake itself but does not stop 
any execute_process that is going on at the time. This makes it hang until the 
process finishes, since no interrupt is sent..

 

Aggravating when you're using an exterior script (e.g. a .exe or .py) that e.g. 
handles package maintenance. Would hang up for the entire duration of ~40 
minutes unless you force kill that sub process.

 

I think force-killing CMake GUI also won't forward the kill to the 
exec_process, orphaning it.>.<

 

Let me know any suggestions or possible fixes

-- 

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 

-- 

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] Putting the git commit hash in a cmake variable

2018-10-11 Thread Michael Jackson
You could use a custom_target() instead, where that target is a simple 
shell/batch file that runs the needed git command and creates a simple header 
file. Then your main executable/library targets are dependent on that 
custom_target() so that it is run every time. We do something similar in our 
project. I added some "smarts" to it to at least compare the new output with 
the old output and only over write if they are different. 

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://www.bluequartz.net>

On 10/10/18, 5:05 PM, "CMake on behalf of Matt Schulte" 
 wrote:

Hi all,

I'd like to set a CMake variable to the current git commit short hash.
This variable will be used as part of the version string for my
project (ex: "1.0.1+git.${SHORT_HASH}"). I can get at this short hash
by using execute_process and setting the resulting output to a
variable.

```cmake
execute_process(
COMMAND
git rev-parse --short HEAD
RESULT_VARIABLE
SHORT_HASH_RESULT
OUTPUT_VARIABLE
SHORT_HASH)
```

My issue is that cmake will only run execute_process once, during the
configure step. I need cmake to run this execute_process on every
build and, if the output has changed, reconfigure to make sure
SHORT_HASH is up to date.

I came up with one solution to this issue: During the configure step,
I can write the current short hash to a file named short_hash.txt. On
every build, I'll re-compute the short hash and verify that the
computed short hash is the same as what is in short_hash.txt. If its
not, I'll write the new short hash to short_hash.txt. I then make
short_hash.txt an input to configure_file. This will cause cmake to
validate SHORT_HASH is properly set, and re-configure if its not.

```cmake
execute_process(
COMMAND
git rev-parse --short HEAD
RESULT_VARIABLE
SHORT_HASH_RESULT
OUTPUT_VARIABLE
SHORT_HASH)

# If running in script mode (this runs on every build)
if (CMAKE_SCRIPT_MODE_FILE)
if (EXISTS "${SHORT_HASH_FILE}")
file(READ ${SHORT_HASH_FILE} READ_IN_SHORT_HASH)
else()
set(READ_IN_SHORT_HASH "")
endif()

if (NOT ("${READ_IN_SHORT_HASH}" STREQUAL "${SHORT_HASH}"))
message(STATUS "Short hash is out of date")
# This will update short_hash.txt, causing cmake to reconfigure
file(WRITE ${SHORT_HASH_FILE} ${SHORT_HASH})
endif()

# Else running as part of cmake configure
else()
set(SHORT_HASH_FILE ${CMAKE_CURRENT_BINARY_DIR}/short_hash.txt)
file(WRITE ${SHORT_HASH_FILE} ${SHORT_HASH})

# The trick here is to make sure short_hash.txt is listed as a byproduct
add_custom_target(
git_short_hash
BYPRODUCTS
${SHORT_HASH_FILE}
COMMAND
${CMAKE_COMMAND}
"-DSHORT_HASH_FILE=${SHORT_HASH_FILE}"
"-P" "${CMAKE_CURRENT_LIST_FILE}"
COMMENT
"Re-checking short hash..."
VERBATIM
USES_TERMINAL)

# This configure_file makes cmake reconfigure dependent on 
short_hash.txt
configure_file(${SHORT_HASH_FILE} ${SHORT_HASH_FILE}.junk COPYONLY)

message(STATUS "Short Hash: ${SHORT_HASH}")
endif()
```

This works great with cmake 3.12 and ninja 1.8.2! (I was really happy
with how well it worked. I tip my hat to the cmake developers for
this). However, it doesn't work with Makefiles, and causes ninja 1.7.2
to get stuck in an infinite loop. On CMake 3.10 this will cause ninja
1.8.2 to generate a warning about a loop.

Has anyone run into this issue before and have a better solution? Or
is trying to execute a command before cmake checks if it should
reconfigure a hack that should never be done?

Thanks for the help!
Matt
-- 

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

Pl

Re: [CMake] Bundling Qt5 with CMake on Linux

2018-10-08 Thread Michael Jackson
I think we ended up doing a lot of "if Qt version is X and System is Y) then 
install Z" inside of our CMake codes. We abstracted out the Qt library names so 
we just make lists of the libraries, plugins and system specific binaries that 
are needed then the CMake code creates install rules to place them into the 
proper location. Not neat, not clean but works for us.

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://www.bluequartz.net>

On 10/8/18, 6:44 AM, "CMake on behalf of Andreas Pakulat" 
 wrote:

Hi,

I'm currently trying to find a good approach to bundling Qt5 with my
application on Linux using CMake (and CPack to create tar.gz). It
appears this topic isn't covered very well - or I'm using the wrong
search keywords.

What I have right now is copying the different plugins that are needed
by the application into the install directory, then run fixup_bundle
over the executable passing the Qt library directory and the plugins
in the install location. In addition to that a qt.conf is written. Now
this has a few problems:

- BundleUtilities decides to put the qt libraries into the bin/ folder
where the executable is, that requires a more complicated qt.conf
since the location of plugins and libraries relative to one another is
not the same as in the Qt installation directory
- BundleUtilities decides to strip rpath and runpath from the copied
libraries, this is a major problem since the Qt libraries depend on
icu-libraries which are not found anymore without the runpath they
have originally ($ORIGIN)

It appears both of these are not configurable which makes me wonder if
anybody here is using BundleUtilities at all on Linux for bundling
Qt5. If not, what are you using instead?

I could live with the libraries in the bin/ folder instead of the lib/
folder but the second point is a problem.

I shortly looked at the linuxdeployqt project
(https://github.com/probonopd/linuxdeployqt) but that only helps when
wanting to ship an AppImage or AppDir, but since I'm looking at
creating a package from a couple of binaries all using Qt that's not
an option either.

Andreas
-- 

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] Issues with Python, Locale, CTest and MacOS

2018-09-27 Thread Michael Jackson
As part of our build we use “mkdocs” to generate our documentation. Last night 
I thought I made an innocuous change to our CMake files which ended up blowing 
up all of our macOS builds (10.10 and 10.13 systems). It is all related to 
trying to get Python/Mkdocs/Click to use a locale that is UTF-8 and not ASCII. 

Part of the error is:

Error 
  File "/usr/local/anaconda3/lib/python3.6/site-packages/click/_unicodefun.py", 
line 118, in _verify_python3_env
'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was 
configured to use ASCII as encoding for the environment.  Consult 
http://click.pocoo.org/python3/for mitigation steps.

This system lists a couple of UTF-8 supporting locales that
you can pick from.  The following suitable locales where
discovered: af_ZA.UTF-8, am_ET.UTF-8, be_BY.UTF-8, bg_BG.UTF-8, ca_ES.UTF-8, 
cs_CZ.UTF-8, da_DK.UTF-8, de_AT.UTF-8, de_CH.UTF-8, de_DE.UTF-8, el_GR.UTF-8, 
en_AU.UTF-8, en_CA.UTF-8, en_GB.UTF-8, en_IE.UTF-8, en_NZ.UTF-8, en_US.UTF-8, 
es_ES.UTF-8, et_EE.UTF-8, eu_ES.UTF-8, fi_FI.UTF-8, fr_BE.UTF-8, fr_CA.UTF-8, 
fr_CH.UTF-8, fr_FR.UTF-8, he_IL.UTF-8, hr_HR.UTF-8, hu_HU.UTF-8, hy_AM.UTF-8, 
is_IS.UTF-8, it_CH.UTF-8, it_IT.UTF-8, ja_JP.UTF-8, kk_KZ.UTF-8, ko_KR.UTF-8, 
lt_LT.UTF-8, nl_BE.UTF-8, nl_NL.UTF-8, no_NO.UTF-8, pl_PL.UTF-8, pt_BR.UTF-8, 
pt_PT.UTF-8, ro_RO.UTF-8, ru_RU.UTF-8, sk_SK.UTF-8, sl_SI.UTF-8, sr_YU.UTF-8, 
sv_SE.UTF-8, tr_TR.UTF-8, uk_UA.UTF-8, zh_CN.UTF-8, zh_HK.UTF-8, zh_TW.UTF-8

The whole build can be found at 
<https://my.cdash.org/viewBuildError.php?buildid=1534910>

The _only_ way I seem to be able to get this to work is to use the built in 
python 2.7 at /usr/bin/python on the systems. I tried anaconda3 and python.org 
and neither of those worked. I can't be the only person to encounter this issue 
in CTest on a mac? If I build from the command line everything works just fine 
no matter which Python distribution that I use. The Ctest script is launched 
through "launchd" on the mac. I have exported environment variables, set 
environment variables for the locale in each bash script file that gets called? 
I am just plain out of ideas. 

Thanks for any help.

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://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] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

2018-09-21 Thread Michael Jackson
Nope. That just tells what _version_ of the compiler suite to use, but not
the architecture.

-- The C compiler identification is MSVC 19.0.24234.1
-- The CXX compiler identification is MSVC 19.0.24234.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe -- works

C:\Users\mjackson\DREAM3D-Dev\DREAM3D-Builds\Test>set
PreferredToolArchitecture=x64
C:\Users\mjackson\DREAM3D-Dev\DREAM3D-Builds\Test>cmake -G "Visual Studio
15 2017 Win64" -T "v140" -DDREAM3D_SDK=C:/DREAM3D_SDK ../../DREAM3D
--  *
-- ***
-- The C compiler identification is MSVC 19.0.24234.1
-- The CXX compiler identification is MSVC 19.0.24234.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/amd64/cl.exe -- works


_
Mike Jackson  mike.jack...@bluequartz.net



On Fri, Sep 21, 2018 at 4:02 PM J Decker  wrote:

> "C:/tools/unix/cmake/bin/cmake.exe" -G "Visual Studio 15 2016 Win64" -T
> "v140" ..
> C:\tools\unix\cmake\bin\cmake.exe --build . --config "Debug" --target
> "INSTALL"
>
> On Fri, Sep 21, 2018 at 8:26 AM Michael Jackson <
> mike.jack...@bluequartz.net> wrote:
>
>> So I tried using "-DCMAKE_GENERATOR_TOOLSET=x64" while configuring a
>> clean build directory but it still picked up the x86 compiler. I ended up
>> going into the "Settings" of Windows 10 and added the environment variable
>> PreferredToolArchitecture=x64 to my account. Logged out, Logged back in and
>> then did another configuration run and now during the cmake configuration
>> run the proper 64 bit compiler is picked up and used. Still probably
>> missing something obvious in the CMake file that I can add
>>
>> --
>> Mike Jackson
>>
>> On 9/21/18, 10:28 AM, "CMake on behalf of Mateusz Loskot" <
>> cmake-boun...@cmake.org on behalf of mate...@loskot.net> wrote:
>>
>> On Fri, 21 Sep 2018 at 16:13, Michael Jackson
>>  wrote:
>> >
>> > For those that want to actually use Visual Studio 15 2017 is there
>> anything in CMake or an environment variable that can be set?
>>
>> Isn't host=x64 for that purpose?
>>
>>
>> https://cmake.org/cmake/help/v3.12/variable/CMAKE_GENERATOR_TOOLSET.html
>>
>> Best regards
>> --
>> Mateusz Loskot, http://mateusz.loskot.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
>>
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> https://cmake.org/mailman/listinfo/cmake
>>
>
-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

2018-09-21 Thread Michael Jackson
So I tried using "-DCMAKE_GENERATOR_TOOLSET=x64" while configuring a clean 
build directory but it still picked up the x86 compiler. I ended up going into 
the "Settings" of Windows 10 and added the environment variable 
PreferredToolArchitecture=x64 to my account. Logged out, Logged back in and 
then did another configuration run and now during the cmake configuration run 
the proper 64 bit compiler is picked up and used. Still probably missing 
something obvious in the CMake file that I can add 

--
Mike Jackson 

On 9/21/18, 10:28 AM, "CMake on behalf of Mateusz Loskot" 
 wrote:

On Fri, 21 Sep 2018 at 16:13, Michael Jackson
 wrote:
>
> For those that want to actually use Visual Studio 15 2017 is there 
anything in CMake or an environment variable that can be set?

Isn't host=x64 for that purpose?

https://cmake.org/cmake/help/v3.12/variable/CMAKE_GENERATOR_TOOLSET.html

Best regards
-- 
Mateusz Loskot, http://mateusz.loskot.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



-- 

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] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

2018-09-21 Thread Michael Jackson
That will NOT use the x64 tool chain. It will use the 32 bit tool chain to 
produce a 64 bit binary, but NOT use the 64 bit compiler. 

Looks like there are 3 ways to do it:

https://stackoverflow.com/questions/46683300/use-64-bit-compiler-in-visual-studio

Either hack the project file or set an environment variable or use the -T 
host=x64" option with compiling (as Volker just mentioned).
--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://www.bluequartz.net>

On 9/21/18, 10:41 AM, "R0b0t1"  wrote:

You select x64 when selecting the generator. Use "Visual Studio VV
 Win64" where VV is version and  is year.


-- 

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] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

2018-09-21 Thread Michael Jackson
The easy answer is to use “ninja” from a VS tools X64 Native command prompt. 
For those that want to actually use Visual Studio 15 2017 is there anything in 
CMake or an environment variable that can be set?


The issue is that when I configure I select “Visual Studio 15 2017 Win64” BUT 
the actual tool chain that VS is using under the hood is a 32 bit compiler. I 
have verified this through stack overflow and looking at the task manager.

 

https://stackoverflow.com/questions/46056263/use-the-64-bit-visual-c-toolset-in-visual-studio-2017

https://stackoverflow.com/questions/19820718/how-to-make-visual-studio-use-the-native-amd64-toolchain/25626630#25626630

 

Is there a CMake variable that I can set to tell Visual Studio to use the X64 
toolchain?


Thanks

--

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] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
I add it manually each and every time. I have to tell all new developers to 
remember to add the flag otherwise they are still sitting after an hour waiting 
on our code to compile wondering why it takes so long. Then it hits us, "Oh, 
Yeah. Open CMake-Gui and set the /MP flag". I'm frustrated at the situation but 
not sure how to fix it. I tried the other suggestions and just nothing works. 
This is one of those things that I poke at once a year and figure out that 
nothing has changed. Been this way since VS 2013. Someday it will change.

--
Mike Jackson 

On 9/11/18, 1:28 PM, "CMake on behalf of Innokentiy Alaytsev" 
 wrote:

Hello!

Did you consider adding the flag manually during project configuration? I do
not know you use case, but after some thinking about the best way of
achieving multiprocess compilation under MSVS with CMake I decided, that the
simplest, most portable and flexible is to just add this flag manually. One
of the reasons for such a decision is that I do not know how the project may
be built and multiprocess compilation may cause problems under some hardware
configurations.

Best regards,
Innokentiy



--
Sent from: http://cmake.3232098.n2.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:
https://cmake.org/mailman/listinfo/cmake



-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
Just to be clear I _only_ need it when the generator is Visual Studio so I did 
the following:

 

if(MSVC_IDE)

  add_compile_options(/MP)

endif()

 

>From a clean build directory that did not add it to the CMAKE_CXX_FLAGS when 
>viewed in CMake-Gui.

 

--

Mike Jackson 

 

From: Marc CHEVRIER 
Date: Tuesday, September 11, 2018 at 1:28 PM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

 

If you set directory property at the top level CMakeList.txt, before any target 
definition, all targets will inherit this value.

 

And, because property 'COMPILE_OPTIONS' supports generator expressions (see 
https://cmake.org/cmake/help/v3.12/manual/cmake-generator-expressions.7.html), 
you can specify:

 

add_compile_options("$<$:/MP>")

 

 

Le mar. 11 sept. 2018 à 19:19, Michael Jackson  a 
écrit :

Hmm. The idea for the “/MP” flags for those that don’t use Visual Studio is 
that it will inform the compiler to use all the cores on the system to compile. 
Much like Ninja does automatically and “make -jN” does for makefiles.

Essentially I want to automatically add the “/MP” flag anytime that I configure 
using Visual Studio (2015/2017) as the generator. I guess I could put the 
append string fairly high up in the CMake hierarchy. I am not seeing a property 
(from the first link you sent) that would allow me to do that.

 

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: Marc CHEVRIER 
Date: Tuesday, September 11, 2018 at 1:04 PM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

 

The best approach is to use properties (see 
https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).

 

At directory level and target level you can use property 'COMPILE_OPTIONS'.  
These properties can be updated using, respectively 'add_compile_options' and 
'target_compile_options'.

 

Be aware that variable 'CMAKE_CXX_FLAGS' is a string so to extend it you have 
to use:

string(APPEND CMAKE_CXX_FLAGS "flag1 flag2")

 

 

Le mar. 11 sept. 2018 à 17:58, Michael Jackson  a 
écrit :

What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I 
would like:

 

If (MSVC)

Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. 
What is the best practice for doing this?

 

Thanks

--

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

-- 

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] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
Hmm. The idea for the “/MP” flags for those that don’t use Visual Studio is 
that it will inform the compiler to use all the cores on the system to compile. 
Much like Ninja does automatically and “make -jN” does for makefiles.

Essentially I want to automatically add the “/MP” flag anytime that I configure 
using Visual Studio (2015/2017) as the generator. I guess I could put the 
append string fairly high up in the CMake hierarchy. I am not seeing a property 
(from the first link you sent) that would allow me to do that.

 

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: Marc CHEVRIER 
Date: Tuesday, September 11, 2018 at 1:04 PM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] Appending to CMAKE_CXX_FLAGS

 

The best approach is to use properties (see 
https://cmake.org/cmake/help/git-master/manual/cmake-properties.7.html).

 

At directory level and target level you can use property 'COMPILE_OPTIONS'.  
These properties can be updated using, respectively 'add_compile_options' and 
'target_compile_options'.

 

Be aware that variable 'CMAKE_CXX_FLAGS' is a string so to extend it you have 
to use:

string(APPEND CMAKE_CXX_FLAGS "flag1 flag2")

 

 

Le mar. 11 sept. 2018 à 17:58, Michael Jackson  a 
écrit :

What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I 
would like:

 

If (MSVC)

Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. 
What is the best practice for doing this?

 

Thanks

--

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

-- 

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] Appending to CMAKE_CXX_FLAGS

2018-09-11 Thread Michael Jackson
What is the “modern” way to append to CMAKE_CXX_FLAGS? This is the logic that I 
would like:

 

If (MSVC)

    Set(CMAKE_CXX_FLAGS ${ CMAKE_CXX_FLAGS} “/MP”)

Endif()

 

I have always heard that appending to the compile flags in this way is “bad”. 
What is the best practice for doing this?

 

Thanks

--

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] Copy file from Source to Build dir based on CMAKE_CFG_INTDIR

2018-08-23 Thread Michael Jackson
Hmm, That works great for MSVC compiles but not so great when I use ninja or 
makefiles (any of the single config generators). I was looking through the 
generator expressions on the Cmake doc site but didn't really come across 
anything that seems like it would get me what is needed. I guess I just put in:

If(MSVC or Xcode)
  Do this
Else()
  Do that
Endif().

Seems like this should just not be needed...

--
Mike Jackson 

On 8/23/18, 1:59 PM, "Robert Maynard"  wrote:

You can use `file(GENERATE` and the `$` generator expression.

Here is an example:

https://gitlab.kitware.com/cmake/cmake/blob/v3.12.1/Tests/CudaOnly/ExportPTX/CMakeLists.txt#L13
On Thu, Aug 23, 2018 at 1:47 PM Michael Jackson
 wrote:
>
> I would like to copy some files from my source dir into my binary 
RUNTIME_DIR based on the current configuration being compiled. For generators 
like “makefiles” and “ninja” this is easy and straight forward. I am having an 
issue getting my head wrapped around how to use CMAKE_CFG_INTDIR properly.
>
>
>
> I know I can’t do this a cmake time so I tried the following:
>
>
>
> During CMake time write out another CMake file:
>
>
>
>   file(APPEND "${PYSIMPL_SCRIPT_COPY_RULE}"
>
> "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>
>   \"${SIMPLPyBind11_SOURCE_DIR}/../Testing/${script}\"
>
>   
\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/\${CMAKE_CFG_INTDIR}/python/site-packages/${script}\")\n"
>
>   )
>
>
>
> Which creates entries like this in the written .cmake file:
>
>
>
> execute_process(COMMAND 
C:/DREAM3D_SDK/cmake-3.12.0-rc2-win64-x64/bin/cmake.exe -E copy_if_different
>
>   
"C:/Users/mjackson/DREAM3D-Dev/DREAM3D/ExternalProjects/SIMPL/Wrapping/Python/Pybind11/../Testing/AbstractFilterTest.py"
>
>   
"C:/Users/mjackson/DREAM3D-Dev/DREAM3D-Builds/x64/Bin/${CMAKE_CFG_INTDIR}/python/site-packages/AbstractFilterTest.py")
>
>
>
> Which does not work. The files end up in 
${BUILD_DIR}/Bin/python/site-packages/. I need them to end up in 
${BUILD_DIR}/Bin/Release/python/site-packages for a Release build. Same for 
Debug…
>
>
>
> Could someone tell me what I am doing wrong or the proper way to go about 
this? I am about ready to write a simple C++ program to do the copy for me 
(which seems ludicrous to have to do..)
>
> --
>
> 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



-- 

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] Copy file from Source to Build dir based on CMAKE_CFG_INTDIR

2018-08-23 Thread Michael Jackson
I would like to copy some files from my source dir into my binary RUNTIME_DIR 
based on the current configuration being compiled. For generators like 
“makefiles” and “ninja” this is easy and straight forward. I am having an issue 
getting my head wrapped around how to use CMAKE_CFG_INTDIR properly.

 

I know I can’t do this a cmake time so I tried the following:

 

During CMake time write out another CMake file:

 

  file(APPEND "${PYSIMPL_SCRIPT_COPY_RULE}" 

"execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different

  \"${SIMPLPyBind11_SOURCE_DIR}/../Testing/${script}\" 

  
\"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/\${CMAKE_CFG_INTDIR}/python/site-packages/${script}\")\n"

  )

 

Which creates entries like this in the written .cmake file:

 

execute_process(COMMAND C:/DREAM3D_SDK/cmake-3.12.0-rc2-win64-x64/bin/cmake.exe 
-E copy_if_different

  
"C:/Users/mjackson/DREAM3D-Dev/DREAM3D/ExternalProjects/SIMPL/Wrapping/Python/Pybind11/../Testing/AbstractFilterTest.py"
 

  
"C:/Users/mjackson/DREAM3D-Dev/DREAM3D-Builds/x64/Bin/${CMAKE_CFG_INTDIR}/python/site-packages/AbstractFilterTest.py")

 

Which does not work. The files end up in 
${BUILD_DIR}/Bin/python/site-packages/. I need them to end up in 
${BUILD_DIR}/Bin/Release/python/site-packages for a Release build. Same for 
Debug…

 

Could someone tell me what I am doing wrong or the proper way to go about this? 
I am about ready to write a simple C++ program to do the copy for me (which 
seems ludicrous to have to do..)

--

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] Packaging dylibs into app bundles

2018-07-19 Thread Michael Jackson
You need to pass in more paths to the “fixup_bundle()” method. Those paths are 
the paths where the libraries are located so CMake has somewhere else to look 
in case the absolute path is not encoded in the dylib itself. I could point you 
to our project but it is pretty scary in there. We use a custom generated CMake 
script that does a bunch of extra stuff that Qt requires (qt.conf) and stuff 
like that. Does work reliably for use once we got it setup.

 

https://github.com/BlueQuartzSoftware/CMP/tree/develop/OSX_Tools

https://github.com/BlueQuartzSoftware/CMP/blob/develop/OSX_Tools/CompleteBundle.cmake.in

https://github.com/BlueQuartzSoftware/CMP/blob/develop/OSX_Tools/MacOSXBundleInfo.plist.in

 

They probably are not an “exemplar” of how to do things as they were created 
when CMake 3.1 was new so there are probably better ways to get the same thing 
done but this works in our environment. I have a whole separate bash script 
that lets us create a signed .dmg file.

 

--

Mike Jackson

 

On 7/19/18, 2:04 PM, "CMake on behalf of Harry Mallon"  wrote:

 

Hi,

 

I have been messing arounds with fixup_bundle (which seems to be the correct 
function). It worked for a small test case, but only if the dylibs required had 
otool ids of their full path. Ours currently have rpath based ones (e.g. 
@rpath/libcrypto.dylib). So I get a lot of:

 

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump:
 '@rpath/ libcrypto.dylib’: No such file or directory  

 

Hmm, seems like the stuff is there somewhere to make this work…

 

Best,

Harry

 

From: Stephen McDowell 
Date: Thursday, 19 July 2018 at 17:35
To: Harry Mallon 
Cc: CMake MailingList 
Subject: Re: [CMake] Packaging dylibs into app bundles

 

Hi Harry, 

 

I don't know how useful this will be, but the Instant Meshes application 
creates an app bundle that has always worked reliably for me. Looking at the 
code, it doesn't appear like there's much custom stuff going on either. It 
starts here

 

https://github.com/wjakob/instant-meshes/blob/011fa44ab72037cbc16535090a63ead41963c1e5/CMakeLists.txt#L151

 

And there's an if APPLE block below that appears to be the core.

 

Hope that is useful :) I've never actually done this for any of my own projects 
though. And I'm pretty sure them setting the underlying GUI library and TBB to 
be static (as opposed to shared) is skirting around the issue that you are 
trying to solve (dylib stuff)...

 

-Stephen

 

On Thu, Jul 19, 2018, 9:03 AM Harry Mallon  wrote:

Hello all,

 

Is there a good tutorial/article on getting CMake to package required dylibs 
and frameworks into an app bundle for you on mac. We have a lot of custom stuff 
to do it and it is fragile and breaks a lot.

 

Thanks,

Harry

Harry Mallon

Senior Software Engineer

T +44 203 7000 989 

60 Poland Street | London | England | W1F 7NT 

Three BillboardsBlade Runner 2049  I, Tonya

 

-- 

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 

-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] CMake 3.12 rc2 to rc3 Regression

2018-07-19 Thread Michael Jackson
Thank you for the links. 

 

After reading through all the various discussions is there a time line of when 
the feature will be added back to CMake? Is it a matter of having somebody to 
work the problem? Is the problem solvable?

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: Craig Scott 
Date: Wednesday, July 18, 2018 at 9:40 AM
To: Michael Jackson 
Cc: CMake 
Subject: Re: [CMake] CMake 3.12 rc2 to rc3 Regression

 

 

 

On Wed, Jul 18, 2018 at 11:04 PM, Michael Jackson  
wrote:

Searching the mailing list archives for the RC3 announcement I scrolled to the 
bottom and found:

Brad King (2):
  Revert "target_link_libraries: Allow use with targets in other
directories"
  CMake 3.12.0-rc3

Just curious what caused the issue to revert the change?

 

 

The original problem report was on the dev mailing list:

 

https://cmake.org/pipermail/cmake-developers/2018-June/030740.html

 

 

The longer history of how the feature evolved and was then reverted can be 
found here:

 

https://gitlab.kitware.com/cmake/cmake/issues/17943

 

 

-- 

Craig Scott

Melbourne, Australia

https://crascit.com

 

New book released: Professional CMake: A Practical Guide

-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] CMake 3.12 rc2 to rc3 Regression

2018-07-18 Thread Michael Jackson
Searching the mailing list archives for the RC3 announcement I scrolled to the 
bottom and found:

Brad King (2):
  Revert "target_link_libraries: Allow use with targets in other
directories"
  CMake 3.12.0-rc3

Just curious what caused the issue to revert the change?

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://www.bluequartz.net>

On 7/18/18, 8:48 AM, "Michael Jackson"  wrote:

There was a regression between 3.12-rc2 and 3.12-rc3 where we can no longer 
add files to a target unless it was built in the directory that is currently 
being cmaked? Hard to explain, I'll let my error message help out:

In CMake 3.12-rc3 and the 3.12 Official Release I get the following:

-- TransformationPhase [ENABLED] 3 Filters
-- Plugin: Defining UCSBUtilities_SOURCE_DIR to 
/Users/mjackson/DREAM3D-Dev/DREAM3D/ExternalProjects/Plugins/UCSBUtilities
CMake Error at 
ExternalProjects/SIMPL/Wrapping/Python/Pybind11/cmake/WrappingFunctions.cmake:144
 (target_link_libraries):
  Attempt to add link library "UCSBUtilitiesServer" to target "dream3d_py"
  which is not built in this directory.
Call Stack (most recent call first):
  ExternalProjects/Plugins/UCSBUtilities/CMakeLists.txt:242 
(CreatePybind11Module)

In CMake 3.12 rc2 and earlier I don't get the error message. I was trying 
to keep up with the RCs but just got back from travel to test the release. We 
were counting on that new feature for a few aspects of our project. Was the 
feature pulled due to bugs?

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://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


[CMake] CMake 3.12 rc2 to rc3 Regression

2018-07-18 Thread Michael Jackson
There was a regression between 3.12-rc2 and 3.12-rc3 where we can no longer add 
files to a target unless it was built in the directory that is currently being 
cmaked? Hard to explain, I'll let my error message help out:

In CMake 3.12-rc3 and the 3.12 Official Release I get the following:

-- TransformationPhase [ENABLED] 3 Filters
-- Plugin: Defining UCSBUtilities_SOURCE_DIR to 
/Users/mjackson/DREAM3D-Dev/DREAM3D/ExternalProjects/Plugins/UCSBUtilities
CMake Error at 
ExternalProjects/SIMPL/Wrapping/Python/Pybind11/cmake/WrappingFunctions.cmake:144
 (target_link_libraries):
  Attempt to add link library "UCSBUtilitiesServer" to target "dream3d_py"
  which is not built in this directory.
Call Stack (most recent call first):
  ExternalProjects/Plugins/UCSBUtilities/CMakeLists.txt:242 
(CreatePybind11Module)

In CMake 3.12 rc2 and earlier I don't get the error message. I was trying to 
keep up with the RCs but just got back from travel to test the release. We were 
counting on that new feature for a few aspects of our project. Was the feature 
pulled due to bugs?

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net <http://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


[CMake] target_sources and multiple subdirs

2018-06-20 Thread Michael Jackson
I have a project where we have a bunch of plugins that are compiled. We are 
currently wrapping with Pybind11 to access those libraries from Python. The 
issue on windows is that we get a multiple DLL load error and our thought was 
to create 1 enormous python module library (Not sure if this is the right idea 
or not….)

 

So my question has to do with how to add files to a target that might initially 
get created about 3 subdirs down from the top level CMakeLists.txt file but 
each time cmake runs through a CMake file that would configure a plugin can we 
just keep adding files to the python module target through the use of 
target_sources() command. Not sure how that works or if that idea would work.

 

Thoughts or pointers would be very much welcome.

 

--

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 in MacPorts environment difficulties

2018-06-13 Thread Michael Jackson
CMake is looking for .app package and my guess is that the package being built 
is a "unix" style installation. If your project depends on just MacPorts you 
should be able to just do "make install" after setting the 
CMAKE_INSTALL_PREFIX=/opt/local. 

--
Mike Jackson

On 6/13/18, 4:17 PM, "CMake on behalf of Randolph Fritz" 
 wrote:

I’ve been trying to add the Radiance lighting simulation package to the 
MacPorts package manager, and I am running into cmake problems.  I can build 
Radiance with cmake from the command line and from the CMake command line app, 
but when I write a MacPorts to build it, it falls down on install.  I include 
the log of errors (the entire log is voluminous.)  Does anyone have any ideas 
of why this is happening?  Any information about what to tell MacPorts or CMake 
to get more information?

Randolph M. Fritz

> :info:destroot -- fixup_bundle
> :info:destroot --   app='/opt/local/bin/rvu'
> :info:destroot --   
libs='/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/destroot/opt/local/bin/plugins/imageformats/libqgif.dylib;/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/destroot/opt/local/bin/plugins/imageformats/libqico.dylib;/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/destroot/opt/local/bin/plugins/imageformats/libqjpeg.dylib;/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/destroot/opt/local/bin/plugins/imageformats/libqtiff.dylib;/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/destroot/opt/local/bin/plugins/platforms/libqcocoa.dylib'
> :info:destroot --   dirs='/opt/local/libexec/qt5/lib;/opt/local/lib'
> :info:destroot --   ignoreItems=''
> :info:destroot -- warning: *NOT* handled - directory/file does not 
exist...
> :info:destroot CMake Error at 
/opt/local/share/cmake-3.11/Modules/BundleUtilities.cmake:966 (message):
> :info:destroot   error: fixup_bundle: not a valid bundle
> :info:destroot Call Stack (most recent call first):
> :info:destroot   InstallRules/dependencies.cmake:14 (fixup_bundle)
> :info:destroot   InstallRules/cmake_install.cmake:36 (include)
> :info:destroot   cmake_install.cmake:47 (include)
> :info:destroot -- fixup_bundle: done
> :info:destroot make: *** [install/fast] Error 1
> :info:destroot make: Leaving directory 
`/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/build'
> :info:destroot Command failed:  cd 
"/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/build"
 && /usr/bin/make -w install/fast 
DESTDIR=/opt/local/var/macports/build/_Users_rfritz_MacPorts_science_radiance/radiance/work/destroot
 
> :info:destroot Exit code: 2

-- 

Powered by www.kitware.com

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

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

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

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

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



-- 

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] Return an Error Code (or something) from a CMake Script.

2018-02-27 Thread Michael Jackson
-Original Message-
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
Date: Monday, February 26, 2018 at 6:02 PM
To: Michael Jackson <mike.jack...@bluequartz.net>
Cc: CMake Mail List <cmake@cmake.org>
Subject: Re: [CMake] Return an Error Code (or something) from a CMake Script.

    On 2018-02-26 14:19-0500 Michael Jackson wrote:

> In our CMake based project I generate a *.cmake file which I call with 
the following bit of code:
>
>  add_custom_target(DREAM3D_MKDOCS_GENERATION ALL
>COMMAND "${CMAKE_COMMAND}" -P "${docsCmakeFile}"
>COMMENT "using mkdocs to generate the documentation"
>  )
>
> Inside the generated file is the following cmake command:
>
>  message(STATUS "Starting mkdocs execution. This can take a while.")
>  execute_process(COMMAND "/path/to/mkdocs" build
>OUTPUT_VARIABLE mkdocs_gen_output
>RESULT_VARIABLE mkdocs_gen_result
>ERROR_VARIABLE mkdocs_gen_error
>WORKING_DIRECTORY 
"/Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/Documentation/mkdocs"
>)
>  message(STATUS "mkdocs_gen_result: ${mkdocs_gen_result}")
>  message(STATUS "mkdocs_gen_error: ${mkdocs_gen_error}")
>  message(STATUS 
"**")
>  message(STATUS "mkdocs_gen_output: ${mkdocs_gen_output}")
>  message(STATUS 
"**")
>
>
> The issue that I am having is that if the mkdocs command fails, the build 
does NOT show the failure. Is there a way to have the "cmake -P" command pick 
up the fact that the cmake script failed so that the build fails or throws a 
warning/error?

Hi Mike:

I think you already have a good specific answer to your question, but
just out of curiosity could this CMake script approach be replaced by
executing "/path/to/mkdocs" as the COMMAND in a custom command where
your DREAM3D_MKDOCS_GENERATION custom target DEPENDS on the OUTPUT of
that custom command?  Or are there reasons not to implement this more
usual custom command/custom target approach in this case?

Alan
__
Alan W. Irwin

Alan,
There was a lot in that .cmake file that I left out. In order for the 
mkdocs to work all of our documentation has to be in the same folder (At least 
it makes it much easier) so during cmake time we generate the file with about 
30~40 directory copy commands in it. We could do all of that in the mail cmake 
files but our project is starting to get overwhelmed with targets which makes 
opening it up on IDE's like Visual Studio and Xcode take a long time and the 
organization within those IDEs is frightful sometimes. So we factored out 
"copy" commands into a single file.

Mike Jackson


-- 

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] Return an Error Code (or something) from a CMake Script.

2018-02-26 Thread Michael Jackson
In our CMake based project I generate a *.cmake file which I call with the 
following bit of code:

  add_custom_target(DREAM3D_MKDOCS_GENERATION ALL
COMMAND "${CMAKE_COMMAND}" -P "${docsCmakeFile}"
COMMENT "using mkdocs to generate the documentation"
  )

Inside the generated file is the following cmake command:

  message(STATUS "Starting mkdocs execution. This can take a while.")
  execute_process(COMMAND "/path/to/mkdocs" build
OUTPUT_VARIABLE mkdocs_gen_output
RESULT_VARIABLE mkdocs_gen_result
ERROR_VARIABLE mkdocs_gen_error
WORKING_DIRECTORY 
"/Users/mjackson/DREAM3D-Dev/DREAM3D-Build/Debug/Documentation/mkdocs"
)
  message(STATUS "mkdocs_gen_result: ${mkdocs_gen_result}")
  message(STATUS "mkdocs_gen_error: ${mkdocs_gen_error}")
  message(STATUS 
"**")
  message(STATUS "mkdocs_gen_output: ${mkdocs_gen_output}")
  message(STATUS 
"**")


The issue that I am having is that if the mkdocs command fails, the build does 
NOT show the failure. Is there a way to have the "cmake -P" command pick up the 
fact that the cmake script failed so that the build fails or throws a 
warning/error?

Thanks
Mike Jackson


-- 

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] How to determine or set the order that targets are built

2017-12-28 Thread Michael Jackson
My current project builds a bunch (30) different plugins that do NOT depend on 
each other. One of those plugins has about 200 files of highly templated C++ 
code to build which takes a while to compile and link. Meanwhile the other 
plugins only have about 20-40 files of "run-of-the-mill" c++ codes which all 
compile in a reasonably fast time. Is there a way to give a hint to CMake or 
the build system (Ninja or Visual Studio) to start the build of that target 
before the others? I know about the set target dependencies which in a way 
would solve the problem but I would hate to use that since there isn't an 
actual dependency and it really wouldn't work anyways. The link time for this 
large plugin is on the order of minutes on a FAST machine (Core i7 8700k 
overclocked).

Are the targets treated in lexographical order perhaps if there are no 
dependencies? I would definintely consider renaming the plugin if that meant it 
would kick off earlier.

Any suggestions would be great.

--
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


[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


[CMake] Configuration under CMake 3.10.1 fails but succeeds with 3.9.6

2017-12-14 Thread Michael Jackson
I just tried out the latest CMake release 3.10.1 and it fails to configure 
(from a clean build directory) our project where CMake 3.9.x and below (down to 
CMake 3.7.x) configures it completely and correctly. The configure error I get 
is"

-- Configuring done
CMake Error in 
/Users/mjackson/Workspace/DREAM3D_Plugins/AskNDEToolbox/Applications/ScanViewer/CMakeLists.txt:
  Cannot find source file:


/Users/mjackson/Workspace/DREAM3D-Build/3.10.1/Plugins/AskNDEToolbox/qrc_AskNDEToolbox.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

Now, the funny thing about this is that nowhere in the CMakeLists files for the 
"ScaneViewer" application should it be adding the generated 
qrc_AskNDEToolbox.cpp file. That file is added higher up in the heirarchy of 
projects, but not that particular application. Does anyone have any thoughts on 
this issue?

--
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] Using CMake include does not seem to work intuatively

2017-12-13 Thread Michael Jackson
The way "include" was explained to me years ago was that it operates in much 
the same way as literally "pasting" all the code from the included file 
directly into the place where the include() command is used. With this in mind 
the "include(Bar.cmake)" from the Foo.cmake file and the associated error make 
sense. If you were to copy-paste the code from Foo.cmake into your 
CMakeLIsts.txt file then it would be looking for a Bar.cmake file in the same 
directory as "CMakeLists.txt". 

 

--

Michael Jackson | Owner, President

  BlueQuartz Software

[e] mike.jack...@bluequartz.net

[w] www.bluequartz.net

 

From: CMake <cmake-boun...@cmake.org> on behalf of Petr Kmoch 
<petr.km...@gmail.com>
Date: Wednesday, December 13, 2017 at 3:03 AM
To: Saad Khattak <saadrus...@gmail.com>
Cc: CMake Mail List <cmake@cmake.org>
Subject: Re: [CMake] Using CMake include does not seem to work intuatively

 

Hi Saad.

I can't comment on whether the behaviour is correct or expectable, but to get 
it working the way you want, you can specify the path fully:

include(${CMAKE_CURRENT_LIST_DIR}/Bar.cmake)

Petr

 

 

On 13 December 2017 at 01:34, Saad Khattak <saadrus...@gmail.com> wrote:

Hi,

 

Let's say I have the following directory structure:

~/Repos/MyRepo/CMakeLists.txt

~/CMakeFiles/Foo.cmake

~/CMakeFiles/Bar.cmake

 

In the CMakeLists.txt I have the following command:

 

include(~/CMakeFiles/Foo.cmake)

 

And in Foo.cmake I have the following command:

 

include(Bar.cmake)

 

Turns out that he `include(Bar.cmake)` from `Foo.cmake` fails. This is counter 
to what I would expect (e.g. how #include works in C).

 

Is this a bug or is this behavior expected? If it's expected, what is the 
workaround? We have a lot of common cmake files which in turn include files 
relative to each other and not the calling CMakeLists.txt.

 

Thank you,

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:
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

-- 

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.10 adding mystery source file to target?

2017-12-06 Thread Michael Jackson
I just tried to configure our project with CMake 3.10 and got some errors. The 
same project configures fine with CMake 3.8.x and 3.9.x as evidenced here 
(http://my.cdash.org/index.php?project=DREAM3D).

I get an error about a Qt5 qrc generated file not being found. 

-- Configuring done
CMake Error in 
/Users/mjackson/Workspace/DREAM3D_Plugins/AskNDEToolbox/Applications/ScanViewer/CMakeLists.txt:
  Cannot find source file:


/Users/mjackson/Workspace/DREAM3D-Build/3.10/Plugins/AskNDEToolbox/qrc_AskNDEToolbox.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx


-- Generating done
-- Build files have been written to: 
/Users/mjackson/Workspace/DREAM3D-Build/3.10


But the issue is that if I actually print out all the source files for the " 
ScanViewer " taget, "qrc_AskNDEToolbox.cpp" NEVER shows up? There is another 
target that uses that file but NOT ScanViewer.

I am also getting some errors on the same project but on Windows (the previous 
was on macOS Sierra) where some of our plugins that get configured all of a 
sudden cannot find some of their files. I have not tried on Linux x64 yet to 
figure out if anything is broken on that side. 

Thanks for any information anyone may have. Thoughts. Ideas. All are welcome.

--
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:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] cmake buried in subdirectory?

2017-10-05 Thread Michael Jackson
You are over thinking it. As someone else stated, check if the build directory 
and the source directory are the same and if they are you FATAL_ERROR with a 
message. Otherwise you can put a single CMakeLists.txt file in the top level to 
kick things off.

Plus, I think it is starting to become fairly understood that using the source 
dir as the build dir is a "bad idea" at this point in software engineering. You 
are just complicating things.

--
Mike Jackson 

-Original Message-
From: CMake  on behalf of Randy Heiland 

Date: Wednesday, October 4, 2017 at 9:23 PM
To: "J. Caleb Wherry" 
Cc: "cmake@cmake.org" 
Subject: Re: [CMake] cmake buried in subdirectory?

Thanks for the reply. In my case, I didn't even want the CMakeLists in the 
top-level dir. I didn't want to contaminate my top-level dir with anything 
related to CMake. This would avoid, for example, an accidental overwrite of an 
existing Makefile if one was to do a 'cmake .' in the the top dir.
It's quite possible I'm over-thinking this; I was just curious if it's even 
possible. Seems like it should be. 

-Randy


On Wed, Oct 4, 2017 at 4:30 PM, J. Caleb Wherry  
wrote:

There is no reason why this shouldn't work, I do something similar where 
everything except my top-level CMakeLists is shoved into a subdirectory (away 
from the src code location).
You don't have to muck with the project macro at all, not sure what you are 
trying to accomplish with that? That just sets the name of the project.

All you have to be aware of is all the paths are now with respect to both 
the CMakeLists and where ever you put your binary dir. So doing something like 
the below allows you to reference things in your source tree (depending on how 
far you away form the root, obviously):

get_filename_component(SourceRoot "${CMAKE_CURRENT_SOURCE_DIR}/../../" 
ABSOLUTE)


The normal structure of the CMake file doesn't change, nothing special has 
to be done with the project macro. Unless you have a more specific error, 
that's about all the advice I have.

-Caleb



On Wed, Oct 4, 2017 at 3:16 PM, Randy Heiland  
wrote:



Hello,
Simple question... can I/how can I keep my top-level cmake-related stuff in 
a subdirectory of my main project directory? E.g.:

/myproj
  /cmake
CMakeLists.txt

and then in the /cmake, I create a /build from which I attempt:  cmake ..
I tried something as simple as this in my CMakeLists.txt, but it didn't 
seem to work:
project (../myproj)


The primary reason I'd like to do this is to hide/make optional the cmake 
build approach (and keep in place an existing/traditional Makefile in the 
parent directory). Play along...

thanks, Randy




--

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






-- 
J. Caleb Wherry
Scientific Software Engineer
 http://www.calebwherry.com
+1 (615) 708-5651 calebwhe...@gmail.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


-- 

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: 

Re: [CMake] cmake install

2017-09-10 Thread Michael Jackson
You should explicitly set the installation location of your package using 
–DCMAKE_INSTALL_PREFIX=/xxx///xxx during the initial invocation of 
cmake.

 

This should be set to a location you KNOW you have normal write access to. Once 
this is set then you will no longer need to use “sudo” to run the commands and 
all _should_ work correctly. This is what we do on our dashboard builds.

 

-- 

Mike Jackson  

 

 

From: CMake  on behalf of Adam Getchell 

Date: Friday, September 8, 2017 at 9:20 PM
To: Craig Scott 
Cc: CMake 
Subject: Re: [CMake] cmake install

 

 

On Sep 8, 2017, at 6:11 PM, Craig Scott  wrote:

 

I tried:

 

# cmake -G Ninja .

# cmake --build .

# cmake --build . --target install

 

This should be correct. Did this not work for you?

 

No.

 

https://travis-ci.org/acgetchell/CDT-plusplus/jobs/273498700

 

Thanks for your help.

 

 

 

If its somewhere in the manual, I’d appreciate pointers.

 

Which part were you looking for? The use of --target is documented as part of 
the Build Tool Mode section, but it seems you've already figured out that part. 
There's nothing technically special about the install target as far as I'm 
aware, you should be able to refer to it as a build target like you've done 
above.

 

 

Craig Scott

Melbourne, Australia

https://crascit.com

 

-- 

Adam Getchell
https://keybase.io/adamgetchell


-- 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

-- 

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] Boost is planning to switch from bjam to CMake!

2017-07-24 Thread Michael Jackson
Let's hope this try actually works. It was tried 8 years ago but some of 
the boost developers really fought the transition. Hopefully with the 
support of the steering committee it will work. Let's all welcome the 
boost devs into the CMake community with wide open arms.

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


Bo Zhou wrote:

Good news !

Hopefully the bcp would also work with CMake so only requires component
would be installed.


--

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] Parallel moc for Qt files

2017-07-07 Thread Michael Jackson
Thank you for the suggestions.

It is almost like a Jom for moc needs to be written.

-Mike Jackson

From: Benjamin Ballet <bbal...@ivsweb.com>
Sent: Friday, July 7, 2017 5:47:20 AM
To: Michael Jackson
Cc: cmake
Subject: Re: [CMake] Parallel moc for Qt files

I don't know how to parallelize moc with CMake though I previously reduce moc 
time (sometimes it's very slow) :

- by replacing as much #include as possible by forward-declaration

- wrapping some #include around #ifndef Q_MOC_RUN ... #endif

2017-07-06 22:00 GMT+02:00 Michael Jackson 
<mike.jack...@bluequartz.net<mailto:mike.jack...@bluequartz.net>>:
I have a large list of files that need to have Qt's 'moc' run on them (107 
headers). I use all the normal CMake facilities for Qt based projects. I 
noticed that the generation of the moc files are done serially. Is there a flag 
or anything that I can use to run the generation in Parallel? I ask because 
each file takes about 3 seconds to run through moc. The code is heavily C++ 
templated which I think causes 'moc' to run more slowly. We have other places 
in the code where 'moc' must run and it does each file in the "blink of an eye".

Just curious.

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jack...@bluequartz.net<mailto:mike.jack...@bluequartz.net>
--

Powered by www.kitware.com<http://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



--
Benjamin Ballet
Ingénieur R

[http://www.activscreen.com/mkg/signature/email_2017/ivs_logo.png]<http://www.activisu.com/>

19 rue Klock - 92110 Clichy - FRANCE
Standard : +33 1 44 69 37 37

www.activisu.com<http://www.activisu.com>

[http://www.activscreen.com/mkg/signature/Signature_IVS_MAI_17.png]<http://www.activisu.com>

[http://www.activscreen.com/mkg/signature/email_2017/linkedin.png]<https://www.linkedin.com/company/ivs>
-- 

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] Parallel moc for Qt files

2017-07-07 Thread Michael Jackson
Looks like an interesting project. After reading  the blog and reading the 
GitHub issue pages there seem to be serious issues with MSVC still which is a 
blocker for us. I will keep an eye on it though.

--
Michael A. Jackson

From: Cristian Adam <cristian.a...@gmail.com>
Sent: Thursday, July 6, 2017 6:11:50 PM
To: Michael Jackson
Cc: cmake
Subject: Re: [CMake] Parallel moc for Qt files

On Thu, Jul 6, 2017 at 10:00 PM, Michael Jackson 
<mike.jack...@bluequartz.net<mailto:mike.jack...@bluequartz.net>> wrote:
I have a large list of files that need to have Qt's 'moc' run on them (107 
headers). I use all the normal CMake facilities for Qt based projects. I 
noticed that the generation of the moc files are done serially. Is there a flag 
or anything that I can use to run the generation in Parallel? I ask because 
each file takes about 3 seconds to run through moc. The code is heavily C++ 
templated which I think causes 'moc' to run more slowly. We have other places 
in the code where 'moc' must run and it does each file in the "blink of an eye".

Just curious.


Have you tried removing moc altogether using 
Verdigris<https://woboq.com/blog/verdigris-qt-without-moc.html>? I'm curious 
how this would speed up your compilation time.

Cheers,
Cristian.
-- 

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] Parallel moc for Qt files

2017-07-06 Thread Michael Jackson
I have a large list of files that need to have Qt's 'moc' run on them 
(107 headers). I use all the normal CMake facilities for Qt based 
projects. I noticed that the generation of the moc files are done 
serially. Is there a flag or anything that I can use to run the 
generation in Parallel? I ask because each file takes about 3 seconds to 
run through moc. The code is heavily C++ templated which I think causes 
'moc' to run more slowly. We have other places in the code where 'moc' 
must run and it does each file in the "blink of an eye".


Just curious.

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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] CMake Server Mode and USE_FOLDERS

2017-07-04 Thread Michael Jackson
Actually, my comments were spurred on from a discussion on the QtCreator 
list. I am *very* happy with the layout inside of VS2015 that we have 
been able to generate based on the USE_FOLDERS property. QtCreator tends 
to use the Ninja generator to generate the actual build system. 
QtCreator just calls "cmake --build . " when it needs to build your 
project. And since they use the "Ninja" generator (which I think is user 
settable) and Ninja does not support the USE_FOLDERS notion, that 
USE_FOLDERS would need to be implemented in the Ninja generator so that 
CMAKE-Server mode would pass that information? I don't know how 
separated the Cmake-server code model is from the actual generator.


--
Mike Jackson


Nagy-Egri Máté Ferenc via CMake wrote:

I can only speak about VS, which currently neither with the VS nor
the Ninja generator use the FOLDERS property to lay out the targets
inside the Solution Explorer. Instead, it maintains the folder
structure of the CMake project. This was an intentional design
decision from their part (at least for the time being), due to CMake
folks primarily being used to the command line, thus they think in
therms of the folder structure, not the logical layout of the CMake
scripts.

There is a tendency though of hooking all CMake notions into the IDE,
 such as CTests show up Test Explorer. Reach out to the VS CMake team
and let them know that there is such need, perhaps controlled through
a switch.

*Feladó: *Michael Jackson <mailto:mike.jack...@bluequartz.net>
*Elküldve: *2017. július 4., kedd 4:08 *Címzett: *Cmake Mailing List
<mailto:cmake@cmake.org> *Tárgy: *[CMake] CMake Server Mode and
USE_FOLDERS

I was just exploring in a command line the CMake Server mode in 3.8
(I

have not tried 3.9 yet) just to see what gets output and I was
wondering

if CMake-Server mode supports "set_property(GLOBAL PROPERTY
USE_FOLDERS

ON)" for any generator? I was specifically using the "ninja"
generator

for my experiments. I suspect not since Ninja itself does not have
the

concept of this but I though I would inquire.

If IDE's that are now relying on CMake-server had this information
it

would allow the IDE to present the project in such a way that the

developers intended or laid out. I know we put a lot of time into
our

CMake files so that the Visual Studio and Xcode projects are
reasonably

organized when you open them instead of just listing 250 targets.

Thanks for any insights.

Mike Jackson

--

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


--

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 Server Mode and USE_FOLDERS

2017-07-03 Thread Michael Jackson
I was just exploring in a command line the CMake Server mode in 3.8 (I 
have not tried 3.9 yet) just to see what gets output and I was wondering 
if CMake-Server mode supports "set_property(GLOBAL PROPERTY USE_FOLDERS 
ON)" for any generator? I was specifically using the "ninja" generator 
for my experiments. I suspect not since Ninja itself does not have the 
concept of this but I though I would inquire.


If IDE's that are now relying on CMake-server had this information it 
would allow the IDE to present the project in such a way that the 
developers intended or laid out. I know we put a lot of time into our 
CMake files so that the Visual Studio and Xcode projects are reasonably 
organized when you open them instead of just listing 250 targets.


Thanks for any insights.

Mike Jackson

--

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] DLL handling under CMake

2017-04-29 Thread Michael Jackson
Our project uses some custom cmake functions to gather the DLLs from 3rd 
party libs (HDF5, TBB, Qt) and create custom targets to copy them to the 
build directory and create install rules to copy them to the package 
when it is created. Yes, they were tedious to write and get correct but 
they seem to work. The Qt version was the easiest after we moved to Qt 5 
since it is straight forward to get the locations. The HDF5 folks 
recently updated their config file to have the same type of information. 
TBB is odd, but relatively easy to guess the correct pattern.


I had a discussion about this topic yesterday and my pain point is that 
a lot of the "Find**" modules really _need_ to also define the DLL 
location instead of just where the link libs are at. From my little 
world on Windows all the .dll files seem to be in a bin directory. So I 
think that for each "Find***" those should define a few additional items:


FOO_IS_SHARED
FOO_BINARY_DIR

assuming of course that the proper FooConfig.cmake is not available.

--
Mike Jackson

PS:: http://www.github.com/bluequartzsoftware/cmp has our custom 
scripts. It is mainly Qt focused but may have some gems in there that 
you find valuable.


Louis-Paul CORDIER wrote:

Hi,

I'm using CMake for a while now for cross-platform project.

In opposition to Linux, Windows does not have a library system
management through a repository system. I would say that 99% of
applications that have common libraries between them does not share the
runtimes. Each time, the .dll files are duplicated for each application.
We have to live with that, and to create proper CMakeLists.txt that can
handle DLL integration.

I think many of CMake users have the following pipeline on Windows:

1. Run CMake (this will execute some find_library to get the correct
.lib files)
2. Compile the application
3. Run the INSTALL target
4. Copy the .dll files into the output binary folder.
5. Package the application with the DLL inside (e.g innosetup)

Currently find_library does not search for runtime, but only for .lib.
So even if a developer is using find_library, he/she has to implement
some additional CMake code to retrieve the path to .dll files and copy
them using the install or the file CMake commands. I added my current
code for handling Qt library in my project at the end of this email. (I
put a huge part of it if someone want to reuse it). You will notice that
this code is handling the case where you are debugging using Visual
Studio, to avoid the missing .DLL issue.

This steps are tedious and I'm wondering if there is a mechanism that
exists or that have to be imagined to make the DLL nightmare end.

All the best

Louis-Paul Cordier


...

#Folder where compiled files for release/debug install will be placed
set(G3_RELEASE_DIR "release")
set(G3_DEBUG_DIR "debug")

find_package(Qt5 ${QT5VC2015_VERSION} EXACT COMPONENTS Core OpenGL
Concurrent REQUIRED)

QT5_WRAP_UI(...)
QT5_WRAP_CPP(...)
target_include_directories(...)
target_compile_definitions(...)

#Add Qt libraries to the linker
target_link_libraries(${PROJECT_NAME}
${Qt5Widgets_LIBRARIES}
${Qt5OpenGL_LIBRARIES}
${Qt5Concurrent_LIBRARIES}
)

if( WIN32 )
SET(QT_DLL
Qt5Core
Qt5Gui
Qt5Widgets
Qt5OpenGL
Qt5Concurrent
)

foreach( _file ${QT_DLL} )
list( APPEND DLL_LIBRARIES "${QT5_DIR}/bin/${_file}.dll" )
list( APPEND DLL_LIBRARIES_D "${QT5_DIR}/bin/${_file}d.dll" )
endforeach( _file ${QT_DLL} )

#TODO: add the platform libraries.

endif( WIN32 )

# I add other DLLs of other project's library by appending to
DLL_LIBRARIES and DLL_LIBRARIES_D

#Handle DLLs under Windows.
if(WIN32)

set(DLL_LIBRARIES_PATH "")
set(DLL_LIBRARIES_D_PATH "")

#Process Release libraries.
foreach( _file ${DLL_LIBRARIES} )

# Convert path to CMake path to avoid escaping issues.
file(TO_CMAKE_PATH ${_file} _file_cmake_path)

#check file existance
if(NOT EXISTS ${_file_cmake_path})
message(FATAL_ERROR "Missing dll file: ${_file_cmake_path}")
endif(NOT EXISTS ${_file_cmake_path})

# Add the DLL to the installation process.
install(FILES ${_file_cmake_path}
DESTINATION ${G3_RELEASE_DIR}
CONFIGURATIONS Release RelWithDebInfo MinSizeRel Release_CMT Release_Net)

# Extract the folder path of the DLL. It allows to add the folder where the
# DLLs are stored to the PATH environment of Visual Studio, in order to
avoid
# copying DLL after each builds.
if(MSVC)
get_filename_component(_dll_folder ${_file} DIRECTORY)
list(APPEND DLL_LIBRARIES_PATH ${_dll_folder})
endif(MSVC)

endforeach( _file ${DLL_LIBRARIES} )

#Process Debug libraries.
foreach( _file ${DLL_LIBRARIES_D} )

# Convert path to CMake path to avoid escaping issues.
file(TO_CMAKE_PATH ${_file} _file_cmake_path)

#check file existance
if(NOT EXISTS ${_file_cmake_path})
message(FATAL_ERROR "Missing dll file: ${_file_cmake_path}")
endif(NOT EXISTS ${_file_cmake_path})

# Add the DLL to the installation process.
install(FILES ${_file_cmake_path}
DESTINATION ${G3_DEBUG_DIR}
CONFIGURATIONS Debug)

# Extract the folder path of 

Re: [CMake] cmake server-mode project order

2017-02-07 Thread Michael Jackson


Tobias Hunger wrote:



On Feb 7, 2017 20:43, "Brad King" <brad.k...@kitware.com
<mailto:brad.k...@kitware.com>> wrote:

On 02/07/2017 02:23 PM, Michael Jackson wrote:
 > Are there any improvements to the cmake -server mode? I am
testing the
 > combination of QtCreator and CMake and there seemed to be an
issue where
 > the list of projects are in Alphabetical order and not in a "top
down"
 > order.

Tobias?


I admit that I did not yet notice that yet:-) I turn the whole thing
into a tree anyway and do not care about the order of the elements.

Server-mode is not doing anything special, it just grabs the project
list from cmGlobalGenerator::GetProjectMap() and dumps it. That is a
map, so now that I think about it, it is sorted by name:-)

Yes, I could re-sort that to be in another order.

Best Regards,
Tobisa


This comes off mainly as a visual issue but also a but of a usability 
issue. Our project is called "DREAM3D" but has a subproject called 
"AMProcessMonitoring". After loading the project in QtCreator 4.3 beta 
using CMake 3.7.1 (on OS X if that matters at all), the top level is 
listed as "AMProcessMonitoring". Everything generally compiles fine from 
there. If I close the project and go to QtCreators Welcome page I don't 
see "DREAM3D" anymore but I see "AMProcessMonitoring" instead. Clicking 
on the "AMProcessingMonitoring" link correctly opens the project. It is 
just odd to see it that way.


So if you could somehow mark the top level project when you get the list 
from CMake and percolate that to the QtCreator UI it would be really 
great. So far the combination of QtCreator 4.3 and CMake 3.7.1 has 
really great potential. There are still some rough spots but I generally 
am really happy with this combination now.

--
Michael A. Jackson 400 S. Pioneer Blvd
Owner, President   Springboro, Ohio 45066
BlueQuartz Software, LLC   EMail: mike.jack...@bluequartz.net
Voice: 937-790-1601Web: http://www.bluequartz.net
Fax: 937-746-0783
--

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] [ANNOUNCE] CMake 3.8.0-rc1 now ready for testing!

2017-02-07 Thread Michael Jackson
Are there any improvements to the cmake -server mode? I am testing the 
combination of QtCreator and CMake and there seemed to be an issue where 
the list of projects are in Alphabetical order and not in a "top down" 
order.

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jack...@bluequartz.net


Robert Maynard wrote:

I am proud to announce the first CMake 3.8 release candidate.
   https://cmake.org/download/

Documentation is available at:
   https://cmake.org/cmake/help/v3.8

Release notes appear below and are also published at
   https://cmake.org/cmake/help/v3.8/release/3.8.html

Some of the more significant changes in CMake 3.8 are:

* CMake now supports "CSharp" (C#) as a first-class language. It is
   currently supported by the Visual Studio Generators for VS 2010
   and above.

* CMake now supports "CUDA" as a first-class language. It is
   currently supported by the Makefile Generators and the
   "Ninja" generator on Linux, macOS, and Windows. Support for the
   Visual Studio IDE is under development but not included in this
   release.

* The "Compile Features" functionality now offers meta-features that
   request compiler modes for specific language standard levels (e.g.
   "cxx_std_11").  See "CMAKE_C_KNOWN_FEATURES" and
   "CMAKE_CXX_KNOWN_FEATURES".

* The "Compile Features" functionality is now aware of C++ 17.  No
   specific features are yet enumerated besides the "cxx_std_17" meta-
   feature.

* The Visual Studio Generators for VS 2013 and above learned to
   support a "host=x64" option in the "CMAKE_GENERATOR_TOOLSET" value
   (e.g.  via the "cmake(1)" "-T" option) to request use of a VS 64-bit
   toolchain on 64-bit hosts.

* The Visual Studio Generators learned to treat files passed to
   "target_link_libraries()" whose names end in ".targets" as MSBuild
   "targets" files to be imported into generated project files.

* The "try_compile()" command source file signature gained new
   options to specify the language standard to use in the generated
   test project.

* The "try_compile()" command source file signature now honors
   language standard variables like "CMAKE_CXX_STANDARD". See policy
   "CMP0067".

* A "BUILD_RPATH" target property and corresponding
   "CMAKE_BUILD_RPATH" variable were added to support custom "RPATH"
   locations to be added to binaries in the build tree.

* The "COMPILE_FLAGS" source file property learned to support
   "generator expressions".

* A new generator expression "$" was
   added. It resolves to the true-value if the condition is "1" and
   resolves to the false-value if the condition is "0".

* The "Compile Features" functionality is now aware of features
   supported by Intel C++ compilers versions 12.1 through 17.0 on UNIX
   and Windows platforms.

* The Visual Studio Generators for VS 2010 and above now place per-
   source file flags after target-wide flags when they are classified
   as raw flags with no project file setting ("AdditionalOptions").
   This behavior is more consistent with the ordering of flags produced
   by other generators, and allows flags on more-specific properties
   (per-source) to override those on more general ones (per-target).

* The precompiled Windows binary MSI package provided on "cmake.org"
   now records the installation directory in the Windows Registry under
   the key "HKLM\Software\Kitware\CMake" with a value named
   "InstallDir".

CMake 3.8 Release Notes
***

Changes made since CMake 3.7 include the following.


New Features



Languages
-


C#
~~

* CMake learned to support "CSharp" (C#) as a first-class language
   that can be enabled via the "project()" and "enable_language()"
   commands.  It is currently supported by the Visual Studio Generators
   for VS 2010 and above.

   C# assemblies and programs can be added just like common C++ targets
   using the "add_library()" and "add_executable()" commands.
   References between C# targets in the same source tree may be
   specified by "target_link_libraries()" like for C++.  References to
   system or 3rd-party assemblies may be specified by the target
   properties "VS_DOTNET_REFERENCE_" and
   "VS_DOTNET_REFERENCES".

* More fine tuning of C# targets may be done using target and source
   file properties.  Specifically the target properties related to
   Visual Studio ("VS_*") are worth a look (for setting toolset
   versions, root namespaces, assembly icons, ...).

* Auto-linking in ".csproj" files: In C#/.NET development with
   Visual Studio there are a number of visual editors used which
   generate code.  Both the generated files and the ones edited with
   the UI are connected in the ".csproj" file using ""
   tags.  If CMake finds within a C# project any source file with
   extension ".Designer.cs" or ".xaml.cs", it checks sibling files with
   extension ".xaml", ".settings", ".resx" or ".cs" and establishes the
   dependency connection.


CUDA


* CMake 

Re: [CMake] Full absolute path as RPATH in build tree

2016-12-05 Thread Michael Jackson

I have this:

if(APPLE AND BUILD_SHARED_LIBS)
  set_target_properties(EMsoftLib PROPERTIES MACOSX_RPATH FALSE)
  set_target_properties(EMsoftLib PROPERTIES INSTALL_NAME_DIR 
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")

endif()

--
Michael A. Jackson 400 S. Pioneer Blvd
Owner, President   Springboro, Ohio 45066
BlueQuartz Software, LLC   EMail: mike.jack...@bluequartz.net
Voice: 937-790-1601Web: http://www.bluequartz.net
Fax: 937-746-0783


clin...@elemtech.com wrote:

Do you want the library identification to be a full path?
set_target_properties(foo PROPERTIES MACOSX_RPATH OFF)

Clint

- On Dec 5, 2016, at 7:38 PM, Michael Jackson mike.jack...@bluequartz.net 
wrote:


what combinations of RPATH variables do I need to set to get a full,
absolute path to a build library in my build tree? THis is on macOS
10.10.5 and cmake 3.5 and above. I have tried all sorts of combinations
and I either get just the library name or @rpath/library.dylib neither
of which is going to work for my needs.

Thanks

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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

--

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] Full absolute path as RPATH in build tree

2016-12-05 Thread Michael Jackson
what combinations of RPATH variables do I need to set to get a full, 
absolute path to a build library in my build tree? THis is on macOS 
10.10.5 and cmake 3.5 and above. I have tried all sorts of combinations 
and I either get just the library name or @rpath/library.dylib neither 
of which is going to work for my needs.


Thanks

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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


[CMake] BundleUtilities with Command line program on macOS

2016-12-05 Thread Michael Jackson
I am using the BundleUtilites on macOS to create a redistributable 
package that consists of a large number of command line programs, 
libraries and other assorted support files. The issue that I am having 
is that each time BundleUtilities runs on a given executable, it will 
also attempt to "fix up" all the other executables in the installation 
directory. The result is that the packaging takes long and longer as it 
goes along, i.e., the first BundleUtility goes fast, but the second goes 
a bit slower because it attempts to fixup and verify the first AND the 
second. The third one does the first, second and third and so on and so on.


Short of some sort of workaround that looks for a lock file or 
completion file or something to stop BundleUtilities from running a 
bunch of times is there a "better way"?


Thanks

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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] 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
<mike.jack...@bluequartz.net <mailto: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
<mailto:mike.jack...@bluequartz.net>]
--

Powered by www.kitware.com <http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
<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
<http://cmake.org/cmake/help/support.html>
CMake Consulting: http://cmake.org/cmake/help/consulting.html
<http://cmake.org/cmake/help/consulting.html>
CMake Training Courses: http://cmake.org/cmake/help/training.html
<http://cmake.org/cmake/help/training.html>

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
<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


[CMake] List all "include_directories" for a given project or target

2016-11-21 Thread Michael Jackson
Is there a command or variable or a code snippet from someone that 
essentially has a list of all the "include_directories" that have been 
used/created in a given project? Or can I get a list of all the 
targets(created and imported) and then get the list of 
"include_directories" from those targets?


I am messing about with the "VSCode.app" on OS X and their code 
completion extension. For this to work one needs to get a list of all 
the include directories possible so that clang knows where to look for 
the headers.


Wasn't there a cmake command that would dump all the compile commands to 
a file or something?


Thanks

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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] Issue with Fortran/C binding with Intel compilers

2016-11-17 Thread Michael Jackson
Just to add my 2 cents to this. This past year a collaborator of mine 
updated his F95 code to F2003 and the ISO_C_BINDING syntax and this made 
the interaction between our C/C++ codes and their Fortran codes 
extremely easy. No more macros to try to figure out. It oddly, just 
seems to work. Well worth our time investment.

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


Joachim Pouderoux wrote:

Alan,

Thanks for the advice, I think you are absolutely right, we should update
to Fortran2003 to allow use of iso_c_binding module.
Anyway I have actually been able to make CMake FortranCInterface work using
a more recent version of CMake.

Best,
Joachim


*Joachim Pouderoux*, PhD

/Technical Expert - Scientific Computing Team/
*Kitware SAS *


2016-11-17 15:21 GMT-04:00 Alan W. Irwin >:

On 2016-11-17 11:12-0400 Joachim Pouderoux wrote:

Unfortunately I can't (Fortran95 only), that's why CMake feature is
important.


Hi Joachim:

I have helped convert two projects (PLplot and the ephcom subproject
of timeephem) recently to use the iso_c_binding module provided by
Fortran 2003, and that approach (at least for providing a Fortran
binding to a C library since we have had no need for a C binding to a
Fortran library) is absolutely great and works fine with fairly recent
versions of the Intel compiler, the gfortran compiler, and likely most
importantly from our point of view, the NAG compiler (which advertises
itself as being the Fortran compiler that is most demanding concerning
compliance with Fortran standards).

So my advice is to go ahead and at least experimentally provide the
option of using the iso_c_binding module to future-proof your work,
and once that new interfacing works I would push (assuming Fortran95
only is a committee decision) to make an exception for at least the
iso_c_binding module so you don't have to maintain some home-brew
C/fortran interface forever.

 From my recent very positive experience with the iso_c_binding module,
the only reason not to go with that module for C/Fortran interfacing
needs is if if it doesn't work for those needs (which is not my
experience for a Fortran binding to a C API in the PLplot case with a
large variety of types of C calls including callbacks) or if there is
a Fortran compiler out there that does not support it.  I haven't
found such a compiler yet, but my search has only involved the 3
compilers referred to above so obviously has not been exhaustive. Is
there some Fortran compiler you are aware of (aside from really old
versions of any of them) that does not provide a working iso_c_binding
module?  And if such a beast exists that does not even support this
important part of Fortran 2003, do you want to cater to this beast
indefinitely?  After all, 2003 is quite a few years ago so if a compiler
doesn't support that, it is almost by definition unsupported.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and
Astronomy,
University of Victoria (astrowww.phys.uvic.ca
).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net
); the Time
Ephemerides project (timeephem.sf.net );
PLplot scientific plotting
software package (plplot.sf.net ); the libLASi
project
(unifont.org/lasi ); the Loads of Linux
Links project (loll.sf.net );
and the Linux Brochure Project (lbproject.sf.net
).
__

Linux-powered Science
__



--

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] Force MSVC runtime for debug builds

2016-11-08 Thread Michael Jackson
I would agree. I don't know how many subtle runtime bugs I have had to 
figure out because our project mixed debug and release runtimes on MSVC. 
DON'T do it unless you REALLY have to. But even then I would never 
actually deploy that into production.


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


clin...@elemtech.com wrote:



- On Nov 7, 2016, at 1:37 AM, Stephan Menzel
 wrote:

Hello everyone,
I'm looking for a way to force Debug configurations in generated
MSVC solutions to use the Release runtime instead of the default
"Debug". e.g. /MD rather than /MDd.

My use case is an ever recurring problem of creating libraries that
are linked in plug-in fashion against Release only applications. I
want for my Debug configuration to have debug info and no
optimization but still use the release runtime so I can link them.

I tried replacing /MDd with /MD in CMAKE_CXX_FLAGS_DEBUG. This
yielded objects built with /MD alright but failed to link into an
executable with stuff like that:

error LNK2038: mismatch detected for 'RuntimeLibrary': value
'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Test.obj

 From what I gather all the obj are actually compiled for Release
runtime without optimization and Debug info just like I need it. But
then the main obj is built and linked in Debug mode, causing the
executable to not be created.

Is there a way to solve this? Like a generic CMake executable flag
or something that I can use to force the other runtime?

Please note that using RelWithDebInfo and turning off optimization
is not exactly what I need as I still want that mode much the way it is.

If you are going to use /MD instead of /MDd, then you probably also need
to remove the _DEBUG preprocessor flag.
IIRC, I've seen cases where defining _DEBUG includes symbols only
defined by the debug runtimes.

Clint


--

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] Adding Cmake version in online documentation

2016-11-08 Thread Michael Jackson

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


Louis-Paul CORDIER wrote:

Hi,

This is a feature proposal for the documentation. Cmake is making use of
cmake_minimum_required() command, that is very useful. Unfortunately it
is very hard to identify commands that will work without browsing all
version of cmake documentation for a given command.

That said, adding a "since version" number for a feature/command would
be great, like cplusplus.com does (example here:
http://www.cplusplus.com/reference/unordered_map/unordered_map/?kw=unordered_map)

For instance, the command

list(FILTER ...)

has been introduced in Cmake 3.6. Why not adding

list(FILTER ...) (since 3.6)

?
--

*Best Regards/
Louis-Paul CORDIER
*


--

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] Visual Studio and Intel Fortran with Mixed C/F90 files not working

2016-11-01 Thread Michael Jackson
I have a project that I am configuring with Visual Studio 12 2013 Win64 and
Intel Fortran v16/v17. I have executables where there is both a .cpp file
and a .f90 file.

The .f90 file is not compiled when I compile the solution. If I use NMake
Makefiles everything compiles, links and executes just fine.

Has any seen anything like this? CMake 3.5.1 on Windows 10 environment.

Thanks
_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio
-- 

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] Windows Visual Studio 13 with Ninja & CMake

2016-09-22 Thread Michael Jackson
Yes. It works from there. BUT I run a custom command prompt through a
variation of the standard "vcvarsall.bat" file where I add in my own
environment variables but essentially it is the standard Visual Studio
Command Prompt.

Thanks
Mike Jackson

_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio

On Thu, Sep 22, 2016 at 2:22 PM, David Cole <dlrd...@aol.com> wrote:

> Does it work if you launch cmake-gui from the command prompt that
> works for your "from the command line" scenario?
>
> On Thu, Sep 22, 2016 at 1:58 PM, Michael Jackson
> <mike.jack...@bluequartz.net> wrote:
> > My combination is Windows 10 (Anniversary Update), Visual Studio 12 2013
> > Update 5, Ninja and CMake 3.5/3.6.
> >
> > I launch CMake-GUI.exe, select my Source and binary directories and then
> > "Configure", select "Ninja" as the generator and then I instantly get the
> > error that CMake can not find the C/C++ compilers. I do not recall ever
> > having this issue. I just recently updated Windows 10 to the latest so I
> am
> > not sure if that caused something to go wrong? I use the "Zipped"
> version of
> > CMake if that makes a difference. I did have to install the "Windows 8.1
> > SDK" in order for QtCreator to work correctly.
> >
> > I can successfully do the following:
> > * Configure and generate from the command line for Ninja
> > * Use the CMake-Gui to generate a VS 12 2013 solution file without any
> > issues.
> > * QtCreator 4.1 can use ninja to properly generate its own projects with
> a
> > correctly detected compiler.
> >
> > Thoughts?
> > --
> > Michael A. Jackson
> > BlueQuartz Software
> > --
> >
> > 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
>
-- 

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] Windows Visual Studio 13 with Ninja & CMake

2016-09-22 Thread Michael Jackson
My combination is Windows 10 (Anniversary Update), Visual Studio 12 2013 
Update 5, Ninja and CMake 3.5/3.6.


I launch CMake-GUI.exe, select my Source and binary directories and then 
"Configure", select "Ninja" as the generator and then I instantly get 
the error that CMake can not find the C/C++ compilers. I do not recall 
ever having this issue. I just recently updated Windows 10 to the latest 
so I am not sure if that caused something to go wrong? I use the 
"Zipped" version of CMake if that makes a difference. I did have to 
install the "Windows 8.1 SDK" in order for QtCreator to work correctly.


I can successfully do the following:
* Configure and generate from the command line for Ninja
* Use the CMake-Gui to generate a VS 12 2013 solution file without any 
issues.
* QtCreator 4.1 can use ninja to properly generate its own projects with 
a correctly detected compiler.


Thoughts?
--
Michael A. Jackson
BlueQuartz Software
--

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] ExternalProject_Add not honoring the INSTALL_DIR argument.

2016-08-29 Thread Michael Jackson
So that was a typo on my part but changing it had no effect after 
deleting every build/download/tmp/stamp directory and trying again.


--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jack...@bluequartz.net


Nicholas Braden wrote:

Have you tried changing the = to a space, as with the other parameters?

On Mon, Aug 29, 2016 at 10:52 AM, Michael Jackson
<mike.jack...@bluequartz.net>  wrote:

I have the following CMake file:

set(QHull_GIT_REPO "git://github.com/qhull/qhull")
set(QHull_GIT_TAG "")
set(QHull_INSTALL_NAME "qhull")
set(QHull_INSTALL_NAME "qhull-2015.2")


ExternalProject_Add(${QHull_INSTALL_NAME}
   PREFIX ${Fusion_SDK_ROOT}
   URL "http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz;
   INSTALL_DIR=/tmp/Fusion/qhull-2015.2
 LOG_DOWNLOAD 1
 LOG_UPDATE 1
 LOG_CONFIGURE 1
 LOG_BUILD 1
 LOG_INSTALL 1

)

  and when I invoke the initial cmake with this:

  cmake -G Ninja -DBUILD_SHARED_LIBS=ON  -DCMAKE_BUILD_TYPE=Release
-DFusion_SDK_ROOT=/tmp/Fusion_SDK ../

I get a valid "configure" step. Then I run "ninja" and I get errors on
installation. The errors are because CMake is attempting to install QHull in
/usr/local/lib.

Why is that? I am not sure what I am doing wrong as this seems like a pretty
trivial case. I have cmake 3.5.1 and read the docs at
https://cmake.org/cmake/help/v3.5/module/ExternalProject.html but somehow
cmake is messing up.

Thoughts?


--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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

--

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] ExternalProject_Add not honoring the INSTALL_DIR argument.

2016-08-29 Thread Michael Jackson

I have the following CMake file:

set(QHull_GIT_REPO "git://github.com/qhull/qhull")
set(QHull_GIT_TAG "")
set(QHull_INSTALL_NAME "qhull")
set(QHull_INSTALL_NAME "qhull-2015.2")


ExternalProject_Add(${QHull_INSTALL_NAME}
  PREFIX ${Fusion_SDK_ROOT}
  URL "http://www.qhull.org/download/qhull-2015-src-7.2.0.tgz;
  INSTALL_DIR=/tmp/Fusion/qhull-2015.2
LOG_DOWNLOAD 1
LOG_UPDATE 1
LOG_CONFIGURE 1
LOG_BUILD 1
LOG_INSTALL 1

)

 and when I invoke the initial cmake with this:

 cmake -G Ninja -DBUILD_SHARED_LIBS=ON  -DCMAKE_BUILD_TYPE=Release 
-DFusion_SDK_ROOT=/tmp/Fusion_SDK ../


I get a valid "configure" step. Then I run "ninja" and I get errors on 
installation. The errors are because CMake is attempting to install 
QHull in /usr/local/lib.


Why is that? I am not sure what I am doing wrong as this seems like a 
pretty trivial case. I have cmake 3.5.1 and read the docs at 
https://cmake.org/cmake/help/v3.5/module/ExternalProject.html but 
somehow cmake is messing up.


Thoughts?


--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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


[CMake] Example of using Visual Studio for Nightly Dashboard

2016-08-17 Thread Michael Jackson
Can anyone point my to a project, including scripts etc, that shows how 
to use Visual Studio as the build mechanism for a Visual Fortran project?


My Problem is the following: I am generating a Visual Studio with Intel 
Fortran compiler (v16.x) from CMake but when I load the resulting sln 
file into Visual Studio and compile the only thing that gets compiled 
are a few *.c files in the project and NOT the 100 actual *.f90 files. 
If I use NMake from the command line then I can actually invoke "nmake" 
and have my project properly compile. I am not sure what is going on or 
where the issue is.


I also tried to use NMake from the command line but I am have no idea 
which environment and/or cmake variables I need to set in order for my 
batch file and .cmake file combination to actually get the Intel Fortran 
compiler set properly. I tried using "call ... " with the proper path to 
the Intel Fortran .bat file that lays out all the variables but it seems 
to just prematurely exit the command prompt and nothing gets configured 
or compiled. I can successfully configure a .sln file for my project 
during a "nightly" build but then the .sln does not actually compile any 
of the fortran source files.


If anyone has any insight into these issues I would greatly appreciate 
the help.


Thanks
--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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


[CMake] Qt 5.6.1 messes up Linux packaging using CPack?

2016-06-24 Thread Michael Jackson
I have a project that uses CMake. I had been compiling against Qt 5.6.0 for
a while but due to issues with QWebEngine I installed Qt 5.6.1 instead and
compiled against that. I can run my application from the build directory
but when I go to use cpack to package my application I am getting the
following errors for every single one of my libraries that I build:

CMake Error at SimpleITKExplicit/cmake_install.cmake:36 (file):
  file INSTALL cannot find

"/home/mjackson/Workspace/DREAM3D-build/Release/SimpleITKExplicit/CMakeFiles/CMakeRelink.dir/libSimpleITKExplicit-0.9.so.1".
Call Stack (most recent call first):
  cmake_install.cmake:435 (include)


I recompiled in a completely separate directory against my Qt 5.6.0
installation and cpack will execute without any errors.

Has anyone else seen this yet?

Thanks
_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio
-- 

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] Time Profile our CMake codes

2016-05-12 Thread Michael Jackson
We do the File IO because we need to store lists of various directories 
for other subprojects and packaging schemes to use. When we first 
developed the CMake codes the "set_property" function was not really 
well developed. I am wondering if using global property lists are a 
better way to go for this.


example:
 get_property(DREAM3DDocRoot GLOBAL PROPERTY DREAM3DDocRoot)

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

Nicholas Braden <mailto:nicholas11bra...@gmail.com>
May 12, 2016 at 2:06 PM
I can't answer your question directly, but IIRC opening files on
Windows is many times more expensive than on other platforms - it
could be the temp file I/O you are doing.

On Thu, May 12, 2016 at 11:09 AM, Michael Jackson
Michael Jackson <mailto:mike.jack...@bluequartz.net>
May 12, 2016 at 12:09 PM
Is there a way to "time profile" our cmake codes? We have noticed 
lately that running cmake on our project lately has taken a large 
uptick in time and we are trying to figure out where the newly added 
time is coming from. We do a lot of I/O writing temp files, comparing 
temp files to files that get replaced. We also have a fair number of 
external libraries that we look for (Boost, Eigen, ITK, VTK, Qt, Qwt, 
HDF5). If anyone has any ideas we would greatly appreciate it. 
Although the cmake time on OS X and Linux is not so bad, Windows is 
getting unbearably slow (even with Ninja/makefiles).


Thanks



-- 

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] Time Profile our CMake codes

2016-05-12 Thread Michael Jackson
Is there a way to "time profile" our cmake codes? We have noticed lately 
that running cmake on our project lately has taken a large uptick in 
time and we are trying to figure out where the newly added time is 
coming from. We do a lot of I/O writing temp files, comparing temp files 
to files that get replaced. We also have a fair number of external 
libraries that we look for (Boost, Eigen, ITK, VTK, Qt, Qwt, HDF5). If 
anyone has any ideas we would greatly appreciate it. Although the cmake 
time on OS X and Linux is not so bad, Windows is getting unbearably slow 
(even with Ninja/makefiles).


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] Install with full absolute path on OS X

2016-04-27 Thread Michael Jackson

Thanks. That was the solution.

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

clin...@elemtech.com <mailto:clin...@elemtech.com>
April 26, 2016 at 2:57 PM

To set the install name to an absolute path, it would probably be 
something like
set_property(TARGET EMsoft PROPERTY INSTALL_NAME_DIR 
${CMAKE_INSTALL_PREFIX}/lib)


Clint

- On Apr 26, 2016, at 12:24 PM, Michael Jackson 
<mike.jack...@bluequartz.net> wrote:

Michael Jackson <mailto:mike.jack...@bluequartz.net>
April 26, 2016 at 2:24 PM
I am building a library and installing onto the local system. After 
installation otool reports that the path is "@rpath/lib/libEMsoft.dylib"


How can I have the installed path be the full absolute path to the 
library. For this use case @rpath is not going to work.


I have tried https://cmake.org/Wiki/CMake_RPATH_handling and 
variations of that information but none of it seems to work.


THanks


-- 

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] Install with full absolute path on OS X

2016-04-26 Thread Michael Jackson
I am building a library and installing onto the local system. After 
installation otool reports that the path is "@rpath/lib/libEMsoft.dylib"


How can I have the installed path be the full absolute path to the 
library. For this use case @rpath is not going to work.


I have tried https://cmake.org/Wiki/CMake_RPATH_handling and variations 
of that information but none of it seems to work.


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] [cmake-developers] Drop support for older Xcode versions?

2016-02-07 Thread Michael Jackson
What is the oldest version of OS X that CMake actually runs on? I guess 
I would support the last version of Xcode that actually ran on that 
platform. In reality this is probably 10.6.8? But At the next major 
update of CMake (3.5 or 3.6) I would actually draw a line in the sand 
and pump that up to OS X 10.9, 10.8 at the absolute minimum. I think 
that is Xcode 6?


Just my thoughts.

Mike Jackson


Eric Wing 
February 6, 2016 at 6:46 PMvia Postbox 



I personally am not using them. My more serious problem is that the
Xcode projects being generated now are not keeping up with modern
Xcode and the features that need to be accessible/set. The reality of
Apple development is you must be on the latest stable Xcode if you
need to ship apps on the Mac or iOS Store, otherwise Apple can reject
your app. Their design philosophy, regardless if you agree with it or
not, is to build with the latest and build against backwards
compatibility deployment targets, not build with the oldest and pray
it will work with future changes that couldn't be predicted at the
time. Their platform, their rules.

So I'm all in favor of dropping legacy platforms if it means
ultimately helping make the Xcode generator work better for modern
Xcode. General rule of thumb for Apple development is support the
latest and -1 version. If you can do more, fine, but don't compromise
the recent stuff in order to achieve distant backwards compatibility.

-Eric
Gregor Jasny via CMake 
February 6, 2016 at 5:49 AMvia Postbox 


Hello,

I'd like to get your feedback on deprecating or dropping support for
older Xcode versions. During changes on the Xcode generator it gets
harder and harder to test against old and very old Xcode versions like 3
and 4.

Are there still users around for these versions of Xcode?

PS: I'm talking here about the Xcode generator which creates Xcode
projects, not the Makefile or Ninja generator.

Thanks,
Gregor


--
Michael A. Jackson 400 S. Pioneer Blvd
Owner, President   Springboro, Ohio 45066
BlueQuartz Software, LLC   EMail: mike.jack...@bluequartz.net
Voice: 937-806-1165Web: http://www.bluequartz.net
Fax: 
937-746-0783
-- 

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] FORTRAN name mangling

2016-01-11 Thread Michael Jackson
I am trying to integrate a FORTRAN library into our C++ project. I have
used the following in our CMakeLists.txt file:

include(CMakeAddFortranSubdirectory)

cmake_add_fortran_subdirectory(src
  NO_EXTERNAL_INSTALL
  PROJECT EMSoftLib  # project name in toplevel CMakeLists.txt in lapack
  LIBRARIES EMSoftLib # target libraries created
  LINK_LIBRARIES blas lapack # link interface libraries
  LINK_LIBS EMSoftLib blas lapack
)

include(FortranCInterface)
FortranCInterface_HEADER(EMsoftLib_Mangling.h MACRO_NAMESPACE "EMSOFTLIB_")

So far so good.

In the FORTRAN code we have the following declaration for a subroutine we
want to use from the "C" side of things:

subroutine SingleEBSDPattern(ipar, fpar, EBSDpattern, quats, accum_e,
mLPNH, mLPSH) bind(c, name='SingleEBSDPattern')

In order to access that function we created the following header file:


#include "EMsoftLib_Mangling.h"
#ifdef __cplusplus
extern "C" {
#endif
void EMSOFTLIB_GLOBAL(SingleEBSDPattern, SINGLEEBSDPATTERN)
(size_t* ipar, float* fpar, float* EBSDpattern,
float* quats, float* accum_e, float* mLPNH, float* mLPSH);
#ifdef __cplusplus
}
#endif

and we call the function from our C code like the following:


SingleEBSDPattern_(ipar, fpar, ebsdPattern, quats, accum_e, mLPNH, mLPSH);

When we compile we get the following linker error:

MintDevVM:Build mdg$ make
[ 40%] Built target EMSoftLib
Scanning dependencies of target SingleEBSDPattern
[ 41%] Building CXX object
src/CMakeFiles/SingleEBSDPattern.dir/SingleEBSDPattern.cpp.o
[ 42%] Linking CXX executable ../Bin/SingleEBSDPattern
Undefined symbols for architecture x86_64:
  "_SingleEBSDPattern_", referenced from:
  _main in SingleEBSDPattern.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [Bin/SingleEBSDPattern] Error 1
make[1]: *** [src/CMakeFiles/SingleEBSDPattern.dir/all] Error 2
make: *** [all] Error 2

We can not seem to find any good examples of trying this sort of C->FORTRAN
interfacing with CMake besides http://www.kitware.com/blog/home/post/231

We are using gfortran 5.3 on OS X 10.10.5 with Xcode 7.2 tools.

Any insights would be most appreciated.

__
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio
-- 

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] FORTRAN name mangling

2016-01-11 Thread Michael Jackson
Actually, 
  If we just use the following:

SingleEBSDPattern(ipar, fpar, ebsdPattern, quats, accum_e, mLPNH, mLPSH);

and the same declaration in a .h file then we can link and execute just fine. 
My question now would be:

Do other FORTRAN compilers support this “bind(C)” thing, such as Intel Fortran? 
If so then I can really NOT worry about figuring out the mangling that is 
needed and just declare the functions in a C style header like normal. No 
macros needed.
--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jack...@bluequartz.net

> On Jan 11, 2016, at 1:13 PM, Bill Somerville <b...@classdesign.com> wrote:
> 
> On 11/01/2016 17:58, Michael Jackson wrote:
>> and we call the function from our C code like the following:
>> 
>> 
>> SingleEBSDPattern_(ipar, fpar, ebsdPattern, quats, accum_e, mLPNH, mLPSH);
>> 
> You need to use the macros here too.
> 
> Regards
> Bill Somerville.
> -- 
> 
> 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

-- 

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] FORTRAN name mangling

2016-01-11 Thread Michael Jackson
So if I require Fortran 2003 for our fortran codes then this whole “fortran 
name-mangling” thing becomes a moot point, i.e. I do not have to actually worry 
about it at all for our project. Just have to keep the C header consistent with 
the FORTRAN functions, but that part is on our devs.

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jack...@bluequartz.net

> On Jan 11, 2016, at 2:06 PM, Thompson, KT <k...@lanl.gov> wrote:
> 
> "bind(c)" is a part of the Fortran 2003 standard.  Any compiler that claims 
> to support this standard should work for you.
> 
> I use Intel Fortran on Linux (v13-16) with bind(c) w/o issue.  FWIW - I also 
> use the Portland Group (12+) and IBM Fortran (v14) compilers this way.
> 
> -kt
> 
> -Original Message-
> From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Michael Jackson
> Sent: Monday, January 11, 2016 11:48 AM
> To: Bill Somerville <b...@classdesign.com>
> Cc: cmake@cmake.org
> Subject: Re: [CMake] FORTRAN name mangling
> 
> Actually, 
>  If we just use the following:
> 
> SingleEBSDPattern(ipar, fpar, ebsdPattern, quats, accum_e, mLPNH, mLPSH);
> 
> and the same declaration in a .h file then we can link and execute just fine. 
> My question now would be:
> 
> Do other FORTRAN compilers support this “bind(C)” thing, such as Intel 
> Fortran? If so then I can really NOT worry about figuring out the mangling 
> that is needed and just declare the functions in a C style header like 
> normal. No macros needed.
> --
> Michael A. Jackson
> BlueQuartz Software, LLC
> [e]: mike.jack...@bluequartz.net
> 
>> On Jan 11, 2016, at 1:13 PM, Bill Somerville <b...@classdesign.com> wrote:
>> 
>> On 11/01/2016 17:58, Michael Jackson wrote:
>>> and we call the function from our C code like the following:
>>> 
>>> 
>>> SingleEBSDPattern_(ipar, fpar, ebsdPattern, quats, accum_e, mLPNH, mLPSH);
>>> 
>> You need to use the macros here too.
>> 
>> Regards
>> Bill Somerville.
>> -- 
>> 

-- 

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 "Fixup_Bundle" on a single library?

2016-01-04 Thread Michael Jackson
During our packaging process one of our support libraries is getting missed for 
various reasons (severe edge case). Is it possible to use the “Fixup_bundle” 
CMake function with a single library? Or add that single library as an 
additional library that needs to be adjusted?

Thanks
--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: 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] still having rpath problems on osx

2015-12-27 Thread Michael Jackson


> On Dec 24, 2015, at 2:24 AM, Boudewijn Rempt <b...@valdyas.org> wrote:
> 
> On Wed, 23 Dec 2015, Michael Jackson wrote:
> 
>>> 
>>> Hm... Okay -- so, since I all my dependencies myself as cmake external 
>>> projects, I guess I want all of them set to rpath. I guess that for boost, 
>>> with its own build system, I'll need to add a separate fix-up step to my 
>>> cmake externals project for boost. I have to check how I can fix the 
>>> dependencies that are still automake/autoconf based. And I'll try what you 
>>> suggest below for my own project.
>> 
>> I have written scripts to do things like that for boost and ITK where the 
>> libraries do not have anything like @rpath or the absolute path to the 
>> installed library. After installing I run those scripts to “fix” the 
>> libraries so when I debug I can just run the application. During packaging I 
>> then run CMake’s BundleUtilities to copy in the libraries and adjust the 
>> libraries to have @rpath or @executable_path.
>> 
>> When fixing up a library make sure you also fix all the dependent libraries 
>> that might be there. For things like Boost or ITK their higher level 
>> libraries depend on their lower level libraries. Using “otool -L” you can 
>> see this. Make sure you update EVERY path in the library.
>> 
>> Also using MacDeployQt will NOT fix up any NON-Qt libraries (like Boost, 
>> HDF5.. ) so you will still need to run/write something that fixes all of 
>> those libraries. For our project we wrote a pure CMake script that does 
>> everything we need to fix up our bundles so that everything is self 
>> contained.
> 
> Hm... And it all did work when my project was still Qt4-based and I built on 
> Mavericks... And I've got about 300 libraries in the project, including 
> plugins. Resetting the id of broken libraries and then rebuilding my project 
> works. Are your scripts public so I can take a look and maybe reuse them?

https://github.com/dream3d/DREAM3D/blob/develop/Support/cmp/OSX_Tools/CompleteBundle.cmake.in
 
<https://github.com/dream3d/DREAM3D/blob/develop/Support/cmp/OSX_Tools/CompleteBundle.cmake.in>

Note that the file is “configured” during our make process but you should be 
able to figure out what we are doing. We also ensure ALL of our 3rd Party 
Libraries (except Qt) are built with absolute paths as their “install_name” so 
that BundleUtilities can more easily find the libraries. With additional 
arguments BundleUtilities can find about any library you need.

Mike Jackson

> 
> -- 
> Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org-- 
> 
> 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

-- 

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] still having rpath problems on osx

2015-12-23 Thread Michael Jackson


> On Dec 23, 2015, at 12:02 PM, Boudewijn Rempt  wrote:
> 
> On Tue, 22 Dec 2015, clin...@elemtech.com wrote:
> 
>> 
>> On Dec 21, 2015 12:26 PM, Boudewijn Rempt  wrote:
>>> 
>>> All libraries I link to are built. Some come with a cmake build system, 
>>> some with an automake build system, boost with something else altogether... 
>>> But I wouldn't have expected the way a library is built to make a 
>>> difference for the link lines in the library that links to the other 
>>> library. 
>> 
>> You may not expect this, but this is how it works.  @rpath is a way for a 
>> library to say, "i want to be found using rpaths"
>> 
> 
> Hm... Okay -- so, since I all my dependencies myself as cmake external 
> projects, I guess I want all of them set to rpath. I guess that for boost, 
> with its own build system, I'll need to add a separate fix-up step to my 
> cmake externals project for boost. I have to check how I can fix the 
> dependencies that are still automake/autoconf based. And I'll try what you 
> suggest below for my own project.

I have written scripts to do things like that for boost and ITK where the 
libraries do not have anything like @rpath or the absolute path to the 
installed library. After installing I run those scripts to “fix” the libraries 
so when I debug I can just run the application. During packaging I then run 
CMake’s BundleUtilities to copy in the libraries and adjust the libraries to 
have @rpath or @executable_path.

When fixing up a library make sure you also fix all the dependent libraries 
that might be there. For things like Boost or ITK their higher level libraries 
depend on their lower level libraries. Using “otool -L” you can see this. Make 
sure you update EVERY path in the library.

Also using MacDeployQt will NOT fix up any NON-Qt libraries (like Boost, HDF5.. 
) so you will still need to run/write something that fixes all of those 
libraries. For our project we wrote a pure CMake script that does everything we 
need to fix up our bundles so that everything is self contained.  

—
Mike Jackson

> 
>> I think you are trying to hard to fix the problem in your cmake, by setting 
>> too many variables.  The libraries you link against need fixed to behave how 
>> you want.
>> 
>> By setting
>> set(CMAKE_MACOSX_RPATH ON) you are setting @rpath for the install name of 
>> any library you build.
>> 
>> By setting INSTALL_RPATH, you are indicating directories to substitute 
>> @rpath at runtime.
>> 
>> 
>>> 
>>> * And for the library itself, I explicitly set: 
>>> if (APPLE)  set_target_properties(kritaimage PROPERTIES INSTALL_RPATH 
>>> "@loader_path/../../../../lib;@loader_path/../lib;@loader_path/../Frameworks;@executable_path/../lib;@executable_path/../Frameworks")
>>>  endif() 
>>> Though I sort of feel that it shouldn't be necessary to explicitly set an 
>>> rpath to something I build.
>> 
>> 
>> If you are going to install the library, you should set INSTALL_RPATH.
>> 
> 
> Well, the way I set it up, which may be wrong of course, I install all the 
> dependecies to ~/dev/i, then build the main application that uses those 
> dependencies. When developing, I run the app bundle directly, linked to the 
> dependencies in ~/dev/i/lib; when distributing, I use macdeployqt to populate 
> the app bundle with all the dependencies and data.
> 
> 
>> 
>> It is partly right.  However, you may find it simpler to change the id of 
>> libraries before you link against them.
>> For example
>> install_name_tool -id @rpath/libboost_system.dylib libboost_system.dylib
>> 
>> And use "install_name_tool -change" for any libraries that link against the 
>> library with the changed id, but only if you change the id after linking.
>> 
> 
> Thanks! I think I'm finally beginning to grasp the idea :-)
> 
> 
> -- 
> Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org-- 
> 

-- 

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] Known issues with Xcode 6.x and CMake

2015-10-21 Thread Michael Jackson


> On Oct 19, 2015, at 7:01 AM, Gregor Jasny via CMake <cmake@cmake.org> wrote:
> 
> Hello,
> 
> On 17/10/15 18:28, Michael Jackson wrote:
>> Are there any known issues with Xcode 6.4 and CMake 3.3.x? I ask because in 
>> our project when we generate the Xcode project we end up with 2 or 3 
>> executables listed in the drop down combo box. We also end up with lots of 
>> duplicate targets in the Xcode project. And the first time I open an Xcode 
>> project I have to click the “autocreate schemes” button about 30 times (I 
>> counted). We have 127 targets in our project currently.
>> 
>> Has anyone seen anything like this or have any comments? This is with Xcode 
>> 6.4 on OS X 10.10.5.
> 
> We also have projects which trigger the "Autocreate?" dialog but so far I did 
> not notice the behavior you described.
> 
> Does this also happen after a complete re-configure with deleted build 
> directory?
> 
> Thanks,
> Gregor
> 

Yes, it happens each time I do a completely clean re-configure. I am still 
trying to figure out why we have multiple executables listed for some projects 
but not others. We build some “MODULES” and we build actual dylibs. For the 
dylib targets there are only a single executable. For the MODULES however is 
where we get multiple executable targets for the same executable. It makes a 
long list even longer. i have spent some time trying to figure out the issues? 
We have lots of “project()” commands in our CMakeLists.txt files spread out 
over the project and I am trying to figure out if this is part of the problem? 
We also setup dependencies between the plugins and the main application to 
ensure they are all built when “ALL_BUILD” is used (Both on Xcode and Visual 
Studio). The Visual Studio 2013 generated solutions do not seem to have any 
issues so I think this is purely with the Xcode generators. 

—
Mike Jackson
BlueQuartz Software.

-- 

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] Known issues with Xcode 6.x and CMake

2015-10-17 Thread Michael Jackson
Are there any known issues with Xcode 6.4 and CMake 3.3.x? I ask because in our 
project when we generate the Xcode project we end up with 2 or 3 executables 
listed in the drop down combo box. We also end up with lots of duplicate 
targets in the Xcode project. And the first time I open an Xcode project I have 
to click the “autocreate schemes” button about 30 times (I counted). We have 
127 targets in our project currently.

Has anyone seen anything like this or have any comments? This is with Xcode 6.4 
on OS X 10.10.5.

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

[CMake] Multiple Executables for every target in Xcode

2015-10-06 Thread Michael Jackson
hello list, 
   I am running Xcode (5 & 6) and using CMake to generate the Xcode project 
files. We have a lot of targets for our project and we were looking into ways 
of refactoring the Cmake codes in order to reduce the number of targets. For 
example we have a lot of plugins that we compile and each plugin is its own 
"project()" command. One of the things that we have noticed is that just about 
every "add_executable()" command results in 2 executable targets in the 
generated Xcode project. I was just wondering if anyone has seen anything like 
this. We are using CMake 3.3.1 on OS X (10.8/10.9/10.10).

Thanks
Mike Jackson

-- 

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] fixup_bundles on macosx for non-.app target

2015-09-14 Thread Michael Jackson
Sorry for the delay. 
  https://github.com/dream3d/DREAM3D/tree/develop/Support/cmp/OSX_Tools

the CompleteTool.cmake.in calls the CompleteTool.sh.in files through a custom 
cmake command after they are "Configured" through "configure_file". I think you 
can figure out what is going on. There may be some issues with the shell script 
regarding temp file cleanup but it generally works. We build and package every 
night on our build systems.

Mike Jackson

On Sep 12, 2015, at 11:07 PM, Seth Cantrell <seth.cantr...@gmail.com> wrote:

> Please, I would like to see that script template. I'm also looking at the 
> source for BundleUtilities. It seems like it shouldn't be difficult to make a 
> module that provides the generic functionality  across platforms.
> 
>> On Sep 12, 2015, at 9:09 PM, Michael Jackson <mike.jack...@bluequartz.net> 
>> wrote:
>> 
>> I have a mix of .app and command line executables for our project on OS X. I 
>> wrote a templated .sh file that cmake uses to “configure_file()” by filling 
>> in details needed. The Script itself does the “fix up” stuff by running 
>> otool, parsing the output, looking for the libraries and then updating 
>> everything. You are welcome to the script if you find it useful.
>> 
>> Mike Jackson
>> 
>>> On Sep 12, 2015, at 7:54 PM, Seth Cantrell <seth.cantr...@gmail.com> wrote:
>>> 
>>>> 
>>>> On Sep 12, 2015, at 5:28 PM, Dan Kegel <d...@kegel.com> wrote:
>>>> 
>>>> On Sat, Sep 12, 2015 at 1:52 PM, Seth Cantrell <seth.cantr...@gmail.com> 
>>>> wrote:
>>>>> I have a project which uses fixup_bundle on Windows to package up the exe 
>>>>> with the third-party dlls it requires. On Mac OS X this same packaging 
>>>>> process fails. It looks like on Mac OS X this utility is assuming I want 
>>>>> to producing a .app bundle.
>>>> 
>>>> Given that a .app bundle is just a directory containing the executable and
>>>> the things it depends on, what's wrong with what fixup_bundle does?
>>>> Do you have a special reason to not want to follow the .app convention?
>>>> - Dan
>>> 
>>> The primary problem is simply that install and CPack processes fail on Mac 
>>> OS X. If I can get the process to succeed, even if that means producing a 
>>> .app directory structure for this non-.app, command line executable that 
>>> would be a fine first step. But ultimately I'd rather not have to fake the 
>>> .app structure either.
>>> 
>>> On Windows installing and packaging succeed. For example on windows I get a 
>>> .zip file named myproj-0.1.1-win64.zip that contains:
>>> 
>>> myproj-0.1.1-win64.zip\
>>> myproj-0.1.1-win64\
>>>  main.exe
>>>  somelib.dll
>>>  someotherlib.dll
>>> 
>>> And of course the _CPack_Packages structure used to generate this is
>>> 
>>> _CPack_Packages\
>>> win64\
>>>  ZIP\
>>>myproj-0.1.1-win64\
>>>  main.exe
>>>  somelib.dll
>>>  someotherlib.dll
>>> 
>>> This is the same structure I'd like to produce on OS X.
>>> 
>>> On Mac OS X the packaging process fails:
>>> 
>>>> [1/1] Run CPack packaging tool...
>>>> CPack: Create package using ZIP
>>>> CPack: Install projects
>>>> CPack: - Install project: scratch
>>>> exe_dotapp_dir/='/Volumes/D/Builds/scratch/_CPack_Packages/Darwin/ZIP/scratch-0.1.1-Darwin/'
>>>> item_substring='/Volumes/D/Builds/scratch/_CPack_Packages/Darwin/ZIP/MacOS/somelib'
>>>> resolved_embedded_item='/Volumes/D/Builds/scratch/_CPack_Packages/Darwin/ZIP/MacOS/somelib.dylib'
>>>> 
>>>> Install or copy the item into the bundle before calling fixup_bundle.
>>>> Or maybe there's a typo or incorrect path in one of the args to 
>>>> fixup_bundle?
>>>> 
>>>> CMake Error at 
>>>> /Applications/CMake.app/Contents/share/cmake-3.3/Modules/BundleUtilities.cmake:737
>>>>  (message):
>>>> cannot fixup an item that is not in the bundle...
>>>> Call Stack (most recent call first):
>>>> /Applications/CMake.app/Contents/share/cmake-3.3/Modules/BundleUtilities.cmake:848
>>>>  (fixup_bundle_item)
>>>> /Volumes/D/Builds/scratch/FixBundle.cmake:11 (fixup_bundle)
>>>> /Volumes/D/Builds/scratch/cmake_install.cmake:41 (include)
>>>> 
>>>> 
>>>> CPack Error: Error when generating 

Re: [CMake] fixup_bundles on macosx for non-.app target

2015-09-12 Thread Michael Jackson
I have a mix of .app and command line executables for our project on OS X. I 
wrote a templated .sh file that cmake uses to “configure_file()” by filling in 
details needed. The Script itself does the “fix up” stuff by running otool, 
parsing the output, looking for the libraries and then updating everything. You 
are welcome to the script if you find it useful.

Mike Jackson

> On Sep 12, 2015, at 7:54 PM, Seth Cantrell  wrote:
> 
>> 
>> On Sep 12, 2015, at 5:28 PM, Dan Kegel  wrote:
>> 
>> On Sat, Sep 12, 2015 at 1:52 PM, Seth Cantrell  
>> wrote:
>>> I have a project which uses fixup_bundle on Windows to package up the exe 
>>> with the third-party dlls it requires. On Mac OS X this same packaging 
>>> process fails. It looks like on Mac OS X this utility is assuming I want to 
>>> producing a .app bundle.
>> 
>> Given that a .app bundle is just a directory containing the executable and
>> the things it depends on, what's wrong with what fixup_bundle does?
>> Do you have a special reason to not want to follow the .app convention?
>> - Dan
> 
> The primary problem is simply that install and CPack processes fail on Mac OS 
> X. If I can get the process to succeed, even if that means producing a .app 
> directory structure for this non-.app, command line executable that would be 
> a fine first step. But ultimately I'd rather not have to fake the .app 
> structure either.
> 
> On Windows installing and packaging succeed. For example on windows I get a 
> .zip file named myproj-0.1.1-win64.zip that contains:
> 
> myproj-0.1.1-win64.zip\
>  myproj-0.1.1-win64\
>main.exe
>somelib.dll
>someotherlib.dll
> 
> And of course the _CPack_Packages structure used to generate this is
> 
> _CPack_Packages\
>  win64\
>ZIP\
>  myproj-0.1.1-win64\
>main.exe
>somelib.dll
>someotherlib.dll
> 
> This is the same structure I'd like to produce on OS X.
> 
> On Mac OS X the packaging process fails:
> 
>> [1/1] Run CPack packaging tool...
>> CPack: Create package using ZIP
>> CPack: Install projects
>> CPack: - Install project: scratch
>>  
>> exe_dotapp_dir/='/Volumes/D/Builds/scratch/_CPack_Packages/Darwin/ZIP/scratch-0.1.1-Darwin/'
>>  
>> item_substring='/Volumes/D/Builds/scratch/_CPack_Packages/Darwin/ZIP/MacOS/somelib'
>>  
>> resolved_embedded_item='/Volumes/D/Builds/scratch/_CPack_Packages/Darwin/ZIP/MacOS/somelib.dylib'
>> 
>> Install or copy the item into the bundle before calling fixup_bundle.
>> Or maybe there's a typo or incorrect path in one of the args to fixup_bundle?
>> 
>> CMake Error at 
>> /Applications/CMake.app/Contents/share/cmake-3.3/Modules/BundleUtilities.cmake:737
>>  (message):
>>  cannot fixup an item that is not in the bundle...
>> Call Stack (most recent call first):
>>  
>> /Applications/CMake.app/Contents/share/cmake-3.3/Modules/BundleUtilities.cmake:848
>>  (fixup_bundle_item)
>>  /Volumes/D/Builds/scratch/FixBundle.cmake:11 (fixup_bundle)
>>  /Volumes/D/Builds/scratch/cmake_install.cmake:41 (include)
>> 
>> 
>> CPack Error: Error when generating package: scratch
>> FAILED: cd /Volumes/D/Builds/scratch && 
>> /Applications/CMake.app/Contents/bin/cpack --config ./CPackConfig.cmake
>> ninja: build stopped: subcommand failed.
> 
> On Mac OS X after the packaging failure I can see that _CPack_Packages 
> contains a directory structure
> 
> _CPack_Packages\
>  Darwin\
>ZIP\
>  MacOS\
>somelib.dylib
>someotherlib.dylib
>  myproj-0.1.1-Darwin\
>main
> 
> and the process has stopped before generating the zip file.
> 
> The initial error is due to the fact that I'm putting the executable in the 
> root of the install tree: install(TARGETS main DESTINATION "."). This causes 
> fixup_bundle's behavior on Mac OS to put the libraries outside the directory 
> that CPack is preparing to zip, causing an error where fixup (quite 
> correctly) refuses to work when the dylibs aren't in the directory that's 
> going to be zipped up
> 
> Even so, the packaging process has clearly gone as far as correctly 
> identifying the dylibs and copying them into the _CPack_Packages directory. 
> Using otool I can see that the executable's rpath's for finding the dylibs 
> have been updated: @executable_path/../MacOS/somelib.dylib. Using 
> DYLD_PRINT_LIBRARIES I can see that running the executable does indeed load 
> the intended .dylibs the the program runs correctly.
> 
> Trying to fix the issue of the dylibs being put outside the zip directory, I 
> changed the install command to not put the executable at the root of the 
> install location: install(TARGET main DESTINATION "bin"). This still does not 
> succeed because fixup_bundle is explicitly verifying whether the directory 
> structure is a valid bundle, which this is not.
> 
>> CMake Error at 
>> /Applications/CMake.app/Contents/share/cmake-3.3/Modules/BundleUtilities.cmake:860
>>  (message):
>>  error: fixup_bundle: not a 

Re: [CMake] Protobuf Libraries not found on OS X

2015-09-04 Thread Michael Jackson
It _should_. I think this was a case of "operator" error. Not sure I defined 
CMAKE_PREFIX_PATH properly with the path to the protobuf libraries. I'll give 
that a try and I am sure that it will work properly.

Thanks for the sanity check
Mike J.

On Sep 4, 2015, at 2:59 PM, Daniel Schepler <dschep...@scalable-networks.com> 
wrote:

> Doesn't CMAKE_PREFIX_PATH work for you?
> -- 
> Daniel Schepler
> From: CMake [cmake-boun...@cmake.org] on behalf of Michael Jackson 
> [mike.jack...@bluequartz.net]
> Sent: Friday, September 04, 2015 10:33 AM
> To: CMake list
> Subject: Re: [CMake] Protobuf Libraries not found on OS X
> 
> Odd, I built from source and there does not seem to be any way to add a 
> custom search path (akin to QtDir or something like that) for the searching. 
> I added a few lines to the FindProtobuf.cmake file to make it look for 
> "Protobuf_DIR" as an environment variable. If I installed it into /usr/local 
> I bit the default paths would find it.
> 
> I guess I could submit the patch as a bug report for the next version of 
> CMake.
> 
> Thanks
> Mike Jackson
> On Sep 4, 2015, at 11:53 AM, Nils Guillermin <nils.guiller...@gmail.com> 
> wrote:
> 
>> I'm on Mac OS X 10.10.4 and I use protobuf installed through homebrew.
>> 
>> Nils
>> 
>> On Thu, Sep 3, 2015 at 1:48 PM, Michael Jackson 
>> <mike.jack...@bluequartz.net> wrote:
>> I have compiled the Protocol Buffer library on OS X and I am using the 
>> following CMake code to try and find the compiled libraries:
>> 
>> find_package(Protobuf REQUIRED)
>> 
>> 
>> but when configuring I get the usual
>> 
>> CMake Error: The following variables are used in this project, but they are 
>> set to NOTFOUND.
>> Please set them or make sure they are set and tested correctly in the CMake 
>> files:
>> PROTOBUF_LIBRARY (ADVANCED)
>> 
>> Looking at the FindProtobuf.cmake file that came with CMake 3.3.0 it looks 
>> like the module would ONLY work with MSVC built Protobuf libraries as the 
>> specific paths that are searched for are Visual Studio specific. Is this the 
>> correct behavior? Does anyone else use Protobuffers on OS X? I am thinking 
>> of rolling my on FindProtobuf.cmake file to have cmake look in more places.
>> 
>> ---
>> Mike Jackson
>> 
>> --
>> 
>> 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

-- 

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] Protobuf Libraries not found on OS X

2015-09-04 Thread Michael Jackson
Odd, I built from source and there does not seem to be any way to add a custom 
search path (akin to QtDir or something like that) for the searching. I added a 
few lines to the FindProtobuf.cmake file to make it look for "Protobuf_DIR" as 
an environment variable. If I installed it into /usr/local I bit the default 
paths would find it.

I guess I could submit the patch as a bug report for the next version of CMake.

Thanks
Mike Jackson
On Sep 4, 2015, at 11:53 AM, Nils Guillermin <nils.guiller...@gmail.com> wrote:

> I'm on Mac OS X 10.10.4 and I use protobuf installed through homebrew.
> 
> Nils
> 
> On Thu, Sep 3, 2015 at 1:48 PM, Michael Jackson <mike.jack...@bluequartz.net> 
> wrote:
> I have compiled the Protocol Buffer library on OS X and I am using the 
> following CMake code to try and find the compiled libraries:
> 
> find_package(Protobuf REQUIRED)
> 
> 
> but when configuring I get the usual
> 
> CMake Error: The following variables are used in this project, but they are 
> set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the CMake 
> files:
> PROTOBUF_LIBRARY (ADVANCED)
> 
> Looking at the FindProtobuf.cmake file that came with CMake 3.3.0 it looks 
> like the module would ONLY work with MSVC built Protobuf libraries as the 
> specific paths that are searched for are Visual Studio specific. Is this the 
> correct behavior? Does anyone else use Protobuffers on OS X? I am thinking of 
> rolling my on FindProtobuf.cmake file to have cmake look in more places.
> 
> ---
> Mike Jackson
> 
> --
> 
> 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
> 

-- 

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] Protobuf Libraries not found on OS X

2015-09-03 Thread Michael Jackson
I have compiled the Protocol Buffer library on OS X and I am using the 
following CMake code to try and find the compiled libraries:

find_package(Protobuf REQUIRED)


but when configuring I get the usual

CMake Error: The following variables are used in this project, but they are set 
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake 
files:
PROTOBUF_LIBRARY (ADVANCED)

Looking at the FindProtobuf.cmake file that came with CMake 3.3.0 it looks like 
the module would ONLY work with MSVC built Protobuf libraries as the specific 
paths that are searched for are Visual Studio specific. Is this the correct 
behavior? Does anyone else use Protobuffers on OS X? I am thinking of rolling 
my on FindProtobuf.cmake file to have cmake look in more places. 

---
Mike Jackson

-- 

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] Crawling documentation to find named argument keywords

2015-08-17 Thread Michael Jackson
I thought there used to be a DocBook version of the documentation? At one point 
I had an XML parser that used that as input to process the documentation in the 
same way.

Mike Jackson

On Aug 17, 2015, at 8:51 AM, Robert Dailey rcdailey.li...@gmail.com wrote:

 I've attached a python script I'm using to obtain a list of keywords
 across all CMake commands that I can use. Can someone let me know if
 this is a reliable way to craw the help documentation to find these
 keywords?
 
 Note that the keywords I'm referring to are things like APPEND in the
 list() command, or PUBLIC and PRIVATE in the target_link_libraries()
 command. Each command has a set of all-upper-case keywords it uses to
 separate out arguments. I want a list of these keywords for all
 commands in one big list.
 
 I'm doing this to support syntax highlighting in a text editor.
 
 To use the script, first pipe out CMake's help to a file like this:
 
 $ cmake --help-full  help.txt
 
 Then run it through the python script attached:
 
 $ python-3.4 strip-options.py help.txt
 
 This should output to console the list of keywords. I feel like a lot
 are missing. I also got a lot of false positives. Can anyone suggest a
 better way to isolate true argument keywords in the help text?
 strip-options.py-- 
 
 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

-- 

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-developers] CMake IR

2015-07-30 Thread Michael Jackson

On Jul 30, 2015, at 11:56 AM, Dan Kegel d...@kegel.com wrote:

 
 Am 30.07.2015 10:15 vorm. schrieb Bill Hoffman bill.hoff...@kitware.com:
 
  On 7/30/2015 10:48 AM, Dan Kegel wrote:
 
  I wouldn't mind getting rid of the cache, it's a bizarre concept that 
  appears
  to be a workaround for users who can't stand starting cmake from a script,
  and it complicates my cmake scripts, but that's not a battle I'd like to 
  wage.
 
  No, it is how CMake stores things it finds during the configure step. If 
  you did not have it you would have to rediscover everything for every run 
  on a build tree, and have no place to store user selections in the GUI.
 
 I believe the latter, but not the former.
 I never use the GUI, and consider the cache an anti-feature there solely to 
 support GUI users.  It complicates my life, and I'd love to see it go.
 

Which don't you believe? The part where if you don't have a cache then you have 
to rediscover everything? Simply delete the CMakeCache.txt file and rerun 
CMake. You will rediscover everything. If you do not have some sort of state 
file then exactly how would one store their selections? Since you are 
comfortable on the command line I'll assume you love typing:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/foo 
-DCXX_COMPILE_FLAGS=All -DKEEP_GOING_WITH_EVEN_MORE_ARGUMENTS -G Ninja 
../YourProject.

For shorter invocations this isn't so bad to type. We have our project down to 
a single argument, but we preload from, wait for it, a cache file. But what 
about those folks who are simply NOT comfortable on the command line and always 
use the GUI? If CMake _never_ had a GUI then your argument might have some 
merit.

If your next thought is something like .. Well just write an alias in your 
.bashrc so you do not have to type it out each time.. then didn't you just 
basically create a cache file?

And if you vote for just rediscover everything, every time then you have 
never run CMake on a larger project on a Windows machine with Visual Studio. 
Now _that_ is slow. I think the history of the design implementations kind of 
shows that a Cache is more helpful than hurtful.

Plus when Project developers decide to hard code their own version of dependent 
libraries and give you no way of over riding those settings OTHER than hand 
editing the cache file, then be thankful you have the cache file there.

Just my 2 cents.

Mike Jackson


-- 

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] OS X framework headers with capital letters

2015-07-21 Thread Michael Jackson
to be very precise, 
OS X is a Case Preserving but NOT Case sensitive be default. OS X can be 
made to be case sensitive but no one actually recommends it.

this means that on OS X foo.h and Foo.h resolve to be the same file, where as 
on Linux they would be 2 different files. You would have the same issues on 
Windows.

Mike Jackson


On Jul 21, 2015, at 10:35 AM, Dan Kegel d...@kegel.com wrote:

 It can't installiert both foo.h and Foo.h in the mac, better correct your 
 example.
 Am 21.07.2015 5:19 vorm. schrieb Steven Wilson 
 steven.wesley.wil...@gmail.com:
 I've noticed that CMake 3.3.0-rc3 will not install a header file in a Mac OS 
 X framework if the header file starts with a capital letter (either that or 
 has the same name as the framework).  
 
 For example if I have the following:
 
 
 set(FOO_HEADER_FILES foo.h;bar.h;bat.h;Foo.h;Foo.hpp)
 
 add_library(Foo SHARED ${FOO_SOURCE_FILES})
 
 set_target_properties(Foo PROPERTIES
 FRAMEWORK ON
 OUTPUT_NAME Foo
 PUBLIC_HEADER ${FOO_HEADER_FILES}
 )
 
 install(TARGETS Foo
   FRAMEWORK DESTINATION frameworks)
 
 
 Then when running 'make install' or the install target from Xcode, the 
 installation step silently does not install Foo.h or Foo.hpp.
 
 This behavior seems arbitrary, wrong, and completely annoying.
 
 Comments?
 
 --
 
 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
 -- 
 
 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

-- 

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] OS X framework headers with capital letters

2015-07-21 Thread Michael Jackson
Well the definitely removes the case sensitivity issue. Do you have a compact 
example that shows the failure? I took a look in our project and we don't have 
any cases like this. I would find it a very odd and subtle bug it this really 
were an issue. one of those edge cases that just did not get tested.

Mike Jackson

On Jul 21, 2015, at 8:19 AM, Steven Wilson steven.wesley.wil...@gmail.com 
wrote:

 I've noticed that CMake 3.3.0-rc3 will not install a header file in a Mac OS 
 X framework if the header file starts with a capital letter (either that or 
 has the same name as the framework).  
 
 For example if I have the following:
 
 
 set(FOO_HEADER_FILES foo.h;bar.h;bat.h;Foo.h;Foo.hpp)
 
 add_library(Foo SHARED ${FOO_SOURCE_FILES})
 
 set_target_properties(Foo PROPERTIES
 FRAMEWORK ON
 OUTPUT_NAME Foo
 PUBLIC_HEADER ${FOO_HEADER_FILES}
 )
 
 install(TARGETS Foo
   FRAMEWORK DESTINATION frameworks)
 
 
 Then when running 'make install' or the install target from Xcode, the 
 installation step silently does not install Foo.h or Foo.hpp.
 
 This behavior seems arbitrary, wrong, and completely annoying.
 
 Comments?
 -- 
 
 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

-- 

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] Setting CXX_STANDARD 11 Enables GNU Extensions

2015-07-05 Thread Michael Jackson
Is there a project wide CXX_STANDARD_REQUIRED that I can set? I am wanting to 
migrate our project to C++ 11 and would rather set something in the project 
root rather than find every place where our own and our customers plugin codes 
create a target.

Thanks
Mike Jackson

On Jul 4, 2015, at 5:13 PM, digitalriptide digitalript...@gmail.com wrote:

 Thank you for the pointers, adding 
 set( CMAKE_CXX_EXTENSIONS OFF )
 to the root CMakeLists.txt disabled the extensions through the project.
 
 On Sat, Jul 4, 2015 at 3:52 PM, Thompson, KT k...@lanl.gov wrote:
 Try setting CMAKE_CXX_EXTENSIONS this to OFF.
 
  
 
 http://www.cmake.org/cmake/help/v3.2/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS
 
  
 
 From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Scott Aron Bloom
 Sent: Saturday, July 04, 2015 1:17 AM
 To: digitalriptide; cmake@cmake.org
 Subject: Re: [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions
 
  
 
 This is why I don’t use the CXX_STANDARD and instead use the CXX_FLAGS and 
 add the flag I need.
 
  
 
 From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of digitalriptide
 Sent: Friday, July 3, 2015 1:56 PM
 To: cmake@cmake.org
 Subject: [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions
 
  
 
 If I enable C++11 for some target via
 
 set_target_properties( SomeTarget PROPERTIES CXX_STANDARD 11 )
 
 set_target_properties( SomeTarget PROPERTIES CXX_STANDARD_REQUIRED ON )
 
 with GCC, the code will then compile with -std=gnu++11. Compiling with 
 -std=gnu++11 enables C++11 *and* the GNU extensions. Is there an option that 
 will result in -std=c++11 in lieu of -std=gnu++11, to build without the the 
 GNU extensions?
 
  
 
 Thank you!
 
 
 -- 
 
 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

-- 

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] Setting CXX_STANDARD 11 Enables GNU Extensions

2015-07-05 Thread Michael Jackson

Cool, I think that is what I want.

--
Mike Jackson


Roman Wüger wrote:

Hi,

you must set the following in the root CMakeLists.txt file:

set(CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_STANDARD_REQUIRED ON)

Did you mean that?

http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_CXX_STANDARD.html

http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_CXX_STANDARD_REQUIRED.html

Best Regards

Roman

*Von:*CMake [mailto:cmake-boun...@cmake.org] *Im Auftrag von *Michael
Jackson
*Gesendet:* Sonntag, 05. Juli 2015 18:07
*An:* cmake@cmake.org
*Betreff:* Re: [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions

Is there a project wide CXX_STANDARD_REQUIRED that I can set? I am
wanting to migrate our project to C++ 11 and would rather set something
in the project root rather than find every place where our own and our
customers plugin codes create a target.

Thanks

Mike Jackson

On Jul 4, 2015, at 5:13 PM, digitalriptide digitalript...@gmail.com
mailto:digitalript...@gmail.com wrote:



Thank you for the pointers, adding

set( CMAKE_CXX_EXTENSIONS OFF )

to the root CMakeLists.txt disabled the extensions through the project.

On Sat, Jul 4, 2015 at 3:52 PM, Thompson, KT k...@lanl.gov
mailto:k...@lanl.gov wrote:

Try setting CMAKE_CXX_EXTENSIONS this to OFF.


http://www.cmake.org/cmake/help/v3.2/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS

*From:*CMake [mailto:cmake-boun...@cmake.org
mailto:cmake-boun...@cmake.org] *On Behalf Of *Scott Aron Bloom
*Sent:* Saturday, July 04, 2015 1:17 AM
*To:* digitalriptide; cmake@cmake.org mailto:cmake@cmake.org
*Subject:* Re: [CMake] Setting CXX_STANDARD 11 Enables GNU
Extensions

This is why I don’t use the CXX_STANDARD and instead use the
CXX_FLAGS and add the flag I need.

*From:*CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of
*digitalriptide
*Sent:* Friday, July 3, 2015 1:56 PM
*To:* cmake@cmake.org mailto:cmake@cmake.org
*Subject:* [CMake] Setting CXX_STANDARD 11 Enables GNU Extensions

If I enable C++11 for some target via

set_target_properties( SomeTarget PROPERTIES CXX_STANDARD 11 )

set_target_properties( SomeTarget PROPERTIES
CXX_STANDARD_REQUIRED ON )

with GCC, the code will then compile with -std=gnu++11.
Compiling with -std=gnu++11 enables C++11 *and* the GNU
extensions. Is there an option that will result in -std=c++11 in
lieu of -std=gnu++11, to build without the the GNU extensions?

Thank you!

--

Powered by www.kitware.com http://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


--

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] Running CTest with Xcode build results in Error

2015-06-18 Thread Michael Jackson
We have a nightly build for our project as reported here 
http://my.cdash.org/viewBuildError.php?buildid=781789 which is producing an 
error. The short of it is that CTest is using xcodebuild (which is correct) but 
is trying to pass the “-j16” style that normal “MakeFiles” would use. I have 
looked through our CTest scripts (Which were adapted from VTK’s nightly builds) 
but I am not seeing anything about that flag being explicitly called out. 

Could anyone with nightly build experience help us out?

Thanks
Mike Jackson
BlueQuartz Software
-- 

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] Running CTest with Xcode build results in Error

2015-06-18 Thread Michael Jackson
Nope. Neither one of those are on my environment. I am also running at Root for 
this build and I have a clean .bashrc for both accounts. There must be 
something in my chest.cmake file that makes CTest think it is running with a 
makefile generator.

Should I post my various files?

Mike Jackson

 On Jun 18, 2015, at 9:56 AM, David Cole dlrd...@aol.com wrote:
 
 Is there a MAKEFLAGS or CTEST_BUILD_FLAGS in your environment?
 
 Where does the -j16 come from? (CTest should not be injecting that
 unless you are telling it to somehow, so it either comes from one of
 your scripts, or your environment...)
 
 grep for just \-j -- the value 16 may come from a variable evaluation.
 
 
 HTH,
 David C.
 
 
 On Thu, Jun 18, 2015 at 8:51 AM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 We have a nightly build for our project as reported here 
 http://my.cdash.org/viewBuildError.php?buildid=781789 which is producing an 
 error. The short of it is that CTest is using xcodebuild (which is correct) 
 but is trying to pass the “-j16” style that normal “MakeFiles” would use. I 
 have looked through our CTest scripts (Which were adapted from VTK’s nightly 
 builds) but I am not seeing anything about that flag being explicitly called 
 out.
 
 Could anyone with nightly build experience help us out?
 
 Thanks
 Mike Jackson
 BlueQuartz Software
 --
 
 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

-- 

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] Running CTest with Xcode build results in Error

2015-06-18 Thread Michael Jackson
I will have to admit that I don't pretend to completely understand the CMake 
file that I am using as I started with something from VTK and changed things to 
work with our project and setup. I will attach the files to the email. Maybe 
you can see something that I am missing:



BuildDREAM3D.sh
Description: Binary data


Xcode-DREAM3D_Dashboard.cmake
Description: Binary data



Thanks
Mike Jackson

On Jun 18, 2015, at 3:08 PM, David Cole via CMake cmake@cmake.org wrote:

 Are you using Eclipse or Kate?
 
 Did you do a grep -E \-j on all of the files included by the script
 that drives the build? (And in your source tree?)
 
 The only -j possibilities that look likely in CMake itself are shown
 in the git grep results from a CMake checkout:
 
 $ git grep -E \-j
 
 Modules/CMakeFindEclipseCDT4.cmake:# Try to find out how many CPUs we
 have and set the -j
 Modules/CMakeFindEclipseCDT4.cmake:# Only set -j if we are under UNIX
 and if the make-tool
 Modules/CMakeFindEclipseCDT4.cmake:
 set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS -j${_CMAKE_ECLI
 Modules/CMakeFindEclipseCDT4.cmake:set(CMAKE_ECLIPSE_MAKE_ARGUMENTS
 ${_CMAKE_ECLIPSE_INIT
 Modules/CMakeFindKate.cmake:# Try to find out how many CPUs we have
 and set the -j argumen
 Modules/CMakeFindKate.cmake:# Only set -j if we are under UNIX and if
 the make-tool used a
 Modules/CMakeFindKate.cmake:  set(_CMAKE_KATE_INITIAL_MAKE_ARGS
 -j${_CMAKE_KATE_PROCESSOR
 Modules/CMakeFindKate.cmake:set(CMAKE_KATE_MAKE_ARGUMENTS
 ${_CMAKE_KATE_INITIAL_MAKE_ARGS
 
 And it looks like those try to restrict it to a make tool, so they
 shouldn't be using it in the case of xcodebuild...
 
 Mystery. We're missing something.
 
 
 
 On Thu, Jun 18, 2015 at 12:23 PM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 Nope. Neither one of those are on my environment. I am also running at Root 
 for this build and I have a clean .bashrc for both accounts. There must be 
 something in my chest.cmake file that makes CTest think it is running with a 
 makefile generator.
 
 Should I post my various files?
 
 Mike Jackson
 
 On Jun 18, 2015, at 9:56 AM, David Cole dlrd...@aol.com wrote:
 
 Is there a MAKEFLAGS or CTEST_BUILD_FLAGS in your environment?
 
 Where does the -j16 come from? (CTest should not be injecting that
 unless you are telling it to somehow, so it either comes from one of
 your scripts, or your environment...)
 
 grep for just \-j -- the value 16 may come from a variable evaluation.
 
 
 HTH,
 David C.
 
 
 On Thu, Jun 18, 2015 at 8:51 AM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 We have a nightly build for our project as reported here 
 http://my.cdash.org/viewBuildError.php?buildid=781789 which is producing 
 an error. The short of it is that CTest is using xcodebuild (which is 
 correct) but is trying to pass the “-j16” style that normal “MakeFiles” 
 would use. I have looked through our CTest scripts (Which were adapted 
 from VTK’s nightly builds) but I am not seeing anything about that flag 
 being explicitly called out.
 
 Could anyone with nightly build experience help us out?
 
 Thanks
 Mike Jackson
 BlueQuartz Software
 --
 
 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
 
 -- 
 
 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

-- 

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

Re: [CMake] Running CTest with Xcode build results in Error

2015-06-18 Thread Michael Jackson
Found the source. the generated CTestConfig.cmake is the following:


## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
##   ENABLE_TESTING()
##   INCLUDE(CTest)
set(CTEST_PROJECT_NAME DREAM3D)
set(CTEST_NIGHTLY_START_TIME 01:00:00 UTC)

set(CTEST_DROP_METHOD http)
set(CTEST_DROP_SITE my.cdash.org)
set(CTEST_DROP_LOCATION /submit.php?project=DREAM3D)
set(CTEST_DROP_SITE_CDASH TRUE)

# Use multiple CPU cores to build
include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
  if(NOT WIN32)
set(CTEST_BUILD_FLAGS -j${N})
  endif(NOT WIN32)
  set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})

endif()

So that explains where it is coming from. Does CMake generate this or does my 
project generate this?

Mike J

On Jun 18, 2015, at 3:40 PM, David Cole dlrd...@aol.com wrote:

 The error shown in your CDash build error output page could be coming
 from something that is built within your project as an
 ExternalProject.
 
 Do you have any of those?
 
 Have you grepped your source tree for -j yet?
 
 
 On Thu, Jun 18, 2015 at 3:17 PM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 I will have to admit that I don't pretend to completely understand the CMake 
 file that I am using as I started with something from VTK and changed things 
 to work with our project and setup. I will attach the files to the email. 
 Maybe you can see something that I am missing:
 
 
 
 
 
 Thanks
 Mike Jackson
 
 On Jun 18, 2015, at 3:08 PM, David Cole via CMake cmake@cmake.org wrote:
 
 Are you using Eclipse or Kate?
 
 Did you do a grep -E \-j on all of the files included by the script
 that drives the build? (And in your source tree?)
 
 The only -j possibilities that look likely in CMake itself are shown
 in the git grep results from a CMake checkout:
 
 $ git grep -E \-j
 
 Modules/CMakeFindEclipseCDT4.cmake:# Try to find out how many CPUs we
 have and set the -j
 Modules/CMakeFindEclipseCDT4.cmake:# Only set -j if we are under UNIX
 and if the make-tool
 Modules/CMakeFindEclipseCDT4.cmake:
 set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS -j${_CMAKE_ECLI
 Modules/CMakeFindEclipseCDT4.cmake:set(CMAKE_ECLIPSE_MAKE_ARGUMENTS
 ${_CMAKE_ECLIPSE_INIT
 Modules/CMakeFindKate.cmake:# Try to find out how many CPUs we have
 and set the -j argumen
 Modules/CMakeFindKate.cmake:# Only set -j if we are under UNIX and if
 the make-tool used a
 Modules/CMakeFindKate.cmake:  set(_CMAKE_KATE_INITIAL_MAKE_ARGS
 -j${_CMAKE_KATE_PROCESSOR
 Modules/CMakeFindKate.cmake:set(CMAKE_KATE_MAKE_ARGUMENTS
 ${_CMAKE_KATE_INITIAL_MAKE_ARGS
 
 And it looks like those try to restrict it to a make tool, so they
 shouldn't be using it in the case of xcodebuild...
 
 Mystery. We're missing something.
 
 
 
 On Thu, Jun 18, 2015 at 12:23 PM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 Nope. Neither one of those are on my environment. I am also running at 
 Root for this build and I have a clean .bashrc for both accounts. There 
 must be something in my chest.cmake file that makes CTest think it is 
 running with a makefile generator.
 
 Should I post my various files?
 
 Mike Jackson
 
 On Jun 18, 2015, at 9:56 AM, David Cole dlrd...@aol.com wrote:
 
 Is there a MAKEFLAGS or CTEST_BUILD_FLAGS in your environment?
 
 Where does the -j16 come from? (CTest should not be injecting that
 unless you are telling it to somehow, so it either comes from one of
 your scripts, or your environment...)
 
 grep for just \-j -- the value 16 may come from a variable evaluation.
 
 
 HTH,
 David C.
 
 
 On Thu, Jun 18, 2015 at 8:51 AM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 We have a nightly build for our project as reported here 
 http://my.cdash.org/viewBuildError.php?buildid=781789 which is producing 
 an error. The short of it is that CTest is using xcodebuild (which is 
 correct) but is trying to pass the “-j16” style that normal “MakeFiles” 
 would use. I have looked through our CTest scripts (Which were adapted 
 from VTK’s nightly builds) but I am not seeing anything about that flag 
 being explicitly called out.
 
 Could anyone with nightly build experience help us out?
 
 Thanks
 Mike Jackson
 BlueQuartz Software
 --
 
 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] Running CTest with Xcode build results in Error

2015-06-18 Thread Michael Jackson
And I will follow that up quickly with .. it was buried down in our project…..

Thanks for the help.

Mike J.

On Jun 18, 2015, at 3:45 PM, Michael Jackson mike.jack...@bluequartz.net 
wrote:

 Found the source. the generated CTestConfig.cmake is the following:
 
 
 ## This file should be placed in the root directory of your project.
 ## Then modify the CMakeLists.txt file in the root directory of your
 ## project to incorporate the testing dashboard.
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
 ##   INCLUDE(CTest)
 set(CTEST_PROJECT_NAME DREAM3D)
 set(CTEST_NIGHTLY_START_TIME 01:00:00 UTC)
 
 set(CTEST_DROP_METHOD http)
 set(CTEST_DROP_SITE my.cdash.org)
 set(CTEST_DROP_LOCATION /submit.php?project=DREAM3D)
 set(CTEST_DROP_SITE_CDASH TRUE)
 
 # Use multiple CPU cores to build
 include(ProcessorCount)
 ProcessorCount(N)
 if(NOT N EQUAL 0)
  if(NOT WIN32)
set(CTEST_BUILD_FLAGS -j${N})
  endif(NOT WIN32)
  set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
 
 endif()
 
 So that explains where it is coming from. Does CMake generate this or does my 
 project generate this?
 
 Mike J
 
 On Jun 18, 2015, at 3:40 PM, David Cole dlrd...@aol.com wrote:
 
 The error shown in your CDash build error output page could be coming
 from something that is built within your project as an
 ExternalProject.
 
 Do you have any of those?
 
 Have you grepped your source tree for -j yet?
 
 
 On Thu, Jun 18, 2015 at 3:17 PM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 I will have to admit that I don't pretend to completely understand the 
 CMake file that I am using as I started with something from VTK and changed 
 things to work with our project and setup. I will attach the files to the 
 email. Maybe you can see something that I am missing:
 
 
 
 
 
 Thanks
 Mike Jackson
 
 On Jun 18, 2015, at 3:08 PM, David Cole via CMake cmake@cmake.org wrote:
 
 Are you using Eclipse or Kate?
 
 Did you do a grep -E \-j on all of the files included by the script
 that drives the build? (And in your source tree?)
 
 The only -j possibilities that look likely in CMake itself are shown
 in the git grep results from a CMake checkout:
 
 $ git grep -E \-j
 
 Modules/CMakeFindEclipseCDT4.cmake:# Try to find out how many CPUs we
 have and set the -j
 Modules/CMakeFindEclipseCDT4.cmake:# Only set -j if we are under UNIX
 and if the make-tool
 Modules/CMakeFindEclipseCDT4.cmake:
 set(_CMAKE_ECLIPSE_INITIAL_MAKE_ARGS -j${_CMAKE_ECLI
 Modules/CMakeFindEclipseCDT4.cmake:set(CMAKE_ECLIPSE_MAKE_ARGUMENTS
 ${_CMAKE_ECLIPSE_INIT
 Modules/CMakeFindKate.cmake:# Try to find out how many CPUs we have
 and set the -j argumen
 Modules/CMakeFindKate.cmake:# Only set -j if we are under UNIX and if
 the make-tool used a
 Modules/CMakeFindKate.cmake:  set(_CMAKE_KATE_INITIAL_MAKE_ARGS
 -j${_CMAKE_KATE_PROCESSOR
 Modules/CMakeFindKate.cmake:set(CMAKE_KATE_MAKE_ARGUMENTS
 ${_CMAKE_KATE_INITIAL_MAKE_ARGS
 
 And it looks like those try to restrict it to a make tool, so they
 shouldn't be using it in the case of xcodebuild...
 
 Mystery. We're missing something.
 
 
 
 On Thu, Jun 18, 2015 at 12:23 PM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 Nope. Neither one of those are on my environment. I am also running at 
 Root for this build and I have a clean .bashrc for both accounts. There 
 must be something in my chest.cmake file that makes CTest think it is 
 running with a makefile generator.
 
 Should I post my various files?
 
 Mike Jackson
 
 On Jun 18, 2015, at 9:56 AM, David Cole dlrd...@aol.com wrote:
 
 Is there a MAKEFLAGS or CTEST_BUILD_FLAGS in your environment?
 
 Where does the -j16 come from? (CTest should not be injecting that
 unless you are telling it to somehow, so it either comes from one of
 your scripts, or your environment...)
 
 grep for just \-j -- the value 16 may come from a variable evaluation.
 
 
 HTH,
 David C.
 
 
 On Thu, Jun 18, 2015 at 8:51 AM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 We have a nightly build for our project as reported here 
 http://my.cdash.org/viewBuildError.php?buildid=781789 which is 
 producing an error. The short of it is that CTest is using xcodebuild 
 (which is correct) but is trying to pass the “-j16” style that normal 
 “MakeFiles” would use. I have looked through our CTest scripts (Which 
 were adapted from VTK’s nightly builds) but I am not seeing anything 
 about that flag being explicitly called out.
 
 Could anyone with nightly build experience help us out?
 
 Thanks
 Mike Jackson
 BlueQuartz Software
 --
 
 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

Re: [CMake] Xcode project generation failed

2015-06-17 Thread Michael Jackson

On Jun 16, 2015, at 3:27 PM, Gregor Jasny gja...@googlemail.com wrote:

 Hello,
 
 I applied some fixes to what becomes CMake 3.3. could you please test
 the release candidate?
 
 On 16/06/15 16:27, Michael Jackson wrote:
 Running OS X 10.8.5 with Xcode 5.1.1 and Cmake 3.2.x and 3.3.RC and neither 
 generate a Xcode project file that can be opened by Xcode. We get valid 
 Ninja and Makefile projects for our project. I was wondering if anyone else 
 has seen this issue. Not sure if there is something in our project that is 
 hanging up CMake.
 
 Could you share your project.pbxproj file (if don't want to share it
 here you could also mail it to me directly).
 
 Thanks,
 Gregor

Just to follow up with this issue in case anyone else has issues with Xcode 
here is what happened. Thanks to Gregor for taking a look at the generated 
project file he was able to identify an issue where there were file paths in 
the form of // inside the project file. They specifically showed in the form 
of: /* // */. This was enough to throw the Xcode parser and send Xcode into the 
spin-of-death. The root cause of the issue is that I had a cmake variable that 
held all my source files. In that list was a file path, where the path was 
completely created through cmake variables,

set(FOO_FILE ${SomethingLib_path}/${SOME_HEADER_PATH})

but neither of those variables had been defined for this project. (Copy paste 
mistake). This resulted in the cmake variable (FOO_FILE from above) being empty 
but still included as a source in the add_library() call. Fixing the cmake 
variables fixed the Xcode generation issue.

I also want to recognize git for being helpful in all of this which allowed 
to quickly figure out which commit broke the Xcode functionality.

Hope this helps someone in the future.
Mike Jackson

-- 

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] Xcode project generation failed

2015-06-16 Thread Michael Jackson
Running OS X 10.8.5 with Xcode 5.1.1 and Cmake 3.2.x and 3.3.RC and neither 
generate a Xcode project file that can be opened by Xcode. We get valid Ninja 
and Makefile projects for our project. I was wondering if anyone else has seen 
this issue. Not sure if there is something in our project that is hanging up 
CMake.

Thanks for any insights.
Mike Jackson
BlueQuartz Software.
-- 

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] [ANNOUNCE] CMake 3.3.0-rc1 is now ready!

2015-06-08 Thread Michael Jackson
We are very interested in using the include-what-you-use functionality. Is
there a wiki page or something that can help us get all the dependencies
setup, compiled and working.


Thanks
Mike Jackson


-Original Message-
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Robert Maynard
Sent: Friday, June 5, 2015 9:03 AM
To: CMake MailingList
Subject: [CMake] [ANNOUNCE] CMake 3.3.0-rc1 is now ready!

I am proud to announce the first CMake 3.3 release candidate.

Sources and binaries are available at:
  http://www.cmake.org/download/

Documentation is available at:
  http://www.cmake.org/cmake/help/v3.3

Release notes appear below and are also published at
  http://www.cmake.org/cmake/help/v3.3/release/3.3.html

Some of the more significant features of CMake 3.3 are:

* The if() command learned a new IN_LIST operator that evaluates
  to true if a given element is contained in a named list.

* The add_dependencies() command learned to allow dependencies to
  be added to *interface libraries*. Dependencies added to an
  interface library are followed transitively in its place since the
  target itself does not build.

* The find_library(), find_path(), and find_file() commands
  now search in installation prefixes derived from the PATH
  environment variable.

* The LANG_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN
  target properties now affect compilation in sources of all target
  types.  See policy CMP0063.

* A LANG_INCLUDE_WHAT_YOU_USE target property and supporting
  CMAKE_LANG_INCLUDE_WHAT_YOU_USE variable were introduced to tell
  the *Makefile Generators* and the Ninja generator to run include-
  what-you-use along with the compiler for C and CXX languages.

Deprecated and Removed Features:

* The ctest_build() and build_command() commands no longer tell
  make tools to ignore errors with the -i option. Previously this
  was done for *Makefile Generators* but not others. See policy
  CMP0061.

* The Visual Studio 7 generator (.NET 2002) is now deprecated and
  will be removed in a future version of CMake.

* The Visual Studio 6 generator is now deprecated and will be
  removed in a future version of CMake.

* The add_definitions() command no longer causes a DEFINITIONS
  directory property to be populated. See policy CMP0059.


CMake 3.3 Release Notes
***

Changes made since CMake 3.2 include the following.


New Features



Generators
--

* The *Makefile Generators* now add .DELETE_ON_ERROR to the
  makefiles that contain the actual build rules for files on disk.
  This tells GNU make to remove rule outputs when their recipe
  modifies an output but fails.

* The *Visual Studio Generators* learned to support .xaml source
  files and automatically associate them with corresponding .h and
  .cpp sources.

* A new experimental Green Hills MULTI generator was added on
  Windows.  Green Hills MULTI is an IDE for embedded real-time
  systems.


Commands


* The add_dependencies() command learned to allow dependencies to
  be added to *interface libraries*. Dependencies added to an
  interface library are followed transitively in its place since the
  target itself does not build.

* The execute_process() command learned to support specifying the
  same file for OUTPUT_FILE and ERROR_FILE.

* The file(GLOB) and file(GLOB_RECURSE) commands learned a new
  LIST_DIRECTORIES bool option to specify whether the glob result
  should include directories.

* The find_library(), find_path(), and find_file() commands
  now search in installation prefixes derived from the PATH
  environment variable.

* The if() command learned a new IN_LIST operator that evaluates
  to true if a given element is contained in a named list.

* The install(EXPORT) and export() commands learned to export
  targets that populate the INTERFACE_SOURCES target property.

* The install(TARGETS) command learned to support generator
  expressions in the DESTINATION value.


Variables
-

* The version of some Fortran compilers is now detected and stored
  in the CMAKE_Fortran_COMPILER_VERSION variable.

* The *Visual Studio Generators* learned a new
  CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD option to put the
  INSTALL target in the default build of a solution (.sln) file.


Properties
--

* A CROSSCOMPILING_EMULATOR target property and supporting
  CMAKE_CROSSCOMPILING_EMULATOR variable were introduced to allow
  target platform binaries to run on the host during cross compiling.

* A LANG_INCLUDE_WHAT_YOU_USE target property and supporting
  CMAKE_LANG_INCLUDE_WHAT_YOU_USE variable were introduced to tell
  the *Makefile Generators* and the Ninja generator to run include-
  what-you-use along with the compiler for C and CXX languages.

* The LANG_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN
  target properties now affect compilation in sources of all target
  types.  See policy CMP0063.

* The XCODE_ATTRIBUTE_an-attribute target property learned to
  support 

[CMake] Trouble getting install script to actually run during packaging

2015-05-14 Thread Michael Jackson
I have a bit of Cmake code that I can not seem to figure out how to get to
actually run during cpack. HEre is the code:


  GET_FILENAME_COMPONENT (SELF_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
  configure_file(${SELF_DIR}/Deploy_ITK_Libs.sh.in
 ${DREAM3DProj_BINARY_DIR}/Deploy_ITK_Libs.sh @ONLY
IMMEDIATE)
  FILE(WRITE ${DREAM3DProj_BINARY_DIR}/Deploy_ITK_Libs.cmake
execute_process(COMMAND \/bin/bash
${DREAM3DProj_BINARY_DIR}/Deploy_ITK_Libs.sh \${CMAKE_INSTALL_PREFIX}\) )
  FILE(APPEND ${DREAM3DProj_BINARY_DIR}/Deploy_ITK_Libs.cmake
\n\nMESSAGE(STATUS \@ THIS IS DONE @@@\)\n)


  INSTALL(CODE execute_process(COMMAND \/bin/bash
${DREAM3DProj_BINARY_DIR}/Deploy_ITK_Libs.sh \${CMAKE_INSTALL_PREFIX}\)
  COMPONENT Applications)
  install(SCRIPT ${DREAM3DProj_BINARY_DIR}/Deploy_ITK_Libs.cmake
COMPONENT Applications)

After I build I run cpack from the command line. I see _other_ scripts
that I have configured run but not _this_ script. I have verified that the
cmake code is actually executing as I get a new script file each time I run
cmake. I am sure I am missing something simple at this point but I just can
not see it.

This is on Linux Mint 17.x with CMake 3.1.0.

Thanks for any help
_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio
-- 

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

  1   2   3   4   5   6   7   8   9   >