[Orxonox-commit 721] r3251 - branches/core4/cmake branches/netp6/cmake trunk/cmake
rgrieder at orxonox.net
rgrieder at orxonox.net
Mon Jun 29 18:13:26 CEST 2009
Author: rgrieder
Date: 2009-06-29 18:13:26 +0200 (Mon, 29 Jun 2009)
New Revision: 3251
Modified:
branches/core4/cmake/GenerateToluaBindings.cmake
branches/core4/cmake/PrecompiledHeaderFiles.cmake
branches/netp6/cmake/GenerateToluaBindings.cmake
branches/netp6/cmake/PrecompiledHeaderFiles.cmake
trunk/cmake/PrecompiledHeaderFiles.cmake
Log:
Fixed two serious dependency bugs:
- Only every second file of the tolua bind dependencies was regarded as such (already fixed in trunk)
- Running cmake still caused complete rebuilds when using PCH
Modified: branches/core4/cmake/GenerateToluaBindings.cmake
===================================================================
--- branches/core4/cmake/GenerateToluaBindings.cmake 2009-06-29 16:10:46 UTC (rev 3250)
+++ branches/core4/cmake/GenerateToluaBindings.cmake 2009-06-29 16:13:26 UTC (rev 3251)
@@ -52,10 +52,11 @@
SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-w")
ENDIF()
- # Create temporary package file
+ # Create temporary package file and implicit dependencies
FILE(REMOVE ${_tolua_pkgfile})
FOREACH(_tolua_inputfile ${_tolua_inputfiles})
FILE(APPEND ${_tolua_pkgfile} "\$cfile \"${_tolua_inputfile}\"\n")
+ LIST(APPEND _implicit_dependencies CXX ${_tolua_inputfile})
ENDFOREACH(_tolua_inputfile)
ADD_CUSTOM_COMMAND(
@@ -66,9 +67,9 @@
-H ${_tolua_hfile}
-s ${TOLUA_PARSER_SOURCE}
${_tolua_pkgfile}
- DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
- IMPLICIT_DEPENDS CXX ${_tolua_inputfiles}
- WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
+ DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
+ IMPLICIT_DEPENDS ${_implicit_dependencies}
+ WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
COMMENT "Generating tolua bind files for package ${_tolua_package}"
)
ENDFUNCTION(GENERATE_TOLUA_BINDINGS)
Modified: branches/core4/cmake/PrecompiledHeaderFiles.cmake
===================================================================
--- branches/core4/cmake/PrecompiledHeaderFiles.cmake 2009-06-29 16:10:46 UTC (rev 3250)
+++ branches/core4/cmake/PrecompiledHeaderFiles.cmake 2009-06-29 16:13:26 UTC (rev 3251)
@@ -109,8 +109,8 @@
# This is just the best possible opportunity to address this dependency issue
GET_GCC_COMPILER_FLAGS(${_target_name} _pch_gcc_flags)
# Make sure we recompile the pch file even if only the flags change
- IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_PCH_GCC_FLAGS}")
- SET(_INTERNAL_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
+ IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_${_target_name}_PCH_GCC_FLAGS}")
+ SET(_INTERNAL_${_target_name}_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
FILE(WRITE ${_pch_dep_helper_file} "/* ${_pch_gcc_flags} */")
ENDIF()
Modified: branches/netp6/cmake/GenerateToluaBindings.cmake
===================================================================
--- branches/netp6/cmake/GenerateToluaBindings.cmake 2009-06-29 16:10:46 UTC (rev 3250)
+++ branches/netp6/cmake/GenerateToluaBindings.cmake 2009-06-29 16:13:26 UTC (rev 3251)
@@ -52,10 +52,11 @@
SET_SOURCE_FILES_PROPERTIES(${_tolua_cxxfile} PROPERTIES COMPILE_FLAGS "-w")
ENDIF()
- # Create temporary package file
+ # Create temporary package file and implicit dependencies
FILE(REMOVE ${_tolua_pkgfile})
FOREACH(_tolua_inputfile ${_tolua_inputfiles})
FILE(APPEND ${_tolua_pkgfile} "\$cfile \"${_tolua_inputfile}\"\n")
+ LIST(APPEND _implicit_dependencies CXX ${_tolua_inputfile})
ENDFOREACH(_tolua_inputfile)
ADD_CUSTOM_COMMAND(
@@ -66,9 +67,9 @@
-H ${_tolua_hfile}
-s ${TOLUA_PARSER_SOURCE}
${_tolua_pkgfile}
- DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
- IMPLICIT_DEPENDS CXX ${_tolua_inputfiles}
- WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
+ DEPENDS ${TOLUA_PARSER_DEPENDENCIES}
+ IMPLICIT_DEPENDS ${_implicit_dependencies}
+ WORKING_DIRECTORY ${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}
COMMENT "Generating tolua bind files for package ${_tolua_package}"
)
ENDFUNCTION(GENERATE_TOLUA_BINDINGS)
Modified: branches/netp6/cmake/PrecompiledHeaderFiles.cmake
===================================================================
--- branches/netp6/cmake/PrecompiledHeaderFiles.cmake 2009-06-29 16:10:46 UTC (rev 3250)
+++ branches/netp6/cmake/PrecompiledHeaderFiles.cmake 2009-06-29 16:13:26 UTC (rev 3251)
@@ -109,8 +109,8 @@
# This is just the best possible opportunity to address this dependency issue
GET_GCC_COMPILER_FLAGS(${_target_name} _pch_gcc_flags)
# Make sure we recompile the pch file even if only the flags change
- IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_PCH_GCC_FLAGS}")
- SET(_INTERNAL_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
+ IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_${_target_name}_PCH_GCC_FLAGS}")
+ SET(_INTERNAL_${_target_name}_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
FILE(WRITE ${_pch_dep_helper_file} "/* ${_pch_gcc_flags} */")
ENDIF()
Modified: trunk/cmake/PrecompiledHeaderFiles.cmake
===================================================================
--- trunk/cmake/PrecompiledHeaderFiles.cmake 2009-06-29 16:10:46 UTC (rev 3250)
+++ trunk/cmake/PrecompiledHeaderFiles.cmake 2009-06-29 16:13:26 UTC (rev 3251)
@@ -109,8 +109,8 @@
# This is just the best possible opportunity to address this dependency issue
GET_GCC_COMPILER_FLAGS(${_target_name} _pch_gcc_flags)
# Make sure we recompile the pch file even if only the flags change
- IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_PCH_GCC_FLAGS}")
- SET(_INTERNAL_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
+ IF(NOT "${_pch_gcc_flags}" STREQUAL "${_INTERNAL_${_target_name}_PCH_GCC_FLAGS}")
+ SET(_INTERNAL_${_target_name}_PCH_GCC_FLAGS "${_pch_gcc_flags}" CACHE INTERNAL "")
FILE(WRITE ${_pch_dep_helper_file} "/* ${_pch_gcc_flags} */")
ENDIF()
@@ -152,8 +152,8 @@
COMMAND ${CMAKE_CXX_COMPILER}
ARGS ${pchsupport_compiler_cxx_arg1} ${_pch_gcc_flags} -c -x c++-header -o ${_pch_file} ${_pch_header_file}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${_pch_header_file} ${_pch_dep_helper_file}
- IMPLICIT_DEPENDS ${_pch_header_file}
+ DEPENDS ${_pch_dep_helper_file}
+ IMPLICIT_DEPENDS CXX ${_pch_header_file}
VERBATIM
)
More information about the Orxonox-commit
mailing list