On Monday 08 November 2010 18:10:01 Eric Noulard wrote:
BUT
suppose I decide to set file1.c and file2.c as some variable FILES
and I want to use a preprocessor say DLONG
could I do the following?
set(FILES file1.c file2.c )
SET_SOURCE_FILES_PROPERTIES(${FILES} PROPERTIES
On Saturday 06 November 2010 23:08:29 Eric Noulard wrote:
I think you cannot use **the same** file properties on a source file
and expect CMake will compile the file twice for the same target.
If you want to compile the same source file twice with different compile
flags **FOR THE SAME
2010/11/8 luxInteg lux-in...@btconnect.com:
On Saturday 06 November 2010 23:08:29 Eric Noulard wrote:
I think you cannot use **the same** file properties on a source file
and expect CMake will compile the file twice for the same target.
If you want to compile the same source file twice with
On Monday 08 November 2010 18:10:01 Eric Noulard wrote:
2010/11/8 luxInteg lux-in...@btconnect.com:
On Saturday 06 November 2010 23:08:29 Eric Noulard wrote:
I think you cannot use **the same** file properties on a source file
and expect CMake will compile the file twice for the same
On Monday 08 November 2010 22:21:54 luxInteg wrote:
---
set(RUN oddone.o file2.c file3.c )
LIST CONTAINS(file2.c file3.c ${RUN})
IF (contains )
(--compile file2.c and file3.c into oddone.o )
endif (contains)
-
advice on whether lists of othrwise is
2010/11/8 luxInteg lux-in...@btconnect.com:
If you manipulate list have a look at the CMake builtin LIST command.
I had a look at lists on this page
http://www.cmake.org/Wiki/CMakeMacroListOperations
You should reallty use **builtin** list
Greetings,
I am learning cmake.
I have a question on using add_library. in my project(learnCMAKE). The
latter has:-
---a) 2 source files file1.c file2.c
---b) the envar {CFLAGS} set
---c) need to generate libLearnCMAKE.so and libLearnCMAKE.a
---d) need to add preprocessor agruments
Hi
this three lines should do the job:
CMakeLists.txt:
project(learnCMAKE)
add_definitions(-DXXX -DYYY -DSAMPLE=5)
add_library(learnCMAKE file1.c file2.c)
To build static libraries:
mkdir bldStatic
cd bldStatic
cmake -DBUILD_SHARED_LIBS=off -DCMAKE_BUILD_TYPE=Release ..
make
cd ,,
To build
Hi again,
I'v forgotten the envar question in the mail before.
If you really want to set additional options from outside CMakeLists.txt you
can do this:
add_defintions($ENV{CFLAGS})
using $ENV{} you can access any environment variable.
On Saturday 06 November 2010 17:26:11 luxInteg wrote:
On 11/06/2010 05:26 PM, luxInteg wrote:
Greetings,
I am learning cmake.
I have a question on using add_library. in my project(learnCMAKE). The
latter has:-
---a) 2 source files file1.c file2.c
---b) the envar {CFLAGS} set
---c) need to generate libLearnCMAKE.so and
On Saturday 06 November 2010 17:30:10 Michael Hertling wrote:
On 11/06/2010 05:26 PM, luxInteg wrote:
Greetings,
I am learning cmake.
I have a question on using add_library. in my project(learnCMAKE).
The latter has:-
---a) 2 source files file1.c file2.c
---b) the
On Saturday 06 November 2010 16:27:06 Gerhard Gappmeier wrote:
Hi
this three lines should do the job:
CMakeLists.txt:
project(learnCMAKE)
add_definitions(-DXXX -DYYY -DSAMPLE=5)
add_library(learnCMAKE file1.c file2.c)
To build static libraries:
mkdir bldStatic
cd bldStatic
cmake
On Saturday 06 November 2010 21:55:21 luxInteg wrote:
On Saturday 06 November 2010 17:30:10 Michael Hertling wrote:
On 11/06/2010 05:26 PM, luxInteg wrote:
Greetings,
I am learning cmake.
I have a question on using add_library. in my project(learnCMAKE).
The latter has:-
2010/11/7 luxInteg lux-in...@btconnect.com:
I tried the following:-
ADD_LIBRARY(LearnCMAKE-shared SHARED file1.c file2.c )
ADD_LIBRARY(LearnCMAKE-static STATIC file1.c file2.c )
SET(var )
FOREACH(var DINT DLONG)
SET_SOURCE_FILES_PROPERTIES( file1.c file2.c
PROPERTIES
On Saturday 06 November 2010 23:08:29 Eric Noulard wrote:
2010/11/7 luxInteg lux-in...@btconnect.com:
I tried the following:-
ADD_LIBRARY(LearnCMAKE-shared SHARED file1.c file2.c )
ADD_LIBRARY(LearnCMAKE-static STATIC file1.c file2.c )
SET(var )
FOREACH(var DINT DLONG)
15 matches
Mail list logo