Skip to content

Commit

Permalink
Improve error checking for missing submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
mmp committed Jan 13, 2018
1 parent fd89479 commit 553545a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,27 @@ if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/openexr/OpenEXR")
"by running \"git submodule update --init --recursive\"")
endif()

if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/glog")
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/glog/cmake")
message(FATAL_ERROR "The glog submodule directory is missing! "
"You probably did not clone the project with --recursive, or first checked out "
"pbrt before it was added. It is possible to recover by running "
"\"git submodule update --init --recursive\"")
endif()

if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/ptex")
if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/ptex/src")
message(FATAL_ERROR "The ptex submodule directory is missing! "
"You probably did not clone the project with --recursive, or first checked out "
"pbrt before it was added. It is possible to recover by running "
"\"git submodule update --init --recursive\"")
endif()

if(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/ext/zlib/doc")
message(FATAL_ERROR "The zlib submodule directory is missing! "
"You probably did not clone the project with --recursive, or first checked out "
"pbrt before it was added. It is possible to recover by running "
"\"git submodule update --init --recursive\"")
endif()

FIND_PACKAGE ( Sanitizers )
FIND_PACKAGE ( Threads )

Expand Down

0 comments on commit 553545a

Please sign in to comment.