Skip to content

Commit

Permalink
examples: Do not do add_subdirectory without a CMakeLists.txt file
Browse files Browse the repository at this point in the history
If an example directory exists but does not have a CMakeLists.txt file
then assume it is not complete and ignore it because add_subdirectory
will fail anyway.
  • Loading branch information
bradking committed May 31, 2016
1 parent fdc00cf commit 457e935
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drake/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif()
# directly into examples/MY_EXAMPLE. See #1939.
file(GLOB children *)
foreach(child ${children})
if(IS_DIRECTORY ${child})
if(EXISTS ${child}/CMakeLists.txt)
add_subdirectory(${child})
endif()
endforeach()

0 comments on commit 457e935

Please sign in to comment.