Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5915 for code


Ignore:
Timestamp:
Oct 9, 2009, 1:12:47 PM (15 years ago)
Author:
rgrieder
Message:

Added CMake switch to disable multi-file compilations: DISABLE_COMPILATIONS

Location:
code/branches/core5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/cmake/SourceFileUtilities.cmake

    r5871 r5915  
    4747        MESSAGE(FATAL_ERROR "No name provided for source file compilation")
    4848      ENDIF()
    49       SET(_include_string)
    50       FOREACH(_file2 ${_compilation})
    51         SET(_include_string "${_include_string}#include \"${_file2}\"\n")
    52       ENDFOREACH(_file2)
    53       IF(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name})
    54         FILE(READ ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name} _include_string_file)
     49      IF(NOT DISABLE_COMPILATIONS)
     50        SET(_include_string)
     51        FOREACH(_file2 ${_compilation})
     52          SET(_include_string "${_include_string}#include \"${_file2}\"\n")
     53        ENDFOREACH(_file2)
     54        IF(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name})
     55          FILE(READ ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name} _include_string_file)
     56        ENDIF()
     57        IF(NOT _include_string STREQUAL "${_include_string_file}")
     58          FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name} "${_include_string}")
     59        ENDIF()
     60        LIST(APPEND _fullpath_sources ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name})
    5561      ENDIF()
    56       IF(NOT _include_string STREQUAL "${_include_string_file}")
    57         FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name} "${_include_string}")
    58       ENDIF()
    59       LIST(APPEND _fullpath_sources ${CMAKE_CURRENT_BINARY_DIR}/${_compilation_name})
    6062      SET(_compilation_name)
    6163      SET(_compilation)
     
    6567      GET_SOURCE_FILE_PROPERTY(_filepath ${_file} LOCATION)
    6668      LIST(APPEND _fullpath_sources ${_filepath})
    67       IF(_compile)
     69      IF(_compile AND NOT DISABLE_COMPILATIONS)
    6870        LIST(APPEND _compilation ${_filepath})
    6971        LIST(APPEND _fullpath_sources "H")
  • code/branches/core5/src/OrxonoxConfig.cmake

    r5695 r5915  
    3838  OPTION(PCH_ENABLE "Global PCH switch" TRUE)
    3939ENDIF()
     40
     41# Global switch to disable multiple file compilations
     42OPTION(DISABLE_COMPILATIONS "Global multi-file compilation switch" FALSE)
    4043
    4144# Use WinMain() or main()?
Note: See TracChangeset for help on using the changeset viewer.