Skip to content

build(cmake): use CMAKE_SOURCE_DIR property - #2091

Merged
ReenigneArcher merged 1 commit into
nightlyfrom
build(cmake)-use-CMAKE_SOURCE_DIR-property
Feb 3, 2024
Merged

ReenigneArcher merged 1 commit into
nightlyfrom
build(cmake)-use-CMAKE_SOURCE_DIR-property

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Feb 2, 2024 •

Copy link
Copy Markdown
Member

Description

  • Use CMAKE_SOURCE_DIR property in cmake
  • Add quotes in case some paths have spaces
  • Replace CMAKE_CURRENT_SOURCE_DIR with CMAKE_SOURCE_DIR in some places

This was originally part of #1603, but decided to break it out as it's not necessarily a change that is only needed for unit testing.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher
ReenigneArcher force-pushed the build(cmake)-use-CMAKE_SOURCE_DIR-property branch 2 times, most recently from 6f0bbf9 to cf0efcd Compare February 2, 2024 22:57
@cgutman

cgutman commented Feb 3, 2024

Copy link
Copy Markdown
Collaborator

Do we want to be using CMAKE_CURRENT_SOURCE_DIR rather than CMAKE_SOURCE_DIR? The former can point to other subfolders within the tree (though it seemingly doesn't for our current usage or it would have broken the build), while the latter is defined to always point to the root of the source tree.

@ReenigneArcher

Copy link
Copy Markdown
Member Author

CMAKE_SOURCE_DIR is probably better, which is what I used originally. I was using CMAKE_CURRENT_SOURCE_DIR only to keep it consistent with some other recent PRs... but now that I think about it CMAKE_SOURCE_DIR is probably what we want if we ever implement unit testing.

@ReenigneArcher
ReenigneArcher force-pushed the build(cmake)-use-CMAKE_SOURCE_DIR-property branch 4 times, most recently from de606bb to 7fe14aa Compare February 3, 2024 00:42
@ReenigneArcher
ReenigneArcher force-pushed the build(cmake)-use-CMAKE_SOURCE_DIR-property branch from 7fe14aa to 9b8e394 Compare February 3, 2024 00:47
@ReenigneArcher
ReenigneArcher requested review from cgutman and removed request for cgutman February 3, 2024 00:48
@ReenigneArcher
ReenigneArcher merged commit 328a300 into nightly Feb 3, 2024
@ReenigneArcher
ReenigneArcher deleted the build(cmake)-use-CMAKE_SOURCE_DIR-property branch February 3, 2024 20:29
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
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.

2 participants