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

John Biddiscombe john.biddiscombe@mirada-solutions.com
Fri, 21 Mar 2003 15:01:40 -0000


>What version of cmake are you using?   I think AUX_SOURCE_DIRECTORY =
should
work for .cpp files in 1.6.6.  =20

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.=20
dir.bat is a simple file with=20
---
@echo off=20
dir %1 %2 ^%3 %4 %5 etc)
-------

# our local directory
SET(LOCALNAME msCore)=20

# 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=20
 #---------------
 ${CPP_FILES}

 #---------------
 # *.h=20
 #---------------
 ${H_FILES}
)=20