[CMake] CMake Error: Attempt at a recursive or nested TRY_COMPILE in directory

Brad King brad.king at kitware.com
Tue Jun 13 06:22:39 EDT 2006


Bernd Schubert wrote:
> Hello Alex, hello Brad,
> 
> thanks a lot for your help.
> 
>> You are trying to put the build tree of the try-compile test on top of
>> the main build tree.  Try this:
> 
> Ah, I begin to understand.
> 
>> TRY_COMPILE(C_MAKE_COMPILER_WORKS
>>              ${CMAKE_BINARY_DIR}/CMakeTmp
>>              ${PROJECT_SOURCE_DIR}/CMake_Modules/Test_64_Bit_Offset.c
>>              OUTPUT_VARIABLE_OUTPUT)
>>
>> However, you may want to look at the CheckCSourceCompiles module.
> 
> I already switched to this module and it works fine.
> So the example in the book is slightly wrong. Is this already fixed in the new  
> version (for CMake-2.2)? Or to whom should I send a report.

I'll check to make sure this is fixed.

Thanks,
-Brad


More information about the CMake mailing list