Commit 02d7cc56 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Speeding up the cmake generator process a bit.

(From 13s to 10s on my system.)


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19376 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 161c28eb
...@@ -41,7 +41,7 @@ function (of_add_plugins) ...@@ -41,7 +41,7 @@ function (of_add_plugins)
"${CMAKE_SOURCE_DIR}/Plugin-*/CMakeLists.txt" "${CMAKE_SOURCE_DIR}/Plugin-*/CMakeLists.txt"
"${CMAKE_SOURCE_DIR}/PluginCollection-*/Plugin-*/CMakeLists.txt" "${CMAKE_SOURCE_DIR}/PluginCollection-*/Plugin-*/CMakeLists.txt"
) )
foreach (_plugin ${_plugins_in}) foreach (_plugin ${_plugins_in})
get_filename_component (_plugin_dir ${_plugin} PATH) get_filename_component (_plugin_dir ${_plugin} PATH)
add_subdirectory (${CMAKE_SOURCE_DIR}/${_plugin_dir}) add_subdirectory (${CMAKE_SOURCE_DIR}/${_plugin_dir})
......
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
# dependencies of the respective plugins are missing. # dependencies of the respective plugins are missing.
# #
if(OPENFLIPPER_PLUGIN_INCLUDED)
return()
endif(OPENFLIPPER_PLUGIN_INCLUDED)
set(OPENFLIPPER_PLUGIN_INCLUDED TRUE PARENT_SCOPE)
include (ACGCommon) include (ACGCommon)
# get plugin name from directory name # get plugin name from directory name
...@@ -115,7 +120,12 @@ macro (_check_plugin_deps _prefix _optional ) ...@@ -115,7 +120,12 @@ macro (_check_plugin_deps _prefix _optional )
string (TOUPPER ${_val} _VAL) string (TOUPPER ${_val} _VAL)
# First we try to find the dependencies directly # First we try to find the dependencies directly
find_package(${_val}) if (NOT ${_VAL}_FOUND)
# MESSAGE(STATUS "Looking for _val \"${_val}\"")
find_package(${_val})
#else()
# MESSAGE(STATUS "Skipping _val \"${_val}\"")
endif ()
# This will contain the list of all dependencies of the current base dependency ( including recursive dependencies for one level ) # This will contain the list of all dependencies of the current base dependency ( including recursive dependencies for one level )
set (CURRENT_DEPENDENCY_LIST "") set (CURRENT_DEPENDENCY_LIST "")
...@@ -130,7 +140,12 @@ macro (_check_plugin_deps _prefix _optional ) ...@@ -130,7 +140,12 @@ macro (_check_plugin_deps _prefix _optional )
string (TOUPPER ${_rec_dep} _REC_DEP) string (TOUPPER ${_rec_dep} _REC_DEP)
find_package(${_rec_dep}) if (NOT ${_REC_DEP}_FOUND)
# MESSAGE(STATUS "Looking for _rec_dep \"${_rec_dep}\"")
find_package(${_rec_dep})
#else()
# MESSAGE(STATUS "Skipping _rec_dep \"${_rec_dep}\"")
endif ()
if ( ${_REC_DEP}_FOUND ) if ( ${_REC_DEP}_FOUND )
list (APPEND CURRENT_DEPENDENCY_LIST ${_rec_dep} ) list (APPEND CURRENT_DEPENDENCY_LIST ${_rec_dep} )
...@@ -151,7 +166,12 @@ macro (_check_plugin_deps _prefix _optional ) ...@@ -151,7 +166,12 @@ macro (_check_plugin_deps _prefix _optional )
string (TOUPPER ${_rec_dep} _REC_DEP) string (TOUPPER ${_rec_dep} _REC_DEP)
find_package(${_rec_dep}) if (NOT ${_REC_DEP}_FOUND)
# MESSAGE(STATUS "Looking for _rec_dep \"${_rec_dep}\"")
find_package(${_rec_dep})
#else()
# MESSAGE(STATUS "Skipping _rec_dep \"${_rec_dep}\"")
endif ()
# Optional so add if we found the dependency or we skip it. # Optional so add if we found the dependency or we skip it.
# Defines will be added due to the optional status # Defines will be added due to the optional status
...@@ -211,7 +231,12 @@ macro (_check_plugin_deps _prefix _optional ) ...@@ -211,7 +231,12 @@ macro (_check_plugin_deps _prefix _optional )
foreach (_val ${FULL_DEPENDENCY_LIST}) foreach (_val ${FULL_DEPENDENCY_LIST})
string (TOUPPER ${_val} _VAL) string (TOUPPER ${_val} _VAL)
find_package(${_val}) if (NOT ${_VAL}_FOUND)
# MESSAGE(STATUS "Looking for _val \"${_val}\"")
find_package(${_val})
#else()
# MESSAGE(STATUS "Skipping _val \"${_val}\"")
endif ()
#====================================================================================== #======================================================================================
# Global dependency tracking # Global dependency tracking
...@@ -440,7 +465,9 @@ function (_build_openflipper_plugin plugin) ...@@ -440,7 +465,9 @@ function (_build_openflipper_plugin plugin)
set(plugin_html_doc_dir "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/UserHTML/Plugin-${plugin}") set(plugin_html_doc_dir "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/UserHTML/Plugin-${plugin}")
set(plugin_qt_help_dir "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help") set(plugin_qt_help_dir "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Help")
find_package(Doxygen) if (NOT DOXYGEN_FOUND)
find_package(Doxygen)
endif ()
if ( DOXYGEN_FOUND ) if ( DOXYGEN_FOUND )
...@@ -689,4 +716,4 @@ macro (openflipper_plugin) ...@@ -689,4 +716,4 @@ macro (openflipper_plugin)
endmacro () endmacro ()
# No stupid abundance of "Boost version" messages, please. # No stupid abundance of "Boost version" messages, please.
SET (Boost_FIND_QUIETLY TRUE) SET (Boost_FIND_QUIETLY TRUE PARENT_SCOPE)
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment