|
@@ -22,6 +22,12 @@
|
|
|
|
|
|
project("Torque3DEngine")
|
|
|
|
|
|
+if( CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8 )
|
|
|
+ set( TORQUE_CPU_X64 ON )
|
|
|
+elseif( CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 4 )
|
|
|
+ set( TORQUE_CPU_X32 ON )
|
|
|
+endif()
|
|
|
+
|
|
|
if(NOT TORQUE_TEMPLATE)
|
|
|
set(TORQUE_TEMPLATE "Full" CACHE STRING "the template to use")
|
|
|
endif()
|
|
@@ -340,7 +346,12 @@ if(WIN32)
|
|
|
set(TORQUE_CXX_FLAGS_LIBS "/W0" CACHE TYPE STRING)
|
|
|
mark_as_advanced(TORQUE_CXX_FLAGS_LIBS)
|
|
|
|
|
|
- set(TORQUE_CXX_FLAGS_COMMON "-DUNICODE -D_UNICODE /MP /O2 /Ob2 /Oi /Ot /Oy /GT /Zi /W4 /nologo /GF /EHsc /GS- /Gy- /Qpar- /arch:SSE2 /fp:fast /fp:except- /GR /Zc:wchar_t- /D_CRT_SECURE_NO_WARNINGS" CACHE TYPE STRING)
|
|
|
+ set(TORQUE_CXX_FLAGS_COMMON_DEFAULT "-DUNICODE -D_UNICODE /MP /O2 /Ob2 /Oi /Ot /Oy /GT /Zi /W4 /nologo /GF /EHsc /GS- /Gy- /Qpar- /fp:fast /fp:except- /GR /Zc:wchar_t- /D_CRT_SECURE_NO_WARNINGS" )
|
|
|
+ if( TORQUE_CPU_X32 )
|
|
|
+ set(TORQUE_CXX_FLAGS_COMMON_DEFAULT ${TORQUE_CXX_FLAGS_COMMON_DEFAULT}" /arch:SSE2")
|
|
|
+ endif()
|
|
|
+ set(TORQUE_CXX_FLAGS_COMMON ${TORQUE_CXX_FLAGS_COMMON_DEFAULT} CACHE TYPE STRING)
|
|
|
+
|
|
|
mark_as_advanced(TORQUE_CXX_FLAGS_COMMON)
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORQUE_CXX_FLAGS_COMMON}")
|