From bd6bbe9da9830300aa02df231853e791e2879634 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 1 Feb 2019 06:56:11 +0100 Subject: [PATCH] #4020 System : Use ri_apply_cotire() --- .../GeoMech/GeoMechDataModel/CMakeLists.txt | 4 ++++ ApplicationCode/GeoMech/OdbReader/CMakeLists.txt | 4 ++++ .../ResultStatisticsCache/CMakeLists.txt | 4 ++++ Fwk/AppFwk/CommonCode/CMakeLists.txt | 5 +++++ Fwk/AppFwk/cafCommand/CMakeLists.txt | 4 ++++ Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt | 4 ++++ .../cafProjectDataModel/cafPdmCore/CMakeLists.txt | 4 ++++ .../cafPdmUiCore/CMakeLists.txt | 4 ++++ .../cafProjectDataModel/cafPdmXml/CMakeLists.txt | 4 ++++ .../cafTests/cafTestApplication/CMakeLists.txt | 6 +++++- Fwk/AppFwk/cafUserInterface/CMakeLists.txt | 14 ++++---------- Fwk/AppFwk/cafViewer/CMakeLists.txt | 5 +++++ Fwk/VizFwk/LibCore/CMakeLists.txt | 4 ++++ Fwk/VizFwk/LibGeometry/CMakeLists.txt | 4 ++++ Fwk/VizFwk/LibGuiQt/CMakeLists.txt | 6 ++++++ Fwk/VizFwk/LibRender/CMakeLists.txt | 9 +++++++++ Fwk/VizFwk/LibViewing/CMakeLists.txt | 4 ++++ ThirdParty/Qwt/src/CMakeLists.txt | 4 ++++ 18 files changed, 82 insertions(+), 11 deletions(-) diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt index c082dd9ac3..cf39be6916 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -53,3 +53,7 @@ target_link_libraries( ${PROJECT_NAME} ) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt b/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt index 94a38c2db0..7479d730a3 100644 --- a/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt +++ b/ApplicationCode/GeoMech/OdbReader/CMakeLists.txt @@ -92,3 +92,7 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} ${RI_ODB_LIBS} RigGeoMechDataModel LibCore) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/ApplicationCode/ResultStatisticsCache/CMakeLists.txt b/ApplicationCode/ResultStatisticsCache/CMakeLists.txt index d3385421c2..127883d5c5 100644 --- a/ApplicationCode/ResultStatisticsCache/CMakeLists.txt +++ b/ApplicationCode/ResultStatisticsCache/CMakeLists.txt @@ -23,3 +23,7 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} LibCore) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/CommonCode/CMakeLists.txt b/Fwk/AppFwk/CommonCode/CMakeLists.txt index 50af2604c3..357f0d9f7d 100644 --- a/Fwk/AppFwk/CommonCode/CMakeLists.txt +++ b/Fwk/AppFwk/CommonCode/CMakeLists.txt @@ -88,3 +88,8 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + set_source_files_properties (cafEffectGenerator.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafCommand/CMakeLists.txt b/Fwk/AppFwk/cafCommand/CMakeLists.txt index b20186f452..a833be4084 100644 --- a/Fwk/AppFwk/cafCommand/CMakeLists.txt +++ b/Fwk/AppFwk/cafCommand/CMakeLists.txt @@ -87,3 +87,7 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt index 5164c4e190..eb0b599fd4 100644 --- a/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/CMakeLists.txt @@ -49,3 +49,7 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt index a2b236eb05..2b7f3136c6 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/CMakeLists.txt @@ -79,3 +79,7 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt index 7e02cd955e..41b030bf32 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore/CMakeLists.txt @@ -102,3 +102,7 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt index b5ceb8fc7c..bf17a2c961 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmXml/CMakeLists.txt @@ -71,3 +71,7 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt b/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt index 3b1c9a4ed1..c7c9f1e933 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt +++ b/Fwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt @@ -121,4 +121,8 @@ else() execute_process(COMMAND cmake -E copy_if_different ${QT_BINARY_DIR}/${qtlib}4.dll ${CMAKE_BINARY_DIR}/Release/${qtlib}4.dll) endforeach( qtlib ) endif(MSVC) -endif(Qt5Core_FOUND) \ No newline at end of file +endif(Qt5Core_FOUND) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt index fa8993d9d9..6e24a67cb0 100644 --- a/Fwk/AppFwk/cafUserInterface/CMakeLists.txt +++ b/Fwk/AppFwk/cafUserInterface/CMakeLists.txt @@ -185,14 +185,8 @@ target_link_libraries ( ${PROJECT_NAME} ${QT_LIBRARIES} ) -if (COMMAND cotire) - cotire(${PROJECT_NAME}) - - # make sure the unity target is included in the active builds to trigger rebuild before debug - get_target_property(_unityTargetName ${PROJECT_NAME} COTIRE_UNITY_TARGET_NAME) - set_target_properties(${_unityTargetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE) - set_target_properties(${PROJECT_NAME} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE) - -endif() - source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/AppFwk/cafViewer/CMakeLists.txt b/Fwk/AppFwk/cafViewer/CMakeLists.txt index b70d053dd9..7fbcbde542 100644 --- a/Fwk/AppFwk/cafViewer/CMakeLists.txt +++ b/Fwk/AppFwk/cafViewer/CMakeLists.txt @@ -73,3 +73,8 @@ if (MSVC) endif() source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + set_source_files_properties (cafOpenGLWidget.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + ri_apply_cotire() +endif() diff --git a/Fwk/VizFwk/LibCore/CMakeLists.txt b/Fwk/VizFwk/LibCore/CMakeLists.txt index 0637746261..65ef8e88b5 100644 --- a/Fwk/VizFwk/LibCore/CMakeLists.txt +++ b/Fwk/VizFwk/LibCore/CMakeLists.txt @@ -107,3 +107,7 @@ target_include_directories(${PROJECT_NAME} set(PROJECT_FILES ${CEE_HEADER_FILES} ${CEE_SOURCE_FILES}) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/VizFwk/LibGeometry/CMakeLists.txt b/Fwk/VizFwk/LibGeometry/CMakeLists.txt index c18b0bd727..bbb209f950 100644 --- a/Fwk/VizFwk/LibGeometry/CMakeLists.txt +++ b/Fwk/VizFwk/LibGeometry/CMakeLists.txt @@ -65,3 +65,7 @@ target_link_libraries ( ${PROJECT_NAME} set(PROJECT_FILES ${CEE_HEADER_FILES} ${CEE_SOURCE_FILES}) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/Fwk/VizFwk/LibGuiQt/CMakeLists.txt b/Fwk/VizFwk/LibGuiQt/CMakeLists.txt index f220de60fc..902be14403 100644 --- a/Fwk/VizFwk/LibGuiQt/CMakeLists.txt +++ b/Fwk/VizFwk/LibGuiQt/CMakeLists.txt @@ -71,3 +71,9 @@ target_link_libraries ( ${PROJECT_NAME} ) set(PROJECT_FILES ${CEE_HEADER_FILES} ${CEE_SOURCE_FILES}) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + set_source_files_properties (cvfqtOpenGLWidget.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + set_source_files_properties (cvfqtOpenGLContext.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + ri_apply_cotire() +endif() diff --git a/Fwk/VizFwk/LibRender/CMakeLists.txt b/Fwk/VizFwk/LibRender/CMakeLists.txt index 73466d5e69..31edd0b39c 100644 --- a/Fwk/VizFwk/LibRender/CMakeLists.txt +++ b/Fwk/VizFwk/LibRender/CMakeLists.txt @@ -188,3 +188,12 @@ target_link_libraries ( ${PROJECT_NAME} set(PROJECT_FILES ${CEE_HEADER_FILES} ${CEE_SOURCE_FILES}) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + set_source_files_properties (cvfOpenGLCapabilities.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + set_source_files_properties (cvfOpenGLContext.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + set_source_files_properties (cvfOpenGLContextGroup.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + set_source_files_properties (cvfOpenGLResourceManager.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + set_source_files_properties (cvfOpenGL.cpp PROPERTIES COTIRE_EXCLUDED TRUE) + ri_apply_cotire() +endif() diff --git a/Fwk/VizFwk/LibViewing/CMakeLists.txt b/Fwk/VizFwk/LibViewing/CMakeLists.txt index 28f5937fbd..87a801cb0a 100644 --- a/Fwk/VizFwk/LibViewing/CMakeLists.txt +++ b/Fwk/VizFwk/LibViewing/CMakeLists.txt @@ -84,3 +84,7 @@ target_link_libraries ( ${PROJECT_NAME} set(PROJECT_FILES ${CEE_HEADER_FILES} ${CEE_SOURCE_FILES}) source_group("" FILES ${PROJECT_FILES}) + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif() diff --git a/ThirdParty/Qwt/src/CMakeLists.txt b/ThirdParty/Qwt/src/CMakeLists.txt index 4ec94102da..65d2c33f36 100644 --- a/ThirdParty/Qwt/src/CMakeLists.txt +++ b/ThirdParty/Qwt/src/CMakeLists.txt @@ -299,3 +299,7 @@ target_include_directories(${PROJECT_NAME} if (Qt5Core_FOUND) target_link_libraries(${PROJECT_NAME} Qt5::Concurrent Qt5::Core Qt5::OpenGL Qt5::PrintSupport Qt5::Widgets) endif() + +if (COMMAND ri_apply_cotire) + ri_apply_cotire() +endif()