#6398 System : Remove cotire

This commit is contained in:
Magne Sjaastad 2020-08-28 15:06:50 +02:00
parent 3269537f25
commit 2901ad2c54
25 changed files with 2 additions and 4118 deletions

View File

@ -475,7 +475,7 @@ target_link_libraries( ResInsight ${LINK_LIBRARIES} ${EXTERNAL_LINK_LIBRARIES})
#############################################################################
# cotire and unity builds
# Unity builds
#############################################################################
set( UNITY_EXCLUDE_FILES
@ -507,28 +507,6 @@ set( UNITY_EXCLUDE_FILES
Commands/CompletionExportCommands/RicExportFractureCompletionsImpl.cpp
)
if(RESINSIGHT_ENABLE_COTIRE)
foreach (fileToExclude ${UNITY_EXCLUDE_FILES})
set_source_files_properties (${fileToExclude} PROPERTIES COTIRE_EXCLUDED TRUE)
endforeach(fileToExclude)
foreach (cppFile ${CAF_COTIRE_START_NEW_UNITY_SOURCES})
set_source_files_properties (${cppFile} PROPERTIES COTIRE_START_NEW_UNITY_SOURCE TRUE)
endforeach(cppFile ${CAF_COTIRE_START_NEW_UNITY_SOURCES})
# disable precompiled headers
set_target_properties(ResInsight PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
cotire(ResInsight)
# make sure the unity target is included in the active builds to trigger rebuild before debug
get_target_property(_unityTargetName ResInsight COTIRE_UNITY_TARGET_NAME)
set_target_properties(${_unityTargetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE)
set_target_properties(ResInsight PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
endif()
if(RESINSIGHT_ENABLE_UNITY_BUILD)
foreach (fileToExclude ${UNITY_EXCLUDE_FILES})
set_source_files_properties (${fileToExclude} PROPERTIES SKIP_UNITY_BUILD_INCLUSION TRUE)

View File

@ -32,9 +32,3 @@ ${CMAKE_CURRENT_LIST_DIR}/RicTextAnnotation3dEditor.h
source_group( "CommandFeature\\AnnotationCommands" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
# cotire
caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)
list(APPEND CAF_COTIRE_START_NEW_UNITY_SOURCES
${CMAKE_CURRENT_LIST_DIR}/RicCreateReachCircleAnnotationFeature.cpp
)

View File

@ -59,6 +59,3 @@ ${QT_MOC_HEADERS}
source_group( "CommandFeature\\Application" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
# cotire
caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)

View File

@ -23,6 +23,3 @@ ${SOURCE_GROUP_SOURCE_FILES}
)
source_group( "CommandFeature\\ColorLegend" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
# cotire
caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)

View File

@ -41,6 +41,3 @@ ${SOURCE_GROUP_SOURCE_FILES}
)
source_group( "CommandFeature\\Completion" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
# cotire
caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)

View File

@ -34,9 +34,3 @@ ${SOURCE_GROUP_SOURCE_FILES}
source_group( "CommandFeature\\SurfaceCommands" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
# cotire
caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)
list(APPEND CAF_COTIRE_START_NEW_UNITY_SOURCES
${CMAKE_CURRENT_LIST_DIR}/RicImportSurfacesFeature.cpp
)

View File

@ -127,8 +127,3 @@ target_link_libraries( ${PROJECT_NAME}
)
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -98,8 +98,3 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} ${RI_ODB_LIBS} RigGeoMechDataModel LibCore)
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -23,8 +23,3 @@ target_include_directories(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} LibCore)
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -59,9 +59,7 @@ include (ResInsightVersion.cmake)
find_package(Octave)
################################################################################
# cotire and CMake Unity Build
# Fully automated CMake module for build speedup
# https://github.com/sakra/cotire
# Unity Build
################################################################################
# CMAKE_UNITY_BUILD was introduced in CMake 3.16.2
@ -72,21 +70,6 @@ if(RESINSIGHT_ENABLE_UNITY_BUILD)
set(CVF_ENABLE_UNITY_BUILD true)
endif()
option(RESINSIGHT_ENABLE_COTIRE "Experimental speedup of compilation using cotire" OFF)
mark_as_advanced(FORCE RESINSIGHT_ENABLE_COTIRE)
if(RESINSIGHT_ENABLE_COTIRE)
if(NOT COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES)
message(STATUS "cotire: Setting default number of includes to 5")
set(COTIRE_MAXIMUM_NUMBER_OF_UNITY_INCLUDES 5)
endif()
include(cotire)
endif()
# always include cotire tools to avoid checking if a macro is available
include(cafCotireTools)
################################################################################
# ERT
################################################################################

View File

@ -75,11 +75,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
list(APPEND CAF_COTIRE_EXCLUDE_FILES
cafEffectGenerator.cpp
)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -64,8 +64,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -43,8 +43,3 @@ target_link_libraries ( ${PROJECT_NAME}
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -43,8 +43,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -77,8 +77,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -113,8 +113,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -65,8 +65,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -95,13 +95,3 @@ foreach (qtlib ${QT_LIBRARIES})
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${qtlib}> $<TARGET_FILE_DIR:${PROJECT_NAME}>
)
endforeach(qtlib)
# cotire
if (COMMAND caf_apply_cotire)
set_source_files_properties (qrc_textedit.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
set_source_files_properties (qrc_cafCommandFeatures.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
set_source_files_properties (qrc_cafAnimControl.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -191,8 +191,3 @@ target_link_libraries ( ${PROJECT_NAME}
)
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -61,11 +61,3 @@ if (MSVC)
endif()
source_group("" FILES ${PROJECT_FILES})
# cotire
if (COMMAND caf_apply_cotire)
list(APPEND CAF_COTIRE_EXCLUDE_FILES
cafOpenGLWidget.cpp
)
caf_apply_cotire("${PROJECT_NAME}")
endif()

View File

@ -116,7 +116,3 @@ 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()

View File

@ -70,7 +70,3 @@ 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()

View File

@ -93,7 +93,3 @@ 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()

View File

@ -1,51 +0,0 @@
#
# This macro is used when a target has been created (add_library or add_executable)
# Apply the macro like this
#
# add_executable(MyProject)
# caf_apply_cotire(MyProject)
#
#
macro (caf_apply_cotire target_name)
if (COMMAND cotire)
#message("Applying cotire on target : ${target_name}")
# disable precompiled headers
set_target_properties(${target_name} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
foreach (fileToExclude ${CAF_COTIRE_EXCLUDE_FILES})
set_source_files_properties (${fileToExclude} PROPERTIES COTIRE_EXCLUDED TRUE)
endforeach(fileToExclude)
cotire(${target_name})
# make sure the unity target is included in the active builds to trigger rebuild before debug
get_target_property(_unityTargetName ${target_name} COTIRE_UNITY_TARGET_NAME)
set_target_properties(${_unityTargetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE)
set_target_properties(${target_name} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
endif()
endmacro (caf_apply_cotire)
#
# This macro is intended to be used in *.cmake files listing a set of source files.
# The specified file will start a new unity source file
#
# Example:
# set (SOURCE_GROUP_SOURCE_FILES
# ${CMAKE_CURRENT_LIST_DIR}/RicLaunchUnitTestsFeature.cpp
# )
# caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)
#
macro (caf_cotire_start_unity_at_first_item all_files)
if (COMMAND cotire)
#message("all_files : ${${all_files}}")
list(GET ${all_files} 0 first_item_in_list)
#message("first_item_in_list : ${first_item_in_list}")
list(APPEND CAF_COTIRE_START_NEW_UNITY_SOURCES
${first_item_in_list}
)
#message("CAF_COTIRE_START_NEW_UNITY_SOURCES : ${CAF_COTIRE_START_NEW_UNITY_SOURCES}")
endif(COMMAND cotire)
endmacro (caf_cotire_start_unity_at_first_item)

File diff suppressed because it is too large Load Diff