[CMake] Infinite loop with cmake-2.8.10.2

Matthew Woehlke matthew.woehlke at kitware.com
Fri Dec 28 15:27:16 EST 2012


On 2012-12-28 14:56, Jed Brown wrote:
> $ echo 'project (Test C)' > CMakeLists.txt
> $  cmake -DCMAKE_C_COMPILER:FILEPATH=clang .
> -- The C compiler identification is Clang 3.1.0
> -- Check for working C compiler: /usr/bin/clang
> -- Check for working C compiler: /usr/bin/clang -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /tmp/jed/foo
>
> Cool, what happens when we re-run the same command?
>
> $ cmake -DCMAKE_C_COMPILER:FILEPATH=clang .
> -- Configuring done
> You have changed variables that require your cache to be deleted.
> Configure will be re-run and you may have to reset some variables.
> The following variables have changed:
> CMAKE_C_COMPILER= clang
>
> -- Configuring done
> You have changed variables that require your cache to be deleted.
> Configure will be re-run and you may have to reset some variables.
> The following variables have changed:
> CMAKE_C_COMPILER= clang
>
> *[infinite loop]*
>
> After this awful behavior, you have to manually delete the CMakeFiles
> directory (not CMakeCache.txt) to recover.

I can confirm this as specified, and also with -DCMAKE_C_COMPILER=gcc. 
It seems to be a problem with giving a non-absolute path to the 
compiler. If I give the full path to gcc, things work.

-- 
Matthew



More information about the CMake mailing list