- fix problem with cmake, windows 'RelWithDebInfo' target, was giving error: "ImportE...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 23 Jan 2011 11:42:29 +0000 (11:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 23 Jan 2011 11:42:29 +0000 (11:42 +0000)
- move test -> tests, this name is used elsewhere in lib/tests.
- change interface code not to loop on a float value (clang warning), harmless, but with extreme cases an eternal loop would still be possible though unlikely.

source/CMakeLists.txt
source/blender/editors/interface/interface_draw.c
source/creator/CMakeLists.txt
source/tests/CMakeLists.txt [moved from source/test/CMakeLists.txt with 99% similarity]
source/tests/bl_test.py [moved from source/test/bl_test.py with 100% similarity]
source/tests/pep8.py [moved from source/test/pep8.py with 100% similarity]
source/tests/rna_array.py [moved from source/test/rna_array.py with 100% similarity]
source/tests/rna_info_dump.py [moved from source/test/rna_info_dump.py with 100% similarity]

index 46e1405df84fb51788ffd04341e9b0a2cd79509f..1929f19f38f829a61a28b90c94ef3839b1999011 100644 (file)
@@ -35,4 +35,4 @@ if(WINDOWS)
        add_subdirectory(icons)
 endif()
 
-add_subdirectory(test)
+add_subdirectory(tests)
index cf6b0652b22cf38eda77eeec018eb539bdff8f6f..4ea0c01d15c70b779d8e35d6f603411f8b6f2666 100644 (file)
@@ -1576,6 +1576,7 @@ void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, fl
 
 void ui_dropshadow(rctf *rct, float radius, float aspect, int select)
 {
+       int i;
        float rad;
        float a;
        char alpha= 2;
@@ -1586,9 +1587,10 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int select)
                rad= (rct->ymax-rct->ymin-10.0f)/2.0f;
        else
                rad= radius;
-       
-       if(select) a= 12.0f*aspect; else a= 12.0f*aspect;
-       for(; a>0.0f; a-=aspect) {
+
+       i= 12;
+       if(select) a= i*aspect; else a= i*aspect;
+       for(; i--; a-=aspect) {
                /* alpha ranges from 2 to 20 or so */
                glColor4ub(0, 0, 0, alpha);
                alpha+= 2;
index 8db4954d876a70891da7e0b65b8a4eeba929980c..2c89c3b6b9fe7509b5c843abf3dc789be473e1cb 100644 (file)
@@ -305,6 +305,7 @@ if(WITH_INSTALL)
                endif()
 
                if(WITH_PYTHON)
+                       # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags.
                        if(NOT CMAKE_BUILD_TYPE) # hack: with multi-configuration generator this is "", so for now copy both python31.dll/zip and python31_d.dll/zip
                                add_custom_command(TARGET blender
                                        POST_BUILD
@@ -322,7 +323,7 @@ if(WITH_INSTALL)
                                        COMMAND if \"$(ConfigurationName)\" == \"MinSizeRel\" xcopy /E /Y \"${LIBDIR}\\release\\python31\\*.*\" \"${TARGETDIR}\\${BLENDER_VERSION}\\python\\lib\\\"
                                )
                        else()
-                               if(CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
+                               if(CMAKE_BUILD_TYPE STREQUAL Debug)
                                        add_custom_command(TARGET blender
                                                POST_BUILD
                                                MAIN_DEPENDENCY blender
similarity index 99%
rename from source/test/CMakeLists.txt
rename to source/tests/CMakeLists.txt
index b9c0d73fa6c5ad9d8c72d73f1ca41884e6809d21..f0771f5fa0f2c6965019bc3b07f86c9d112cf29c 100644 (file)
@@ -81,7 +81,7 @@ add_test(export_obj_all_objects ${EXECUTABLE_OUTPUT_PATH}/blender ${GENERIC_ARGS
        --run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/export_obj_all_objects.obj',use_selection=False,use_nurbs=True\)
        --md5_source=${TEST_OUT_DIR}/export_obj_all_objects.obj
        --md5_source=${TEST_OUT_DIR}/export_obj_all_objects.mtl
-       --md5=c835899ca8993495af8a13c2f229629b --md5_method=FILE
+       --md5=6e033a6a9c923d7aa3613b36e373f55b --md5_method=FILE
 )
 
 
similarity index 100%
rename from source/test/pep8.py
rename to source/tests/pep8.py