[Cmake] Why doesn't this give the expected output

Bill Hoffman bill.hoffman at kitware.com
Fri Mar 21 10:08:32 EST 2003


It was a recent fix, say a day or two ago that would have fixed the 
AUX_SOURCE_DIRECTORY.

If you look at CMake/Source/cmMakefile.cxx, in the constructor,
look at m_SourceFileExtensions, and see if it has a "cpp".
If not, you do not have the fix.

-Bill


At 10:01 AM 3/21/2003, John Biddiscombe wrote:
>>What version of cmake are you using?   I think AUX_SOURCE_DIRECTORY should
>work for .cpp files in 1.6.6.   
>
>I think cvs from a week or two ago. It says 1.7 in the dialog. I'm not worried,
>
>For people searching the archive...
>to include *.cpp and *.h in a project, I'm using this code below. 
>dir.bat is a simple file with 
>---
>@echo off 
>dir %1 %2 ^%3 %4 %5 etc)
>-------
>
># our local directory
>SET(LOCALNAME msCore) 
>
># make it win32 compatible
>STRING(REGEX REPLACE "/" "\\\\" THIS_DIR "${JavaR2_SOURCE_DIR}/${LOCALNAME}")
># set the path to dir.bat file
>SET(DIRCOMMAND "${JavaR2_SOURCE_DIR}/Build_Test/dir.bat")
>
>#exec dir for *.cpp
>EXEC_PROGRAM(${DIRCOMMAND} ARGS " /B ${THIS_DIR}\\*.cpp" OUTPUT_VARIABLE CPPFILES)
># convert newlines to semicolons
>STRING(REGEX REPLACE "\n" ";" CPP_FILES "${CPPFILES}")
>
>#exec for *.h
>EXEC_PROGRAM(${DIRCOMMAND} ARGS " /B ${THIS_DIR}\\*.h" OUTPUT_VARIABLE HFILES)
>STRING(REGEX REPLACE "\n" ";" H_FILES "${HFILES}")
>
>SET( MSCORE_SRCS
>
> #---------------
> # *.cpp 
> #---------------
> ${CPP_FILES}
>
> #---------------
> # *.h 
> #---------------
> ${H_FILES}
>) 






More information about the CMake mailing list