[Cmake] Why doesn't this give the expected output
John Biddiscombe
john.biddiscombe at mirada-solutions.com
Fri Mar 21 10:01:40 EST 2003
>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