mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
cotire : Added unity build of cafUserInterface
This commit is contained in:
@@ -89,6 +89,22 @@ else()
|
|||||||
find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED)
|
find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# cotire
|
||||||
|
# Fully automated CMake module for build speedup
|
||||||
|
# https://github.com/sakra/cotire
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
option(RESINSIGHT_ENABLE_COTIRE "Use Cotire to speed up build process" OFF)
|
||||||
|
if(RESINSIGHT_ENABLE_COTIRE)
|
||||||
|
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
include(cotire)
|
||||||
|
|
||||||
|
set(CAF_USE_COTIRE TRUE CACHE INTERNAL "CAF: Use cotire")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# ERT
|
# ERT
|
||||||
@@ -331,23 +347,6 @@ set_property(TARGET
|
|||||||
PROPERTY FOLDER "AppFwk"
|
PROPERTY FOLDER "AppFwk"
|
||||||
)
|
)
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# cotire
|
|
||||||
# Fully automated CMake module for build speedup
|
|
||||||
# https://github.com/sakra/cotire
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
option(RESINSIGHT_ENABLE_COTIRE "Use Cotire to speed up build process" OFF)
|
|
||||||
if(RESINSIGHT_ENABLE_COTIRE)
|
|
||||||
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
|
||||||
include(cotire)
|
|
||||||
|
|
||||||
set(COTIRE_PREFIX_HEADER_IGNORE_PATH
|
|
||||||
# Avoid Windows Kits includes, as they cause issues for OpenGL and others
|
|
||||||
"C:/Program Files (x86)/Windows Kits"
|
|
||||||
)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Installation settings
|
# Installation settings
|
||||||
|
|||||||
@@ -134,4 +134,14 @@ target_link_libraries ( ${PROJECT_NAME}
|
|||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CAF_USE_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})
|
source_group("" FILES ${PROJECT_FILES})
|
||||||
|
|||||||
Reference in New Issue
Block a user