Comments (4)
cotire cannot set up a install_unity target automatically, because CMake does not provide the necessary information about the existing install(TARGETS target)
programmatically. You can however set one up manually. First add an install rule for each unity target, e.g.:
install(TARGETS example_unity RUNTIME DESTINATION "bin" OPTIONAL COMPONENT "unity")
This installs the example
executable built by the unity target to the bin
folder. The install rules for unity targets must use a custom install component. You can then add a global unity_install
target that performs the installation of all unity targets:
add_custom_target(unity_install
COMMAND ${CMAKE_COMMAND} -DCOMPONENT=unity -P cmake_install.cmake
COMMENT "Install the unity-built project..."
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
add_dependencies(unity_install example_unity)
The global unity_install
target must depend on all unity targets that should be installed.
from cotire.
We ran into a similar problem for our CI that uses unity to speed up builds. We elected to run the install/fast
target after the all_unity
target as two discrete steps; the install/fast
target performs the install
target without dependencies.
This allowed us to not have to define a different install target for unity builds.
from cotire.
Section has been added to the manual in cotire 1.6.7.
from cotire.
Another possibility that @ngladitz taught me was to remove the dependency on the all target to the install target :
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY True)
The big advantage is that this allows running cpack easily with the unity targets (else cpack calls make install
which just rebuilds everything).
from cotire.
Related Issues (20)
- cotire and GCC flag "-include header.h"
- Project status HOT 2
- Problem using Cotire with Xcode10 New Build System HOT 1
- Run cotire from a different directory
- cxx
- MSVC 2017 /Fp and /Yc and /Yu Flags Broken On 391bf6b7609e14f5976bd5247b68d63cbf8d4d12 HOT 4
- Is it possible to exclude precompiled headers from the clean target?
- Exclude unity source from visual studio scanning
- How to configure runtime/thirdparty headers alone HOT 1
- Evaluation file to be written multiple times with different content
- Target cannot be cotired HOT 3
- why is PCH generation restricted to clang-cl on windows?
- Problems were encountered - C1083: Cannot open include file HOT 2
- New pre-compiled headers support in CMake 3.16 HOT 2
- cotire slows down the compilation of the test code
- MSVC target to be cotired has warning level: /W4 created cotire target: /W1
- Same Target Had been compile Twice with different Compile flags, but the prebuild header file hadn't been recreated. HOT 2
- redefinition of class 'xxxx'
- [pkgconfig] cotire doesn't fully support cmake function FindPkgConfig HOT 1
- Project output directory. Android HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cotire.