[CMake] set_source_files_properties and custom targets

2018-03-01 Thread Pentecost, Caleb
Howdy, I'm running into an issue with a custom target dependency that I want to assign to all source files. In this case, I have a helper library (lets call it utils) that builds a couple source files that each depend on an output file from a separate process. It would look something like this:

Re: [CMake] set_source_files_properties for includedirectories

2010-11-26 Thread Michael Hertling
On 11/26/2010 09:40 AM, Andrea Galeazzi wrote: > Michael Hertling ha scritto: >> On 11/23/2010 03:23 PM, Andrea Galeazzi wrote: >> >>> Marcel Loose ha scritto: >>> >>> On 23-11-2010 at 10:55, in message<4ceb8f76.80...@korg.it>, Andrea >>> >>> Galeazzi

Re: [CMake] set_source_files_properties for includedirectories

2010-11-26 Thread Andrea Galeazzi
Michael Hertling ha scritto: On 11/23/2010 03:23 PM, Andrea Galeazzi wrote: Marcel Loose ha scritto: On 23-11-2010 at 10:55, in message <4ceb8f76.80...@korg.it>, Andrea Galeazzi

Re: [CMake] set_source_files_properties for includedirectories

2010-11-25 Thread Michael Hertling
On 11/23/2010 03:23 PM, Andrea Galeazzi wrote: > Marcel Loose ha scritto: > On 23-11-2010 at 10:55, in message <4ceb8f76.80...@korg.it>, Andrea > >> Galeazzi >> wrote: >> >>> In a project I've got two groups of files having different include >>> paths. These paths have some c

Re: [CMake] set_source_files_properties for includedirectories

2010-11-23 Thread Andrea Galeazzi
Marcel Loose ha scritto: On 23-11-2010 at 10:55, in message <4ceb8f76.80...@korg.it>, Andrea Galeazzi wrote: In a project I've got two groups of files having different include paths. These paths have some conflicts so I need to specify just one for each file requires i

Re: [CMake] set_source_files_properties for include directories

2010-11-23 Thread Marcel Loose
>>> On 23-11-2010 at 10:55, in message <4ceb8f76.80...@korg.it>, Andrea Galeazzi wrote: > In a project I've got two groups of files having different include > paths. These paths have some conflicts so I need to specify just one > for each file requires it. > My first idea was to apply set_sour

[CMake] set_source_files_properties for include directories

2010-11-23 Thread Andrea Galeazzi
In a project I've got two groups of files having different include paths. These paths have some conflicts so I need to specify just one for each file requires it. My first idea was to apply set_source_files_properties with a property like include_directories but I don't find anything similar. M

Re: [CMake] SET_SOURCE_FILES_PROPERTIES different properties for same file, same library

2010-05-12 Thread Eric Noulard
2010/5/12 Michael Wild : > > On 12. May, 2010, at 13:03 , Bryn Lloyd wrote: > >> Hi, >> >> I would like to cmakeify the UMFPACK/AMD libraries by Timothy Davis. >> >> I need to compile the same source file, multiple times, with different >> flags/defines in order to link the resulting object files

Re: [CMake] SET_SOURCE_FILES_PROPERTIES different properties for same file, same library

2010-05-12 Thread Michael Wild
On 12. May, 2010, at 13:03 , Bryn Lloyd wrote: > Hi, > > I would like to cmakeify the UMFPACK/AMD libraries by Timothy Davis. > > I need to compile the same source file, multiple times, with different > flags/defines in order to link the resulting object files into one library. > > something

[CMake] SET_SOURCE_FILES_PROPERTIES different properties for same file, same library

2010-05-12 Thread Bryn Lloyd
Hi, I would like to cmakeify the UMFPACK/AMD libraries by Timothy Davis. I need to compile the same source file, multiple times, with different flags/defines in order to link the resulting object files into one library. something like this: $(CC) -DDINT -c umf_analyze.c -o umf_i_ana

Re: [CMake] set_source_files_properties per configuration

2010-03-23 Thread Simmons, Aaron
>Well, there's this: > >http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_sf:COMPILE_DEFINITIONS_CONFIG Ah, that's what I was looking for. Fortunately I only need to set per-configuration definitions and not full-on compiler args. Thanks. __

Re: [CMake] set_source_files_properties per configuration

2010-03-22 Thread J Decker
On Mon, Mar 22, 2010 at 3:58 PM, Tyler Roscoe wrote: > On Mon, Mar 22, 2010 at 06:40:21PM -0400, Simmons, Aaron wrote: >>         if (CMAKE_BUILD_TYPE STREQUAL Debug) >>             set_source_files_properties( myfile.cpp PROPERTIES COMPILE_FLAGS >> -DMYFLAG=asdf ) >>         endif (CMAKE_BUILD_T

Re: [CMake] set_source_files_properties per configuration

2010-03-22 Thread Tyler Roscoe
On Mon, Mar 22, 2010 at 06:40:21PM -0400, Simmons, Aaron wrote: > if (CMAKE_BUILD_TYPE STREQUAL Debug) > set_source_files_properties( myfile.cpp PROPERTIES COMPILE_FLAGS > -DMYFLAG=asdf ) > endif (CMAKE_BUILD_TYPE STREQUAL Debug) > > However, for multi-configuration bu

[CMake] set_source_files_properties per configuration

2010-03-22 Thread Simmons, Aaron
I have some flags I need to set for certain builds on a single source file. For single-configuration generators (make, nmake) it's easy enough to look at CMAKE_BUILD_TYPE and use set_source_files_properties, like this: if (CMAKE_BUILD_TYPE STREQUAL Debug) set_source_files_prop

Re: [CMake] set_source_files_properties and configurations revisited

2008-08-08 Thread Slavoj Pisek
Hi Xavier, I have a similar problem. And I tried to solve it by adding option COMPILER_FLAGS_ to CMake's source code. There is my patch available at http://public.kitware.com/Bug/view.php?id=6493. I hope you find it useful and the patch will be added to CMake 2.7. Best regards Slavek > Hel

[CMake] set_source_files_properties and configurations revisited

2008-08-06 Thread Janer Xavier
Hello, I'm using CMake 2.6 and MS Visual Studio 2005. I need to set different compile flags to my source files depending on the configuration (debug or release). I've checked the mailing list and I found a thread talking about it (http://www.cmake.org/pipermail/cmake/2006-December/012148.htm

[CMake] SET_SOURCE_FILES_PROPERTIES(foo.c PROPERTIES LANGUAGE CXX) vs foo.cpp

2007-04-26 Thread Mathieu Malaterre
just for reference I have added a test case for this issue here: http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/CMakeBug/1/ replicated with cmake 2.4.5 and cmake CVS - SET_SOURCE_FILES_PROPERTIES(foo.c PROPERTIES LANGUAGE CXX) ADD_LIBRARY(foo SHARED foo.c) CONFIGURE_FILE(${CMAKE_CURRE

Re: [CMake] SET_SOURCE_FILES_PROPERTIES for extra include directories

2007-03-15 Thread Brandon J. Van Every
James Bigler wrote: Is is possible to add include directories for a particular source file? Right now I do: INCLUDE_DIRECTORIES(${Extra_Include_Dir}) But this puts the extra includes on all the files for the libraries in the CMakeLists.txt file. Where is the harm in doing so? Are you havin

[CMake] SET_SOURCE_FILES_PROPERTIES for extra include directories

2007-03-15 Thread James Bigler
Is is possible to add include directories for a particular source file? Right now I do: INCLUDE_DIRECTORIES(${Extra_Include_Dir}) But this puts the extra includes on all the files for the libraries in the CMakeLists.txt file. What I want is to do something like: SET_SOURCE_FILES_PROPERTIE

Re: [CMake] SET_SOURCE_FILES_PROPERTIES in subdir

2007-01-25 Thread Peter Soetens
Quoting Alexander Neundorf <[EMAIL PROTECTED]>: Von: Peter Soetens <[EMAIL PROTECTED]> Hi, I'm having this situation: a source file property is set in a subdir (GENERATED true), but when the source file property is read again in the root directory, it is no longer present on that file. Is th

Re: [CMake] SET_SOURCE_FILES_PROPERTIES in subdir

2007-01-25 Thread Alexander Neundorf
Von: Peter Soetens <[EMAIL PROTECTED]> > Hi, > > I'm having this situation: a source file property is set in a subdir > (GENERATED true), but when the source file property is read again in the > root directory, it is no longer present on that file. Is this intentional > behaviour ? > > It's n

[CMake] SET_SOURCE_FILES_PROPERTIES in subdir

2007-01-25 Thread Peter Soetens
Hi, I'm having this situation: a source file property is set in a subdir (GENERATED true), but when the source file property is read again in the root directory, it is no longer present on that file. Is this intentional behaviour ? It's not documented that the property on files scope is 'local'

Re: [CMake] SET_SOURCE_FILES_PROPERTIES and configurations

2006-12-05 Thread Tristan Carel
On 12/5/06, Luca Cappa <[EMAIL PROTECTED]> wrote: Hello On Tue, 05 Dec 2006 16:57:18 +0100, Tristan Carel <[EMAIL PROTECTED]> wrote: > On 12/5/06, Luca Cappa <[EMAIL PROTECTED]> wrote: >> >> The problem is that I cannot use different flags (perhaps >> _COMPILE_FLAGS) to generate two different p

Re: [CMake] SET_SOURCE_FILES_PROPERTIES and configurations

2006-12-05 Thread Luca Cappa
Hello On Tue, 05 Dec 2006 16:57:18 +0100, Tristan Carel <[EMAIL PROTECTED]> wrote: On 12/5/06, Luca Cappa <[EMAIL PROTECTED]> wrote: The problem is that I cannot use different flags (perhaps _COMPILE_FLAGS) to generate two different precompiled files, one for DEBUG and one for the RELEASE

Re: [CMake] SET_SOURCE_FILES_PROPERTIES and configurations

2006-12-05 Thread Tristan Carel
On 12/5/06, Luca Cappa <[EMAIL PROTECTED]> wrote: Hello, Hi, I am using cmake 2.4.5 with msvc 2005. I am setting this flag for all the source files i want to use precompilated headers with. SET(PREC_FLAG "/Yu") IF(MSVC) FOREACH (FILENAME ${LIB_SRC}) IF ("${FILENAME}" MATCHES "cpp")

[CMake] SET_SOURCE_FILES_PROPERTIES and configurations

2006-12-05 Thread Luca Cappa
Hello, I am using cmake 2.4.5 with msvc 2005. I am setting this flag for all the source files i want to use precompilated headers with. SET(PREC_FLAG "/Yu") IF(MSVC) FOREACH (FILENAME ${LIB_SRC}) IF ("${FILENAME}" MATCHES "cpp") SET_SOURCE_FILES_PROPERTIES(${FILENAME} COMPILE_FLAGS

Re: SPAM-LOW: [CMake] SET_SOURCE_FILES_PROPERTIES GENERATED not working?

2006-04-10 Thread Reggie Burnett
Reggie Burnett wrote: Today we suddenly have a situation where a file that is generated by a tool during building is being looked for by cmake. We have a SET_SOURCE_FILES_PROPERTIES call to set it to GENERATED but we still get an error that the file is not found during cmake process. Are the

[CMake] SET_SOURCE_FILES_PROPERTIES GENERATED not working?

2006-04-10 Thread Reggie Burnett
Today we suddenly have a situation where a file that is generated by a tool during building is being looked for by cmake. We have a SET_SOURCE_FILES_PROPERTIES call to set it to GENERATED but we still get an error that the file is not found during cmake process. Are there any special tricks or

Re: [CMake] SET_SOURCE_FILES_PROPERTIES

2006-03-10 Thread James Bigler
Brad King wrote: James Bigler wrote: I'm using CMake 2.2.3, swig 1.3.28 on Suse Linux 9.3. I want to set a couple of different options for a swig interface file I'm compiling: # This is all on a single line if my email program munges it. SET_SOURCE_FILES_PROPERTIES(manta.i PROPERTIES SWIG_FL

Re: [CMake] SET_SOURCE_FILES_PROPERTIES

2006-03-10 Thread Brad King
James Bigler wrote: I'm using CMake 2.2.3, swig 1.3.28 on Suse Linux 9.3. I want to set a couple of different options for a swig interface file I'm compiling: # This is all on a single line if my email program munges it. SET_SOURCE_FILES_PROPERTIES(manta.i PROPERTIES SWIG_FLAGS "-Wall -DSCI_

[CMake] SET_SOURCE_FILES_PROPERTIES

2006-03-09 Thread James Bigler
I'm using CMake 2.2.3, swig 1.3.28 on Suse Linux 9.3. I want to set a couple of different options for a swig interface file I'm compiling: # This is all on a single line if my email program munges it. SET_SOURCE_FILES_PROPERTIES(manta.i PROPERTIES SWIG_FLAGS "-Wall -DSCI_NOPERSISTENT") Wel

Re: [CMake] SET_SOURCE_FILES_PROPERTIES question

2006-02-07 Thread John Biddiscombe
Bill, Thanks. Works ok with extra source path on both submitted as Bug *#2859 JB *William A. Hoffman wrote: Try using CMAKE_CURRENT_SOURCE_DIR in both the SET and the SET_SOURCE_FILE_PROPERTIES. This does seem to be a bug, and you should report it. Here is an example that works: PROJECT(foo)

Re: [CMake] SET_SOURCE_FILES_PROPERTIES question

2006-02-06 Thread William A. Hoffman
Try using CMAKE_CURRENT_SOURCE_DIR in both the SET and the SET_SOURCE_FILE_PROPERTIES. This does seem to be a bug, and you should report it. Here is an example that works: PROJECT(foo) SET(foosrc subprj/sublib.c) SET_SOURCE_FILES_PROPERTIES( foo.cxx ${CMAKE_CURRENT_SOURCE_DIR}/subprj/sublib.c

[CMake] SET_SOURCE_FILES_PROPERTIES question

2006-02-03 Thread John Biddiscombe
I always seem to have trouble with constructs like this... SET(vtkCSCSNetCDF_SRCS vtkNetCDFReader.cxx netcdfcpp/ncvalues.cpp netcdfcpp/netcdf.cpp ) SET_SOURCE_FILES_PROPERTIES( netcdfcpp/ncvalues netcdfcpp/netcdf WRAP_EXCLUDE ) if the couple of src files I want included are in sub directo