Skip to content

Commit

Permalink
Add warning for builds within source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
layus committed Sep 21, 2016
1 parent 62fbe1f commit 31e18bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ endif()
# CMake does not allow to add dependencies to "builtin" targets like package_source.
# We therefore wrap package_source in our own dist target.

if("${MOZART_BUILD_DIR}/" MATCHES "${MOZART_DIR}/.*")
message(WARNING "You are compiling inside the source tree. Generating source tarballs will not work correctly.")
endif()
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
configure_file(cmake_local/MozartConfigVersion.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_local/MozartConfigVersion.cmake @ONLY)
Expand Down

0 comments on commit 31e18bf

Please sign in to comment.