[CMake] A question about cache variables

2010-10-26 Thread mina adel


Hi All,
I have a problem with cache variables in cmake.

I want to check the combiler for a certain flag -C99 flag. So, I used the 
following statement
CHECK_C_COMPILER_FLAG(-C99 FLAG_OK)

The problem is that we I ran cmake for the first time it said that c99 is not 
found and set the FLAG_OK variable in CMakeCache.txt to 0.

Now, I fixed the problem =in the compiler to make it support -C99. But cmake 
doesnot check the flag any more and just keep saying not found. This is becuase 
the FLAG_OK is already equals  to 0 in cache file.

Is there any way to delete the cahce variable. or force cmake to check for the 
flag every time I run it?

Thanks for your help
Mina

___
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] A question about cache variables

2010-10-26 Thread mina adel




Hi All,
I have a problem with cache variables in cmake.

I want to check the combiler for a certain flag -C99 flag. So, I used the 
following statement
CHECK_C_COMPILER_FLAG(-C99 FLAG_OK)

The problem is that we I ran cmake for the first time it said that c99 is not 
found and set the FLAG_OK variable in CMakeCache.txt to 0.

Now, I fixed the problem =in the compiler to make it support -C99. But cmake 
doesnot check the flag any more and just keep saying not found. This is becuase 
the FLAG_OK is already equals to 0 in cache file.

Is there any way to delete the cahce variable. or force cmake to check for the 
flag every time I run it?

Thanks for your help
Mina

___
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] A question about cache variables

2010-10-26 Thread Michael Hertling
On 10/26/2010 08:47 PM, mina adel wrote:
 
 
 Hi All,
 I have a problem with cache variables in cmake.
 
 I want to check the combiler for a certain flag -C99 flag. So, I used the 
 following statement
 CHECK_C_COMPILER_FLAG(-C99 FLAG_OK)
 
 The problem is that we I ran cmake for the first time it said that c99 is not 
 found and set the FLAG_OK variable in CMakeCache.txt to 0.
 
 Now, I fixed the problem =in the compiler to make it support -C99. But cmake 
 doesnot check the flag any more and just keep saying not found. This is 
 becuase 
 the FLAG_OK is already equals  to 0 in cache file.
 
 Is there any way to delete the cahce variable. or force cmake to check for 
 the 
 flag every time I run it?

Rerun CMake with -UFLAG_OK or restart from within an empty build
directory or use UNSET(FLAG_OK CACHE) in your CMakeLists.txt, but
note: The purpose of caching is to avoid finding out the concerned
variables' values every time CMake runs, and the capabilities of a
compiler w.r.t. the acceptance of flags usually don't change often.

Regards,

Michael
___
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake