Bill Hoffman escreveu:
> Do you have environment variables CFLAGS and CXXFLAGS set to have just a
> space? Also, what OS/compiler are you using?
No, those variables are empty. Here's my configuration
[EMAIL PROTECTED] ~ $ cmake --version
cmake version 2.5-20071212
[EMAIL PROTECTED] ~ $ echo X${
David Cole escreveu:
> What about:
> MESSAGE("X${CMAKE_CXX_FLAGS}X")
Same thing.
> There is nothing in CMAKE_CXX_FLAGS -- it's just the behavior of MESSAGE
> when you pass it a list instead of a single string...
I think there is... another proof:
if(${CMAKE_CXX_FLAGS} STREQUAL " ")
MESSAGE(
Bill Hoffman escreveu:
What is in your CMakeCache.txt file?
Also, does this happen with a very simple one line cmakelist.txt file?
add_library(foo.cxx)
(of course you will have to create an empty foo.cxx)
I always test with a clean CMakeCache.txt (i.e., without it), and don't
even add a lib
Bill Hoffman escreveu:
Can you give an example that shows the unwanted semicolons?
For sure. Here's the setup:
test.c:
int main() {}
CMakeLists.txt:
list(APPEND CMAKE_C_FLAGS -Wall)
add_executable(test test.c)
when we run make, we have:
gcc: no input files
/bin/sh: -Wall: not found
make[2]:
Bill Hoffman escreveu:
OK, Dave Cole, just pointed out that list is the wrong thing to use
here. The CMAKE_C_FLAGS variable is supposed to be a string and not a
list. If you used list(APPEND more than once it would always fail. So,
although odd that it has a space in it, it is benign. You sh
Brandon Van Every escreveu:
On Dec 14, 2007 7:43 AM, Rodolfo Lima <[EMAIL PROTECTED]> wrote:
If CMAKE_CXX_FLAGS is actually null, then your script should terminate
with an error. Correct syntax is either plain CMAKE_CXX_FLAGS or
"${CMAKE_CXX_FLAGS}". What you've written would work only if th
I've managed to debug and correct this 'bug'. The bug report is at:
http://www.cmake.org/Bug/view.php?id=6167
I really think that compiler flags should be treated like a list of
flags instead of a string because this way, IMHO, it's easier to deal
with space in flag parameters etc, to add a flag t
Rodolfo Lima wrote:
David Cole escreveu:
What about:
MESSAGE("X${CMAKE_CXX_FLAGS}X")
Same thing.
There is nothing in CMAKE_CXX_FLAGS -- it's just the behavior of MESSAGE
when you pass it a list instead of a single string...
I think there is... another proof:
if(${CMAKE_CXX_FLAGS} STREQUAL
Rodolfo Schulz de Lima wrote:
//Flags for C compiler.
CMAKE_C_FLAGS:STRING=' '
The same happens with cmake-2.4.7
So it does! I just checked on a linux system...
So, lets get back to the original problem...
Hi, I've being trying cmake 2.5 from CVS and I've come with some
unwanted semicolo
Rodolfo Schulz de Lima wrote:
Bill Hoffman escreveu:
Can you give an example that shows the unwanted semicolons?
For sure. Here's the setup:
test.c:
int main() {}
CMakeLists.txt:
list(APPEND CMAKE_C_FLAGS -Wall)
add_executable(test test.c)
OK, list append is having the problem. I will t
Bill Hoffman wrote:
CMakeLists.txt:
list(APPEND CMAKE_C_FLAGS -Wall)
add_executable(test test.c)
OK, list append is having the problem. I will try and figure out why
it has the space. For now, you could try this:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
OK, Dave Cole, just pointed o
On Dec 14, 2007 2:34 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote:
> So, although odd that it has a space in it, it is benign.
It's malignant from the standpoint of IF. CMAKE_C_FLAGS is being
initialized to a nonempty string. That means
if(CMAKE_C_FLAGS) will succeed. Should file a bug or fix it.
On Dec 14, 2007 7:43 AM, Rodolfo Lima <[EMAIL PROTECTED]> wrote:
>
> I think there is... another proof:
>
> if(${CMAKE_CXX_FLAGS} STREQUAL " ")
> MESSAGE("equal!")
> else(${CMAKE_CXX_FLAGS} STREQUAL " ")
> MESSAGE("not equal!")
> endif(${CMAKE_CXX_FLAGS} STREQUAL " ")
>
> This returns "equa
Brandon Van Every wrote:
On Dec 14, 2007 2:34 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote:
So, although odd that it has a space in it, it is benign.
It's malignant from the standpoint of IF. CMAKE_C_FLAGS is being
initialized to a nonempty string. That means
if(CMAKE_C_FLAGS) will succeed. S
On Dec 14, 2007 3:01 PM, Rodolfo Schulz de Lima <[EMAIL PROTECTED]> wrote:
> Bill Hoffman escreveu:
> > OK, Dave Cole, just pointed out that list is the wrong thing to use
> > here. The CMAKE_C_FLAGS variable is supposed to be a string and not a
> > list. If you used list(APPEND more than once it
15 matches
Mail list logo