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

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jun 12 15:44:17 EDT 2006


Hi,


Von: Bernd Schubert <bernd-schubert at gmx.de>
> Hi, 
> 
> I'm just beginning to learn CMake and now I'm lost.
> 
> I need to check for large file support and therefore need to use
> TRY_COMPILE. 
> In my main CMakeLists.txt file I tried similar to my Mastering CMake book 
> (for version 2.0):
> 
> TRY_COMPILE(C_MAKE_COMPILER_WORKS
>             ${CMAKE_BINARY_DIR}
>             ${PROJECT_SOURCE_DIR}/CMake_Modules/Test_64_Bit_Offset.c
>             OUTPUT_VARIABLE_OUTPUT)
> 
> bernd at bathl funionfs-0.4>cmake .
> CMake Error: Attempt at a recursive or nested TRY_COMPILE in 
> directory /home/bernd/src/funionfs-0.4
> -- Configuring done
> 
> Should this TRY_COMPILE go into another CMakeLists.txt file in a subdir?
> But how would I get the result in the main config file then?

Simply try using CheckCSourceCompiles.cmake or CheckCXXSourceCompiles.cmake, they should do the job for you and are easier to use.

Bye
Alex

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl


More information about the CMake mailing list