Commit 9b9a57e1 authored by Brad King's avatar Brad King

Merge branch 'autogen-no-generated-files' into release-3.9

parents 916b7d51 9a34e95a
...@@ -303,6 +303,13 @@ static void AcquireScanFiles(cmGeneratorTarget const* target, ...@@ -303,6 +303,13 @@ static void AcquireScanFiles(cmGeneratorTarget const* target,
!(fileType == cmSystemTools::HEADER_FILE_FORMAT)) { !(fileType == cmSystemTools::HEADER_FILE_FORMAT)) {
continue; continue;
} }
if (PropertyEnabled(sf, "GENERATED") &&
!target->GetPropertyAsBool("__UNDOCUMENTED_AUTOGEN_GENERATED_FILES")) {
// FIXME: Add a policy whose NEW behavior allows generated files.
// The implementation already works. We disable it here to avoid
// changing behavior for existing projects that do not expect it.
continue;
}
const std::string absFile = const std::string absFile =
cmsys::SystemTools::GetRealPath(sf->GetFullPath()); cmsys::SystemTools::GetRealPath(sf->GetFullPath());
// Skip flags // Skip flags
......
...@@ -28,6 +28,7 @@ add_executable(mocDepends1 test1.cpp ...@@ -28,6 +28,7 @@ add_executable(mocDepends1 test1.cpp
) )
target_link_libraries(mocDepends1 ${QT_CORE_TARGET}) target_link_libraries(mocDepends1 ${QT_CORE_TARGET})
set_target_properties(mocDepends1 PROPERTIES AUTOMOC TRUE) set_target_properties(mocDepends1 PROPERTIES AUTOMOC TRUE)
set_property(TARGET mocDepends1 PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1)
# -- Test 2 using generated library # -- Test 2 using generated library
# This tests the dependency of AUTOMOC of mocDepends2 to the # This tests the dependency of AUTOMOC of mocDepends2 to the
...@@ -43,3 +44,4 @@ add_library(SimpleLib STATIC simpleLib.hpp simpleLib.cpp) ...@@ -43,3 +44,4 @@ add_library(SimpleLib STATIC simpleLib.hpp simpleLib.cpp)
add_executable(mocDepends2 test2.cpp ) add_executable(mocDepends2 test2.cpp )
target_link_libraries(mocDepends2 SimpleLib ${QT_CORE_TARGET}) target_link_libraries(mocDepends2 SimpleLib ${QT_CORE_TARGET})
set_target_properties(mocDepends2 PROPERTIES AUTOMOC TRUE) set_target_properties(mocDepends2 PROPERTIES AUTOMOC TRUE)
set_property(TARGET mocDepends2 PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1)
...@@ -27,6 +27,7 @@ add_executable(mocRerun ...@@ -27,6 +27,7 @@ add_executable(mocRerun
${CMAKE_CURRENT_BINARY_DIR}/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
res1.qrc res1.qrc
) )
set_property(TARGET mocRerun PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1)
target_include_directories(mocRerun PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(mocRerun PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(mocRerun ${QT_CORE_TARGET}) target_link_libraries(mocRerun ${QT_CORE_TARGET})
# Write target name to text file # Write target name to text file
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment