[CMake] Add suppport for new IDE

2015-10-31 Thread forumer

Hi,

I would like to add some support for generating makefiles/IDE solutions 
for the D language (http://dlang.org).
Especially I would like to be able to generate VisualD and monoD 
projects.
The language is hold inside files with a .d extension and that can be 
compiled by 3 differents compilers:


1)dmd: the official compiler
2)gdc: compiler based on gcc
3)ldc: compiler based on llvm


There is already a kind of makefile system called dub that build 
libraries/application but it cannot generate ide projects.
So in a perfect world it would be cool to add support for dub makefile, 
VisualD and MonoD.


Is there any example about how to do that ?
Do you support other languages except C/C++ ?



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] add_custom_command not triggered

2015-10-31 Thread Nico Schlömer
After downloading a file with ExternalData_Expand_Arguments [1], I would
like to execute a command on the data to produce another file. So far, I
have
```
ExternalData_Expand_Arguments(
  noshTestFetchData
  OUT_DATA DATA{${CMAKE_SOURCE_DIR}/test/data/${file}}
)
ExternalData_Add_Target(noshTestFetchData)

add_custom_command(
  OUTPUT ${CMAKE_BINARY_DIR}/test/data/pacman.e.2.0
  COMMAND decomp -p 2 ${CMAKE_BINARY_DIR}/test/data/pacman.e
  DEPENDS noshTestFetchData
)
```
The file is downloaded alright, but the `add_custom_command` is never
triggered. Why not?

This is with CMake 3.2.2.

Cheers,
Nico

[1] https://cmake.org/cmake/help/v3.3/module/ExternalData.html
-- 

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] add_custom_command not triggered

2015-10-31 Thread Nils Gladitz

On 31.10.2015 15:49, Nico Schlömer wrote:


add_custom_command(
  OUTPUT ${CMAKE_BINARY_DIR}/test/data/pacman.e.2.0
  COMMAND decomp -p 2 ${CMAKE_BINARY_DIR}/test/data/pacman.e
  DEPENDS noshTestFetchData
)



I don't know anything about the ExternalData module but assuming this is 
unrelated ...


do you have a target that depends on the new output?
Without one the custom command does not get emitted.

E.g. add_custom_target(foobar ALL DEPENDS 
${CMAKE_BINARY_DIR}/test/data/pacman.e.2.0)
or list it in the sources of an existing add_executable() or 
add_library() target.


Nils
--

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] add_custom_command not triggered

2015-10-31 Thread David Cole via CMake
Oh wait, I read it wrong...

Try ${} to get the value of the variable. (It contains a file name, right?)


D



On Saturday, October 31, 2015, David Cole  wrote:

> Because you're giving DEPENDS as a target name, this is only an ordering
> dependency, stating that the command should run after the target is built.
> But not necessarily re-build whenever the target is re-built...
>
> If you want to re-run the command based on a file changing instead, then
> use the full path to a file name as your DEPENDS argument. The downloaded
> file itself, or the extracted data file the command uses would probably be
> reasonable choices.
>
> Read the DEPENDS section of
> https://cmake.org/cmake/help/v3.3/command/add_custom_command.html
> carefully.
>
>
> HTH,
> David C.
>
>
> On Saturday, October 31, 2015, Nico Schlömer  > wrote:
>
>> After downloading a file with ExternalData_Expand_Arguments [1], I would
>> like to execute a command on the data to produce another file. So far, I
>> have
>> ```
>> ExternalData_Expand_Arguments(
>>   noshTestFetchData
>>   OUT_DATA DATA{${CMAKE_SOURCE_DIR}/test/data/${file}}
>> )
>> ExternalData_Add_Target(noshTestFetchData)
>>
>> add_custom_command(
>>   OUTPUT ${CMAKE_BINARY_DIR}/test/data/pacman.e.2.0
>>   COMMAND decomp -p 2 ${CMAKE_BINARY_DIR}/test/data/pacman.e
>>   DEPENDS noshTestFetchData
>> )
>> ```
>> The file is downloaded alright, but the `add_custom_command` is never
>> triggered. Why not?
>>
>> This is with CMake 3.2.2.
>>
>> Cheers,
>> Nico
>>
>> [1] https://cmake.org/cmake/help/v3.3/module/ExternalData.html
>>
>
-- 

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

2015-10-31 Thread Alan W. Irwin

On 2015-10-30 19:59-0600 Orion Poplawski wrote:


On 10/22/2015 11:30 AM, Brad King wrote:

[...]

Where Plplot currently writes:

   SET(CMAKE_Ada_COMPILE_OBJECT
 "  -c  -o 
 ")

try:

   if(NOT CMAKE_VERSION VERSION_LESS 3.4)
 set(CMAKE_Ada_COMPILE_OBJECT
   "   -c  -o ")
   else()
 set(CMAKE_Ada_COMPILE_OBJECT
   "  -c  -o ")
   endif()

-Brad



Ah, thank you very much.  The attached patch fixes this.


Hi Orion:

Thanks for implementing Brad's suggestion to fix the PLplot Ada
language support issue for CMake-3.4.  To help give you PLplot git
credit for your work, would you please put the patch in "git
format-patch" form?

I also notice substantial use of  in the PLplot D language
support case. I assume your tests did not reveal any issues for D
because you were not trying any D compiler flags, but I predict if you
do that, you will encounter the same problem.  For example, if you try

export DFLAGS=-Iwhatever

I assume that (harmless) compile flag will correctly propagate to the D compile 
step (as seen
by the VERBOSE=1 option for make) for older versions of CMake but will
not propagate correctly for CMake-3.4.

Anyhow, I am virtually positive there is also a PLplot  D
language support issue for CMake-3.4 so if you don't beat me to it, I
plan (likely late next week because I am currently tied up with
something else) to expose that issue with a test like the one I
suggested above and also plan to fix the issue following Brad's
suggestion.

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] add_custom_command not triggered

2015-10-31 Thread David Cole via CMake
Because you're giving DEPENDS as a target name, this is only an ordering
dependency, stating that the command should run after the target is built.
But not necessarily re-build whenever the target is re-built...

If you want to re-run the command based on a file changing instead, then
use the full path to a file name as your DEPENDS argument. The downloaded
file itself, or the extracted data file the command uses would probably be
reasonable choices.

Read the DEPENDS section of
https://cmake.org/cmake/help/v3.3/command/add_custom_command.html carefully.


HTH,
David C.


On Saturday, October 31, 2015, Nico Schlömer 
wrote:

> After downloading a file with ExternalData_Expand_Arguments [1], I would
> like to execute a command on the data to produce another file. So far, I
> have
> ```
> ExternalData_Expand_Arguments(
>   noshTestFetchData
>   OUT_DATA DATA{${CMAKE_SOURCE_DIR}/test/data/${file}}
> )
> ExternalData_Add_Target(noshTestFetchData)
>
> add_custom_command(
>   OUTPUT ${CMAKE_BINARY_DIR}/test/data/pacman.e.2.0
>   COMMAND decomp -p 2 ${CMAKE_BINARY_DIR}/test/data/pacman.e
>   DEPENDS noshTestFetchData
> )
> ```
> The file is downloaded alright, but the `add_custom_command` is never
> triggered. Why not?
>
> This is with CMake 3.2.2.
>
> Cheers,
> Nico
>
> [1] https://cmake.org/cmake/help/v3.3/module/ExternalData.html
>
-- 

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] add_dependencies being ignored for add_custom_command?

2015-10-31 Thread Iosif Neitzke
Yes, Header.hpp will be generated before the target is built.  I do
not believe the order of files listed in add_library() matters at all.

On Mon, Oct 26, 2015 at 5:31 PM, Martin Braun  wrote:
> Gotcha, Iosif,
>
> thanks for clearing that up for me. To summarize, I should ...
>
> On 26.10.2015 12:51, Iosif Neitzke wrote:
>> [...]
>> add_library( somelib ${CMAKE_CURRENT_BINARY_DIR}/Header.hpp
>> ${CMAKE_CURRENT_BINARY_DIR}/Header.cpp source.cpp )
>
> ...add the generated files as to the target.
>
> That leads me to another question, though (hopefully the last): If
> source.cpp depends on Header.hpp, is it guaranteed that Header.hpp will
> be generated before the compiler tries to compile source.cpp? Does the
> list order of the files inside add_library() matter?
>
> Cheers,
> Martin
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

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-developers] [CMake 0015823]: FIND_LIBRARY & TARGET_LINK_LIBRARIES

2015-10-31 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=15823 
== 
Reported By:Anthony Ette
Assigned To:
== 
Project:CMake
Issue ID:   15823
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2015-10-31 14:46 EDT
Last Modified:  2015-10-31 14:46 EDT
== 
Summary:FIND_LIBRARY & TARGET_LINK_LIBRARIES
Description: 
On version 3.3.20150618.
I am not understanding the behavior of these two commands or am getting
inconsistent results.  Sometimes when the results of a found static library from
FIND_LIBRARY are passed to TARGET_LINK_LIBRARIES, it generates "/path/to/lib"
linker syntax BUT other times it produces a "-Wl,-Bstatic -llib -Wl,-Bdynamic"
syntax.  I've confirmed that both lib vars as returned from FIND_LIBRARY are
full paths to .a static archive files so how can the different handling at the
linker CLI be explained?

Steps to Reproduce: 
Unknown.  Some libs are handled one way and others are handled another.  The
only potential lead may be that they come from different paths on the file
system (say one from /usr/lib and another from /sim/lib/v67/ihawk).

Additional Information: 
None
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2015-10-31 14:46 Anthony Ette   New Issue
==

-- 

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