Skip to content

Commit

Permalink
Replace CMAKE_SOURCE_DIR by OCCA_SOURCE_DIR (#681)
Browse files Browse the repository at this point in the history
* fixed CMake whitespace issue (#673)

* Replace CMAKE_SOURCE_DIR by OCCA_SOURCE_DIR

Using CMAKE_SOURCE_DIR prevents OCCA being nested in another
project using `add_subdirectory`.

---------

Co-authored-by: Ben Wibking <benjamin.wibking@anu.edu.au>
  • Loading branch information
thilinarmtb and BenWibking committed May 15, 2023
1 parent e3932ab commit c3b40a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ include(ExportAndPackageConfig)

install(CODE
"configure_file(
${CMAKE_SOURCE_DIR}/modulefiles/occa
${OCCA_SOURCE_DIR}/modulefiles/occa
${CMAKE_INSTALL_PREFIX}/modulefiles/occa
@ONLY
)"
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindMETAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ if(METAL_FOUND AND NOT TARGET OCCA::depends::METAL)
# Put it in the OCCA namespace to make it clear that we created it.
add_library(OCCA::depends::METAL INTERFACE IMPORTED)
set_target_properties(OCCA::depends::METAL PROPERTIES
INTERFACE_LINK_LIBRARIES " ${METAL_LIBRARY} ${CORE_SERVICES} ${APP_KIT}"
INTERFACE_LINK_LIBRARIES "${METAL_LIBRARY} ${CORE_SERVICES} ${APP_KIT}"
)
endif()

0 comments on commit c3b40a5

Please sign in to comment.