Skip to content

Unable to call Subproject from toplevel project #628

@srini2174

Description

@srini2174

I am trying to create a project following the structure shown below

MyWorkspace
|
|
|____ MyFramework1
| |
| |__Module1
| |
| |Module2
|
|
MyFramework2
|
|___Module1
|
|___Module2

I have created the following equivalent BasisProject structure

TopLevelProject
|
|
|____ Subproject1
| |
| |Module1
| | |
BasisProject.cmake
| |
| |Module2
| | |
BasisProject.cmake
|
|
Subproject2
| |
| |__Module1
| | |
BasisProject.cmake
| |
| |__Module2
| |
BasisProject.cmake
|
|___________BasisProject.cmake
|
|___________CMakeLists.txt

But there is no way the subproject is called from the toplevel project.

I tried adding basis_add_subdirectory(Subproject1) in the CMakeLists.txt of the toplevelproject. I get the error " Module Subproject1 specified DEFAULT_MODULES, but a module cannot have itself modules."

I tried adding add_subdirectory(Subproject1) in the CMakeLists.txt of the toplevelproject. I get the error

"CMake Error at config/basis-modules/InstallationTools.cmake:456 (add_custom_target): add_custom_target cannot create target "uninstall" because another target with the same name already exists. The existing target is a custom target"

What is the right way to call the subproject from the toplevel project?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions