mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
AUTOGEN: Tests: AUTORCC SKIP_AUTORCC and SKIP_AUTOGEN test
This commit is contained in:
parent
53787bf8de
commit
c17e0a3ad5
@ -181,6 +181,27 @@ set_property(TARGET skipUicB PROPERTY AUTOUIC ON)
|
||||
set_property(TARGET skipUicB PROPERTY AUTOMOC ON)
|
||||
target_link_libraries(skipUicB ${QT_LIBRARIES})
|
||||
|
||||
# -- Test: AUTORCC, SKIP_AUTORCC
|
||||
# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target
|
||||
set(skipRccSources
|
||||
skipRcc.cpp
|
||||
skipSource/skipRccBad1.qrc
|
||||
skipSource/skipRccBad2.qrc
|
||||
skipSource/skipRccGood.qrc
|
||||
)
|
||||
set_property(SOURCE skipSource/skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON)
|
||||
set_property(SOURCE skipSource/skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON)
|
||||
# AUTORCC enabled
|
||||
add_executable(skipRccA ${skipRccSources})
|
||||
set_property(TARGET skipRccA PROPERTY AUTORCC ON)
|
||||
target_link_libraries(skipRccA ${QT_LIBRARIES})
|
||||
# AUTORCC, AUTOUIC and AUTOMOC enabled
|
||||
add_executable(skipRccB ${skipRccSources})
|
||||
set_property(TARGET skipRccB PROPERTY AUTORCC ON)
|
||||
set_property(TARGET skipRccB PROPERTY AUTOUIC ON)
|
||||
set_property(TARGET skipRccB PROPERTY AUTOMOC ON)
|
||||
target_link_libraries(skipRccB ${QT_LIBRARIES})
|
||||
|
||||
# -- Test: AUTOMOC AUTORCC
|
||||
# Source files with the same basename in different subdirectories
|
||||
add_subdirectory(sameName)
|
||||
|
9
Tests/QtAutogen/skipRcc.cpp
Normal file
9
Tests/QtAutogen/skipRcc.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
extern int qInitResources_skipRccGood();
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
// Fails to link if the symbol is not present.
|
||||
qInitResources_skipRccGood();
|
||||
return 0;
|
||||
}
|
5
Tests/QtAutogen/skipSource/skipRccBad1.qrc
Normal file
5
Tests/QtAutogen/skipSource/skipRccBad1.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>skipRccGood.cpp</file>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
</qresource>
|
||||
</RCC>
|
5
Tests/QtAutogen/skipSource/skipRccBad2.qrc
Normal file
5
Tests/QtAutogen/skipSource/skipRccBad2.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><
|
||||
<qresource>
|
||||
<file>skipRccGood.cpp</file>
|
||||
</qresource>
|
||||
</RCC>
|
6
Tests/QtAutogen/skipSource/skipRccGood.qrc
Normal file
6
Tests/QtAutogen/skipSource/skipRccGood.qrc
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource>
|
||||
<file>skipRccBad1.qrc</file>
|
||||
<file>skipRccBad2.qrc</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue
Block a user