Skip to content

Fix the CMake build system when libucl is used as a subproject - #398

Open
kjcamann wants to merge 1 commit into
vstakhov:masterfrom
kjcamann:kjcamann/fix-subproject-cmake-builds
Open

Fix the CMake build system when libucl is used as a subproject#398
kjcamann wants to merge 1 commit into
vstakhov:masterfrom
kjcamann:kjcamann/fix-subproject-cmake-builds

Conversation

@kjcamann

Copy link
Copy Markdown

CMAKE_SOURCE_DIR refers to the top-level project. If libucl is added as a subproject (e.g., if it is added as a git submodule and the main CMake build system adds it with add_subdirectory) then CMAKE_SOURCE_DIR won't refer to correct place. The correct location is PROJECT_SOURCE_DIR, which refers to the most recent project() call.

CMAKE_SOURCE_DIR refers to the top-level project. If libucl is added
as a subproject (e.g., if it is added as a git submodule and the main
CMake build system adds it with `add_subdirectory`) then
CMAKE_SOURCE_DIR won't refer to correct place. The correct location
is PROJECT_SOURCE_DIR, which refers to the most recent project() call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant