Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake refactoring and subproject friendliness #1304

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Nov 23, 2020

Modeled after recent similar changes in OIIO.

  • Detect if OSL is being built as a subproject, and if so, set
    OSL_IS_SUBPROJECT (a.k.a. ${PROJECT_NAME}_IS_SUBPROJECT).

  • Move all the testing logic out of the main CMakeLists.txt (and a few
    testing-related macros from oiio_macros.cmake) and into a new
    src/cmake/testing.cmake.

  • Move all of the packaging logic out of the main CMakeLists.txt and
    into a new src/cmake/packaging.cmake.

  • Make all the testing and packaging inactive if this is being built
    as a subproject. Also disable the clang-format target for subprojects.

Signed-off-by: Larry Gritz [email protected]

Modeled after recent similar changes in OIIO.

* Detect if OSL is being built as a subproject, and if so, set
  `OSL_IS_SUBPROJECT` (a.k.a. `${PROJECT_NAME}_IS_SUBPROJECT`).

* Move all the testing logic out of the main CMakeLists.txt (and a few
  testing-related macros from oiio_macros.cmake) and into a new
  src/cmake/testing.cmake.

* Move all of the packaging logic out of the main CMakeLists.txt and
  into a new src/cmake/packaging.cmake.

* Make all the testing and packaging inactive if this is being built
  as a subproject. Also disable the clang-format target for subprojects.

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz merged commit c9f4dc9 into AcademySoftwareFoundation:master Dec 2, 2020
lgritz added a commit to lgritz/OpenShadingLanguage that referenced this pull request Dec 2, 2020
…ion#1304)

Modeled after recent similar changes in OIIO.

* Detect if OSL is being built as a subproject, and if so, set
  `OSL_IS_SUBPROJECT` (a.k.a. `${PROJECT_NAME}_IS_SUBPROJECT`).

* Move all the testing logic out of the main CMakeLists.txt (and a few
  testing-related macros from oiio_macros.cmake) and into a new
  src/cmake/testing.cmake.

* Move all of the packaging logic out of the main CMakeLists.txt and
  into a new src/cmake/packaging.cmake.

* Make all the testing and packaging inactive if this is being built
  as a subproject. Also disable the clang-format target for subprojects.

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz deleted the lg-cmake branch December 2, 2020 01:59
lgritz added a commit to lgritz/OpenShadingLanguage that referenced this pull request Dec 3, 2020
…ion#1304)

Modeled after recent similar changes in OIIO.

* Detect if OSL is being built as a subproject, and if so, set
  `OSL_IS_SUBPROJECT` (a.k.a. `${PROJECT_NAME}_IS_SUBPROJECT`).

* Move all the testing logic out of the main CMakeLists.txt (and a few
  testing-related macros from oiio_macros.cmake) and into a new
  src/cmake/testing.cmake.

* Move all of the packaging logic out of the main CMakeLists.txt and
  into a new src/cmake/packaging.cmake.

* Make all the testing and packaging inactive if this is being built
  as a subproject. Also disable the clang-format target for subprojects.

Signed-off-by: Larry Gritz <[email protected]>
lgritz added a commit to lgritz/OpenShadingLanguage that referenced this pull request Dec 3, 2020
…ion#1304)

Modeled after recent similar changes in OIIO.

* Detect if OSL is being built as a subproject, and if so, set
  `OSL_IS_SUBPROJECT` (a.k.a. `${PROJECT_NAME}_IS_SUBPROJECT`).

* Move all the testing logic out of the main CMakeLists.txt (and a few
  testing-related macros from oiio_macros.cmake) and into a new
  src/cmake/testing.cmake.

* Move all of the packaging logic out of the main CMakeLists.txt and
  into a new src/cmake/packaging.cmake.

* Make all the testing and packaging inactive if this is being built
  as a subproject. Also disable the clang-format target for subprojects.

Signed-off-by: Larry Gritz <[email protected]>
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