[CMake] INCLUDE cannot find file

Shiqing Fan fan at hlrs.de
Tue Oct 2 05:27:24 EDT 2007


Hi all,

I just got some problem using INCLUDE. I don't know whether I'm in a 
wrong way.

I used it like this:

In top level, include a CMakeLists file from a subdirectory sub1 : 
INCLUDE (sub1/CMakeLists.txt)
In sub1's CMakeLists.txt, include another CMakeLists file in sub1's 
subdirectory  sub2: INCLUDE (sub2/CMakeLists.txt), and CMake says the 
CMakeLists.txt of sub2 cannot be found.
If I use it with absolute path, i.e. INCLUDE 
(${PROJECT_SOURCE_DIR}/sub1/sub2/CMakeLists.txt), then it works.

Does anyone know why the relative include path doesn't work for sub2?



Thanks,
Shiqing

-- 
--------------------------------------------------------------
Shiqing Fan                     
http://www.hlrs.de/people/fan
High Performance Computing            Tel.: +49 711 685 87234
   Center Stuttgart (HLRS)            Fax.: +49 711 685 65832
POSTAL:Nobelstrasse 19                email: fan at hlrs.de     

ACTUAL:Allmandring 30
70569 Stuttgart



More information about the CMake mailing list