[CMake] TRY_RUN wrong program return value with --debug-compile
Hendrik Sattler
post at hendrik-sattler.de
Tue Jun 3 03:40:08 EDT 2008
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.
> 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.
HS
More information about the CMake
mailing list