[CMake] Behaviour of ${PROJECT_SOURCE_DIR}

Filipe Sousa natros at gmail.com
Tue Apr 12 05:24:54 EDT 2005


Hi!

I'm having problems with PROJECT_SOURCE_DIR using subprojects that I didn't 
have with previous cvs versions of CMake. 

This test case reproduces the problem.

/CMakeLists.txt:
PROJECT(bug)
MESSAGE(STATUS "bug project source dir=${PROJECT_SOURCE_DIR}")
SUBDIRS(projA)

/projA/CMakeLists.txt:
PROJECT(projA)
MESSAGE(STATUS "projA project source dir=${PROJECT_SOURCE_DIR}")
SUBDIRS(src)

/projA/src/CMakeLists.txt
MESSAGE(STATUS "projA/src project source dir ${PROJECT_SOURCE_DIR}")

-- Check for working C compiler: /opt/intel_cc_80/bin/icc
-- Check for working C compiler: /opt/intel_cc_80/bin/icc -- works
-- Check size of void *
-- Check size of void * - done
-- Check for working CXX compiler: /opt/intel_cc_80/bin/icpc
-- Check for working CXX compiler: /opt/intel_cc_80/bin/icpc -- works
-- bug project source dir=/home/fsousa/tmp/bug
-- projA project source dir=/home/fsousa/tmp/bug/projA
-- projA/src project source dir /home/fsousa/tmp/bug

Shouldn't /projA/src/CMakeLists.txt report "projA/src project source 
dir /home/fsousa/tmp/bug/projA" instead of "projA/src project source 
dir /home/fsousa/tmp/bug"?

-- Configuring done
-- Generating done
-- Build files have been written to: /home/fsousa/tmp/bug/debug

--
Filipe Sousa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050412/5430a274/attachment.pgp


More information about the CMake mailing list