[CMake] Circular Dependancy?
Mike Jackson
imikejackson at gmail.com
Tue Jun 5 14:38:47 EDT 2007
When I try as suggested I get the following error:
make -C /Users/mjackson/Task_7/MXA_Workspace/PFImport/Build all
CMake Error: Error in cmake code at
/Users/mjackson/Task_7/MXA_Workspace/PFImport/CMakeLists.txt:23:
ADD_SUBDIRECTORY not given a binary directory but the given source
directory "/Users/mjackson/Task_7/MXA_Workspace/MXADataModel" is not
a subdirectory of "/Users/mjackson/Task_7/MXA_Workspace/PFImport".
When specifying an out-of-tree source a binary directory must be
explicitly specified.
Current CMake stack: /Users/mjackson/Task_7/MXA_Workspace/PFImport/
CMakeLists.txt;/usr/local/share/cmake-2.4/Modules/
CMakeCInformation.cmake;/usr/local/share/cmake-2.4/Modules/
CMakeCXXInformation.cmake
-- Configuring done
make: *** [cmake_check_build_system] Error 255
If I do ADD_SUBDIRECTORY(MXADataModel ${PROJECT_BINARY_DIR}/
MXADataModel)
Then cmake and make both run without complaints.
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Jun 5, 2007, at 1:47 PM, Eric Noulard wrote:
> 2007/6/5, David Cole <david.cole at kitware.com>:
>> The thing that's strange about it is the second arg to
>> ADD_SUBDIRECTORY.
>> That should be a binary directory that is used by no other
>> ADD_SUBDIRECTORY
>> call and it should be different than the main PROJECT_BINARY_DIR
>> as well...
>
> I didn't know thta (in fact I never use the [binary_dir] arg)
>
> Nevertheless, should it be DIFFERENT or UNIQUE from
> ADD_LIBRARY/ADD_EXECUTABLE point of view?
>
>>
>> It should perhaps be "${PROJECT_BINARY_DIR}/MXADataModel"
>> ...?
>
> in this case:
>
> ADD_SUBDIRECTORY(MXADataModel)
>
> should be enough to get what you suggest, no?
>
>>
>> HTH,
>> David
>>
> --
> Erk
More information about the CMake
mailing list