Re: [CMake] Forcing CMake to rerun

2015-12-13 Thread Jakob van Bethlehem
Hej,

My first guess would be to have a look at the add_custom_command() function. 
One of the possible invocations of that function creates a target of which the 
outputs are always considered out-of-date (well, if memory serves me correctly, 
it seems cmake.org is currently down so I can’t double check).

Anyways, if the ‘command’ you wish to run is actually a CMake script, have a 
look at the ‘cmake -P’ option. This allows you to run CMake scripts as a custom 
command.

Sincerely,
Jakob

> On 10 Dec 2015, at 22:26, Nicholas Clark  wrote:
> 
> Hi all,
> 
> I'm working on using CMake to create a build system that targets an 
> incredibly hard-to-deal-with IDE/build system, used for doing some embedded 
> programming (Xilinx's Vivado suite).
> 
> One of the pieces I need to get working is a conditional dependency between 
> two files (a project-file generator script that gets archived in Git, and the 
> actual project files that get generated).
> 
> The graph basically looks like this:
> 
> Path 1: .tcl file (in Git) -> .xpr file (used by IDE)
> Path 2: .xpr file (after a user changes something in the IDE) -> .tcl file 
> (needs to be regenerated)
> 
> So on any clean build, the source-controlled TCL file autogenerates a bunch 
> of required project files. On iterative builds at a developer's desk, he 
> might change some IDE setting and then the TCL file needs to be regenerated 
> (without triggering a rebuild of the project files as well). It's kind of a 
> conditional and/or psuedo-circular dependency.
> 
> In pure GNU Make, I can express a conditional dependency with an 'if' 
> statement that uses timestamp checks. It's also easy for me to express this 
> dependency in CMakeLists.txt - I can check the file timestamps, and I can 
> conditionally emit the relevant custom_target/custom_rule. 
> 
> That only works when CMakeLists.txt gets parsed, however. Is there any way 
> for me to force a CMake-generated Makefile to _always_ rerun CMake before 
> trying to build the 'all' target? If not, is there any other clever way that 
> I could express this conditional dependency?
> 
> -Nick
> 
> 
> 
> -- 
> 
> 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] what options

2015-12-13 Thread Owen Hogarth II
If you have a cmake project, what's the way to see what type of
configuration options are available?

For example I know that I can pass -DCMAKE_PREFIX_PATH the set where the
project will be installed.

Sometimes project creators add other things, such as building static or
share libraries, SSE, NEON or other flags like those.

Is there a way to have cmake show all of those that the current project has
exposed?
-- 

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-developers] Create subdirectories in Resource directory for Frameworks and Application bundle.

2015-12-13 Thread Gregor Jasny via cmake-developers
On 11/12/15 22:16, Clinton Stimpson wrote:
>> To enable iOS build, I'm using following settings in CMakeLists.txt:
>> > 
>> > 
>> > set(APPLE_PLATFORM "iphonesimulator")
>> > set(CMAKE_OSX_SYSROOT
>> > "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platf
>> > orm/Developer/SDKs/iPhoneSimulator.sdk")
>  set(CMAKE_C_FLAGS "-isysroot
>> > ${CMAKE_OSX_SYSROOT} -mios-version-min=7.0") set(CMAKE_CXX_FLAGS "-isysroot
>> > ${CMAKE_OSX_SYSROOT} -mios-version-min=7.0") 
>> > Do you think it should be documented?

As far as I see one should create a Toolchain file for all Apple SDKs
(also macosx) because one has to modify header and library lookup paths
to not look into /usr. See for example
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/RunCMake/XcodeProject/osx.cmake;hb=HEAD

I planned to create an official macosx, iphone, etc. Toolchain files for
CMake but did not find the time to work on it.

Thanks,
Gregor
-- 

Powered by www.kitware.com

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

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

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

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

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


[cmake-developers] CMakeFindDependencyMacro limitations

2015-12-13 Thread Roger Leigh
I've run into a few limitations in find_dependency.  I'm not sure if 
these are by design or could be fixed, so this is really a request for 
further explanation or design rationale.


The first issue is this:

  if (NOT ${dep}_FOUND)

This seems to be making the assumption that the found variable matches 
the dependency name, but the case used varies between modules and the 
name is case sensitive, from my reading of cmake-language.  Is this 
correct?  Even if so, should this optimisation be put here rather than 
in find_package itself?  If case sensitivity/naming is an issue, could 
the _FOUND variable be passed in as an argument, leaving the existing 
behaviour as the default if unspecified?


The reason for stripping EXACT isn't clear.  If my package has a strict 
requirement on another package, whether the caller has an exact 
requirement for the version of my package has no bearing on the 
requirements I have for my dependencies as far as I understand.  What's 
the reason for the existing behaviour?


Support for find_package arguments is limited to the dependency name and 
optionally the version.  I can understand why REQUIRED and related 
arguments are omitted--that is why find_dependency exists--but I'd quite 
like to be able to specify COMPONENTS where needed e.g. with FindBoost, 
and this is not currently possible.


I was wondering if we could perhaps make find_dependency handle and pass 
through /all/ find_package arguments, minus REQUIRED/QUIET, so that 
find_dependency can expose the additional functionality offered by 
find_package.  Some may not be useful, in which case they could be 
omitted, but some like COMPONENTS may be required for the find_package 
call to be useful.



Regards,
Roger
--

Powered by www.kitware.com

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

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

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

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

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


Re: [cmake-developers] Create subdirectories in Resource directory for Frameworks and Application bundle.

2015-12-13 Thread Gregor Jasny via cmake-developers
On 11/12/15 20:21, clin...@elemtech.com wrote:
> - On Dec 11, 2015, at 11:44 AM, Bartosz Kosiorek  
> wrote: 
>> Because there is difference between OS X and iOS Bundles directory structure
>> (see: Apple specification
>> https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html
>> ),
>> in trunk (In CMake 3.5) RESOURCE property create corresponding directory
>> structure.
>> I have already fix that with:
>> https://public.kitware.com/Bug/view.php?id=15848
> 
> Ok. I hadn't been following all your work. 
> Also, I didn't see a toggle in the CMake code you sent to choose an iOS 
> bundle instead of OS X bundles. How is that toggled? 

See cmMakefile::PlatformIsAppleIos()
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmMakefile.cxx;h=1b0a99ae84932af665360f63bf8bba8d7663ef8e;hb=HEAD#l2404

Basically it's looking at the CMAKE_OSX_SYSROOT variable.

-Gregor
-- 

Powered by www.kitware.com

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

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

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

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

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


[CMake] NO_SYSTEM_ENVIRONMENT_PATH globally?

2015-12-13 Thread Ray Donnelly
Hi,

I ran into a problem on MSYS2 recently building llvm+clang for
mingw-w64 using CMake 3.4.1 (we carry a few local patches, they're
fairly minor, except the qt5-static one, and I don't think they are
likely related to this:
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-cmake)

MSYS2 has two shells .. actually it's 3 or 4, but for simplicity we'll
ignore the 32-bit ones and pretend there's only 2 64-bit shells, one
launched with msys2_shell.bat and one launched with mingw64_shell.bat.
Under msys2_shell.bat, the "/mingw64/bin" folder doesn't appear at all
in PATH, while under mingw64_shell.bat, it appears at the very front,
before "/usr/bin" (which contains the msys2 software).

When running CMake to configure the build for libclang, it tries to
see if if can find libdl with "find_library (DL_LIBRARY_PATH dl)".
Unfortunately it finds the msys-2.0.dll-linked libdl.a in /usr/lib
because NO_SYSTEM_ENVIRONMENT_PATH isn't set, which isn't then in
/mingw64/bin/g++.exe's linker search path (and even if it was, we
don't want to link msys-2.0.dll software into native software!).

I wondered what the recommended approach is for handling this
scenario? Clearly we need msys2 software to be in our PATH (ls, bash,
etc, etc), but it seems CMake is keen to look in a lot of places to
find libraries (AFAICT, it takes each element in PATH and appends
../lib to it then looks in there with the usual prefix/suffix rules)
..

>From our perspective, as MSYS2 is a distro employing a prefix, we'd be
happy for only that to be searched in for libraries. Is there
something that can accommodate for this already? Clearly, patching
each occurrence of find_library isn't something I can entertain, so
I'd like to make a change to how CMake itself behaves somehow. If you
can guide me on an acceptable way to achieve this I'd like to try to
come up with a patch.

--
Best regards,

Ray Donnelly.
-- 

Powered by www.kitware.com

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

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

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

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

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


[Cmake-commits] CMake branch, master, updated. v3.4.1-698-gb970185

2015-12-13 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  b97018534fbb4ce238561a1363f2698526bcda31 (commit)
  from  ac6025c5ff9a24a6a03b225c0b02ce67d65013d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b97018534fbb4ce238561a1363f2698526bcda31
commit b97018534fbb4ce238561a1363f2698526bcda31
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Mon Dec 14 00:01:05 2015 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Dec 14 00:01:05 2015 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index cd46853..4e596d9 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 4)
-set(CMake_VERSION_PATCH 20151213)
+set(CMake_VERSION_PATCH 20151214)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Parallel jobs failed for cmake

2015-12-13 Thread Igor Sobinov
 Hello Bill,

Thanks, that's clear.

So, If I write in makefile


build_release: $(RELEASE_DIR)
    @cd $(RELEASE_DIR); $(MAKE) release

I got an error

Also if I write build_release: $(RELEASE_DIR)
    $(MAKE) release -C   $(RELEASE_DIR)

I got an error too

But this is successfull command:
# cd $ RELEASE_DIR; make release -j10

Why make doesn't support jobs for subdirs?


>Пятница, 11 декабря 2015, 14:14 -05:00 от Bill Hoffman 
>:
>
>On 12/11/2015 7:24 AM, Igor Sobinov wrote:
>> Hello Bill,
>>
>> yes, make release is a custom command but that's not important.
>> I do the following:
>> # cd /home/igor/build_root/release_target
>> # make release -j5
>Yes, it is important, it is the reason it is not working.  The custom 
>command needs to use $(MAKE) and not make to call make or you will get 
>this error.  Child make calls need environment variables to get parallel 
>builds to work.  The MAKE env var is used to pass them around.
>
>-Bill
>


Bye, Igor

-- 

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