Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
André Pedro
CMake
Commits
6938772a
Commit
6938772a
authored
8 years ago
by
Sebastian Holtermann
Browse files
Options
Downloads
Patches
Plain Diff
QtAutogen tests: Pass Qt compiler features to library targets
parent
c4d4becf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tests/QtAutogen/CMakeLists.txt
+4
-1
4 additions, 1 deletion
Tests/QtAutogen/CMakeLists.txt
Tests/QtAutogen/complex/CMakeLists.txt
+3
-0
3 additions, 0 deletions
Tests/QtAutogen/complex/CMakeLists.txt
with
7 additions
and
1 deletion
Tests/QtAutogen/CMakeLists.txt
+
4
−
1
View file @
6938772a
...
...
@@ -44,6 +44,7 @@ else()
endif
()
get_property
(
QT_COMPILE_FEATURES TARGET
${
QT_QTCORE_TARGET
}
PROPERTY INTERFACE_COMPILE_FEATURES
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
# -- Test: AUTORCC
...
...
@@ -72,11 +73,13 @@ target_link_libraries(uicOnly ${QT_LIBRARIES})
# have an effect on generation if AUTORCC is off.
add_library
(
empty STATIC empty.cpp not_generated_file.qrc
)
set_target_properties
(
empty PROPERTIES AUTORCC OFF
)
set_target_properties
(
empty PROPERTIES AUTOMOC TRUE
)
target_link_libraries
(
empty no_link_language
)
add_library
(
no_link_language STATIC empty.h
)
set_target_properties
(
no_link_language PROPERTIES AUTOMOC TRUE
)
# Pass Qt compiler features to targets that don't link against Qt
target_compile_features
(
no_link_language PRIVATE
${
QT_COMPILE_FEATURES
}
)
target_compile_features
(
empty PRIVATE
${
QT_COMPILE_FEATURES
}
)
# -- Test: AUTORCC
# When a file listed in a .qrc file changes the target must be rebuilt
...
...
This diff is collapsed.
Click to expand it.
Tests/QtAutogen/complex/CMakeLists.txt
+
3
−
0
View file @
6938772a
...
...
@@ -12,6 +12,9 @@ set(CMAKE_AUTORCC ON)
# create an executable and two library targets, each requiring automoc:
add_library
(
codeeditorLib STATIC codeeditor.cpp
)
add_library
(
privateSlot OBJECT private_slot.cpp
)
# Pass Qt compiler features to targets that don't link against Qt
target_compile_features
(
codeeditorLib PRIVATE
${
QT_COMPILE_FEATURES
}
)
target_compile_features
(
privateSlot PRIVATE
${
QT_COMPILE_FEATURES
}
)
configure_file
(
generated_resource.qrc.in generated_resource.qrc @ONLY
)
add_custom_command
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment