[CMake] My nomination for least helpful CMake Error Message (CONFIGURE_FILE issue)

Eric Noulard eric.noulard at gmail.com
Mon Nov 23 13:29:45 EST 2009


2009/11/23 kent williams <nkwmailinglists at gmail.com>:
> CMake Error at common/CMakeLists.txt:83 (CONFIGURE_FILE):
>   configure_file Problem configuring file
>
> The issue being the CONFIGURE_FILE command:
>
> PROJECT(SGICOMMONLIB)
> #
> # other stuff removed for brevity.
> #
> SET(DIRNAME pixmaps)
> FILE(GLOB DEFAULT_CONFIG_FILES "*.xbm" ".xpm" ".gif" "*.tif" "*.pal" )
> FOREACH(MODULE ${DEFAULT_CONFIG_FILES} )
>  GET_FILENAME_COMPONENT(CURR_FILENAME ${MODULE} NAME)
>  CONFIGURE_FILE(${SGICOMMONLIB_SOURCE_DIR}/${CURR_FILENAME}
> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DIRNAME}/${CURR_FILENAME} COPYONLY
> IMMEDIATE )
>  INSTALL(FILES ${SGICOMMONLIB_SOURCE_DIR}/${DIRNAME}/${CURR_FILENAME}
>                DESTINATION bin/${DIRNAME})
> ENDFOREACH(MODULE)
>
>
> -----------------------------------------------------------------------------------------------
> I think the reason I'm having this trouble is that
> CMAKE_RUNTIME_OUTPUT_DIRECTORY isn't defined.  But the error message
> doesn't say anything useful.

Almost true, you know at least where the problem is and you may add
appropriate MESSAGE(...) to inspect concerned VAR values.

May be you can suggest some output you would have found useful
and may be file a bug report?

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list