[11197] Allow of std malloc use instead of TBB

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
cipherCOM 2011-02-22 19:54:48 +03:00 committed by VladimirMangos
parent fd39a2bdb9
commit f9c184b097
3 changed files with 22 additions and 16 deletions

View file

@ -101,6 +101,7 @@ option(DEBUG "Debug mode" 0)
# option(CLI "With CLI" 1) # Not used by MaNGOS so far # option(CLI "With CLI" 1) # Not used by MaNGOS so far
# option(RA "With Remote Access" 0) # TODO: support remote access # option(RA "With Remote Access" 0) # TODO: support remote access
option(TBB_USE_EXTERNAL "Use external TBB" 0) option(TBB_USE_EXTERNAL "Use external TBB" 0)
option(USE_STD_MALLOC "Use standard malloc instead of TBB" 0)
option(ACE_USE_EXTERNAL "Use external ACE" 0) option(ACE_USE_EXTERNAL "Use external ACE" 0)
find_package(PCHSupport) find_package(PCHSupport)
@ -167,6 +168,7 @@ else()
include(cmake/ImportACE.cmake) include(cmake/ImportACE.cmake)
endif() endif()
if(NOT USE_STD_MALLOC)
unset(TBB_INCLUDE_DIR CACHE) unset(TBB_INCLUDE_DIR CACHE)
unset(TBB_LIBRARIES CACHE) unset(TBB_LIBRARIES CACHE)
unset(TBB_LIBRARIES_DIR CACHE) unset(TBB_LIBRARIES_DIR CACHE)
@ -183,6 +185,7 @@ if(TBB_USE_EXTERNAL)
else() else()
include(cmake/ImportTBB.cmake) include(cmake/ImportTBB.cmake)
endif() endif()
endif()
# Win32 delifered packages # Win32 delifered packages
if(WIN32) if(WIN32)
@ -416,6 +419,9 @@ if(WIN32)
set(DEFINITIONS ${DEFINITIONS} WIN32 _WIN32) set(DEFINITIONS ${DEFINITIONS} WIN32 _WIN32)
set(DEFINITIONS_RELEASE ${DEFINITIONS_RELEASE} _CRT_SECURE_NO_WARNINGS) set(DEFINITIONS_RELEASE ${DEFINITIONS_RELEASE} _CRT_SECURE_NO_WARNINGS)
endif() endif()
if(USE_STD_MALLOC)
set(DEFINITIONS ${DEFINITIONS} USE_STANDARD_MALLOC)
endif()
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}") set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}")
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE "${DEFINITIONS_RELEASE}") set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE "${DEFINITIONS_RELEASE}")

View file

@ -16,7 +16,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
if(NOT TBB_USE_EXTERNAL) if(NOT (TBB_USE_EXTERNAL OR USE_STD_MALLOC))
add_subdirectory(tbb) add_subdirectory(tbb)
endif() endif()

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11196" #define REVISION_NR "11197"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__