[Cmake] Adding a debug switch with CMake
Andy Cedilnik
andy . cedilnik at kitware . com
11 Jun 2003 08:56:01 -0400
Hi,
Or:
ADD_CUSTOM_COMMAND(debug
${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR} ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE:STRING=Debug ${PROJECT_SOURCE_DIR}
)
Andy
On Wed, 2003-06-11 at 08:47, Bill Hoffman wrote:
> You could have the custom target change directories to the top of the project then
> run cmake from the top, then cd back to the current directory and issue a make.
>
>
> ADD_CUSTOM_TARGET(debug "cd ${PROJECT_BINARY_DIR}; ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=Debug ${PROJECT_SOURCE_DIR}; cd ${PROJECT_BINARY_DIR}/ThisDir; make")
>
> Then add this command into each directory of your project.
> Then you could just run "make debug" in any directory. It would
> change all the makefiles, but would only run make in the local directory,
> so you should get the behavior you want.