Browse Source

Disable warning 4244 ( double/int conversion) on Windows for bindings, only generate PAK files when ATOMIC_BUILD_PAK_FILES is set

Josh Engebretson 10 years ago
parent
commit
c066f5722c
2 changed files with 10 additions and 0 deletions
  1. 6 0
      Source/AtomicJS/JSBind/JSBModule.cpp
  2. 4 0
      Source/Tools/PackageTool/CMakeLists.txt

+ 6 - 0
Source/AtomicJS/JSBind/JSBModule.cpp

@@ -207,6 +207,12 @@ void JSBModule::EmitSource(const String& filepath)
 
 
     source_ = "// This file was autogenerated by JSBind, changes will be lost\n";
     source_ = "// This file was autogenerated by JSBind, changes will be lost\n";
 
 
+    source_ += "#ifdef ATOMIC_PLATFORM_WINDOWS\n";
+
+    source_ += "#pragma warning(disable: 4244) // possible loss of data\n";
+
+    source_ += "#endif\n";
+
     if (Requires("3D"))
     if (Requires("3D"))
     {
     {
         source_ += "#ifdef ATOMIC_3D\n";
         source_ += "#ifdef ATOMIC_3D\n";

+ 4 - 0
Source/Tools/PackageTool/CMakeLists.txt

@@ -8,6 +8,8 @@ target_link_libraries(PackageTool ${ATOMIC_LINK_LIBRARIES})
 file (GLOB_RECURSE EDITORDATA_FILES ${CMAKE_SOURCE_DIR}/Data/AtomicEditor/Resources/EditorData/*)
 file (GLOB_RECURSE EDITORDATA_FILES ${CMAKE_SOURCE_DIR}/Data/AtomicEditor/Resources/EditorData/*)
 file (GLOB_RECURSE COREDATA_FILES ${CMAKE_SOURCE_DIR}/Data/AtomicPlayer/Resources/CoreData/*)
 file (GLOB_RECURSE COREDATA_FILES ${CMAKE_SOURCE_DIR}/Data/AtomicPlayer/Resources/CoreData/*)
 
 
+if (ATOMIC_BUILD_PAK_FILES)
+
 set (EDITORDATA_PAK "${CMAKE_SOURCE_DIR}/Bin/EditorData.pak")
 set (EDITORDATA_PAK "${CMAKE_SOURCE_DIR}/Bin/EditorData.pak")
 set (COREDATA_PAK "${CMAKE_SOURCE_DIR}/Bin/CoreData.pak")
 set (COREDATA_PAK "${CMAKE_SOURCE_DIR}/Bin/CoreData.pak")
 
 
@@ -52,3 +54,5 @@ elseif (LINUX)
 endif()
 endif()
 
 
 add_custom_target(BuildEditorFiles ALL DEPENDS AtomicEditor "${EDITORDATA_PAK}" "${COREDATA_PAK}")
 add_custom_target(BuildEditorFiles ALL DEPENDS AtomicEditor "${EDITORDATA_PAK}" "${COREDATA_PAK}")
+
+endif()