[CMake] TRY_RUN wrong program return value with --debug-compile
Eduardo Alberto Hernández Muñoz
coz.eduardo.hernandez at gmail.com
Tue Jun 3 20:07:08 EDT 2008
Hi,
> Zitat von Eduardo Alberto Hern?ndez Mu?oz <coz.eduardo.hernandez at gmail.com>:
>> I have the file check_openal_spec_version_1_1.cpp which contains:
>>
>> #define AL_VERSION_1_1
>> #define AL_VERSION_1_0
>>
>> int main() {
>>
>> #ifdef AL_VERSION_1_1
>> return 2;
>> #elif AL_VERSION_1_0
>> return 1;
>> #else
>> return -1;
>> #endif
>>
>> }
>
> That elif is wrong if you don't assign a value to the define.
Completely true. Still it's not what is causing my problem :p
>> The interesting part, is that this problem only happens when I pass
>> the --debug-trycompile to cmake. Without the flag, CMake works
>> wonderfully.
>
> That option is known to cause such problems, don't know why.
It's a bother that it causes trouble, because it is pretty useful for
debugging. I'll get the CMake HEAD, and if the problem persists there,
I'll file a bug.
-Coz
More information about the CMake
mailing list