@@ -72,17 +72,19 @@ endif()
72
72
# We therefore wrap package_source in our own dist target.
73
73
74
74
if ("${MOZART_BUILD_DIR} /" MATCHES "${MOZART_DIR} /.*" )
75
- message (WARNING "You are compiling inside the source tree. Generating source tarballs will not work correctly." )
75
+ message (STATUS "Building inside the source tree: 'dist' target disabled" )
76
+ else ()
77
+ message (STATUS "Building outside the source tree: 'dist' target enabled" )
78
+ add_custom_target (dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
79
+ configure_file (cmake_local/MozartConfigVersion.cmake.in
80
+ ${CMAKE_CURRENT_BINARY_DIR} /cmake_local/MozartConfigVersion.cmake @ONLY)
81
+ define_property (GLOBAL PROPERTY SRCS_INSTALLED_DIRS
82
+ BRIEF_DOCS "List of source files"
83
+ FULL_DOCS "List of source/dest pairs of path to be included in the source archive" )
84
+ set_property (GLOBAL APPEND PROPERTY SRCS_INSTALLED_DIRS
85
+ "${CMAKE_CURRENT_SOURCE_DIR} " "/"
86
+ "${CMAKE_CURRENT_BINARY_DIR} /cmake_local/" "/cmake_local/" )
76
87
endif ()
77
- add_custom_target (dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
78
- configure_file (cmake_local/MozartConfigVersion.cmake.in
79
- ${CMAKE_CURRENT_BINARY_DIR} /cmake_local/MozartConfigVersion.cmake @ONLY)
80
- define_property (GLOBAL PROPERTY SRCS_INSTALLED_DIRS
81
- BRIEF_DOCS "List of source files"
82
- FULL_DOCS "List of source/dest pairs of path to be included in the source archive" )
83
- set_property (GLOBAL APPEND PROPERTY SRCS_INSTALLED_DIRS
84
- "${CMAKE_CURRENT_SOURCE_DIR} " "/"
85
- "${CMAKE_CURRENT_BINARY_DIR} /cmake_local/" "/cmake_local/" )
86
88
87
89
# The subdirectories which contain the real thing
88
90
0 commit comments