[CMake] Problem with TRY_RUN
Bill Hoffman
bill.hoffman at kitware.com
Sat May 24 16:43:41 EDT 2008
Eduardo Alberto Hernández Muñoz wrote:
> Hi list,
>
> I'm trying to add a version check to the FindOpenAL.cmake module.
> Here's the relevant part:
>
> TRY_RUN (
> OPENAL_VERSION_1_1
> OPENAL_COMPILED
> ${CMAKE_BINARY_DIR}
> ${CMAKE_SOURCE_DIR}/check_openal_version_1_1.cpp
> )
>
> A simple 'g++ check_openal_version_1_1.cpp' compiles well in a
> terminal, but OPENAL_COMPILED is set to FALSE. Upon checking the
> makefile generated with 'cmake --debug-trycompile', I see this error:
>
> [...]
> Scanning dependencies of target cmTryCompileExec
> make[2]: Leaving directory
> `/home/coz/Proyectos/STK_Ex/supertuxkart/build/obj/CMakeFiles/CMakeTmp'
> make -f CMakeFiles/cmTryCompileExec.dir/build.make
> CMakeFiles/cmTryCompileExec.dir/build
> make[2]: Entering directory
> `/home/coz/Proyectos/STK_Ex/supertuxkart/build/obj/CMakeFiles/CMakeTmp'
> make[2]: *** No rule to make target
> `/home/coz/Proyectos/STK_Ex/supertuxkart/build/check_openal_version_1_1.cpp',
> needed by `CMakeFiles/cmTryCompileExec.dir/check_openal_version_1_1.cpp.o'.
> Stop.
> make[2]: Leaving directory
> `/home/coz/Proyectos/STK_Ex/supertuxkart/build/obj/CMakeFiles/CMakeTmp'
> make[1]: *** [CMakeFiles/cmTryCompileExec.dir/all] Error 2
> make[1]: Leaving directory
> `/home/coz/Proyectos/STK_Ex/supertuxkart/build/obj/CMakeFiles/CMakeTmp'
> make: *** [all] Error 2
> [...]
>
> In case you wonder, /home/coz/Proyectos/STK_Ex/supertuxkart/build/ is
> the correct directory; running CMake 2.6.0 .
>
Does this file exist:
/home/coz/Proyectos/STK_Ex/supertuxkart/build/check_openal_version_1_1.cpp
-Bill
More information about the CMake
mailing list