Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
k0T0z committed Sep 1, 2024
1 parent ef5ab48 commit 251f75b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ option(SAM_onnxruntime_USE_TENSORRT "Build with TensorRT support." OFF)
option(SAM_ONNXRUNTIME_ROOTDIR "onnxruntime root dir.")

# Safety check to ensure that builds are not performed in the source directory.
if(${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR})
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
message(
FATAL_ERROR
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there.\n"
"In-source builds not allowed. Please make a new directory (called '.build' directory) and run CMake from there.\n"
)
endif()

Expand Down

0 comments on commit 251f75b

Please sign in to comment.