[Bf-blender-cvs] [df2a739] object_nodes: Include all module functions in a single header for convenience.

Lukas Tönne noreply at git.blender.org
Sat May 14 10:26:30 CEST 2016


Commit: df2a739a86e6d57a2f62ff65d0c81fb766385b36
Author: Lukas Tönne
Date:   Sat May 14 10:25:56 2016 +0200
Branches: object_nodes
https://developer.blender.org/rBdf2a739a86e6d57a2f62ff65d0c81fb766385b36

Include all module functions in a single header for convenience.

===================================================================

M	source/blender/blenvm/llvm/CMakeLists.txt
M	source/blender/blenvm/llvm/llvm_modules.cc
M	source/blender/blenvm/modules/modules.cc
A	source/blender/blenvm/modules/modules.h

===================================================================

diff --git a/source/blender/blenvm/llvm/CMakeLists.txt b/source/blender/blenvm/llvm/CMakeLists.txt
index 035d263..3f36d9b 100644
--- a/source/blender/blenvm/llvm/CMakeLists.txt
+++ b/source/blender/blenvm/llvm/CMakeLists.txt
@@ -57,16 +57,21 @@ set(SRC
 
 set(LLVM_SRC
 	../modules/modules.cc
+	../modules/modules.h
+	../modules/mod_defines.h
+
+	../modules/mod_base.h
+	../modules/mod_color.h
+	../modules/mod_math.h
 )
 set(LLVM_HEADERS
 	../modules/mod_base.h
 	../modules/mod_color.h
-	../modules/mod_defines.h
 	../modules/mod_math.h
 )
 
 if(NOT WITH_BLENVM_IRMODULES)
-	list(APPEND SRC ${LLVM_SRC} ${LLVM_HEADERS})
+	list(APPEND SRC ${LLVM_SRC})
 endif()
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}")
@@ -106,7 +111,7 @@ if(WITH_BLENVM_IRMODULES)
 					-DBVM_MOD_NAMESPACE_END
 					-DBVM_MOD_ANNOTATE_FUNCTIONS
 					-I${CMAKE_CURRENT_SOURCE_DIR}/../../blenlib
-			DEPENDS ${LLVM_SRC} ${LLVM_HEADERS})
+			DEPENDS ${LLVM_SRC})
 	
 		delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${llvm_ir}" ${LLVM_IR_INSTALL_PATH}/modules/)
 		list(APPEND llvm_irs ${llvm_ir})
diff --git a/source/blender/blenvm/llvm/llvm_modules.cc b/source/blender/blenvm/llvm/llvm_modules.cc
index a7939f4..ffd1892 100644
--- a/source/blender/blenvm/llvm/llvm_modules.cc
+++ b/source/blender/blenvm/llvm/llvm_modules.cc
@@ -51,9 +51,7 @@ extern "C" {
 #include "util_math.h"
 #include "util_opcode.h"
 
-#include "mod_base.h"
-#include "mod_color.h"
-#include "mod_math.h"
+#include "modules.h"
 
 namespace blenvm {
 
diff --git a/source/blender/blenvm/modules/modules.cc b/source/blender/blenvm/modules/modules.cc
index 64cb0c7..850410f 100644
--- a/source/blender/blenvm/modules/modules.cc
+++ b/source/blender/blenvm/modules/modules.cc
@@ -25,9 +25,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#include "mod_base.h"
-#include "mod_color.h"
-#include "mod_math.h"
+#include "modules.h"
 
 BVM_MOD_NAMESPACE_BEGIN
 
diff --git a/source/blender/blenvm/modules/modules.cc b/source/blender/blenvm/modules/modules.h
similarity index 74%
copy from source/blender/blenvm/modules/modules.cc
copy to source/blender/blenvm/modules/modules.h
index 64cb0c7..3d9024d 100644
--- a/source/blender/blenvm/modules/modules.cc
+++ b/source/blender/blenvm/modules/modules.h
@@ -25,28 +25,11 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+#ifndef __MODULES_H__
+#define __MODULES_H__
+
 #include "mod_base.h"
 #include "mod_color.h"
 #include "mod_math.h"
 
-BVM_MOD_NAMESPACE_BEGIN
-
-#if 0
-inline int force_linking()
-{
-	int i = 0;
-	i += (long int)VALUE_FLOAT;
-	i += (long int)VALUE_FLOAT3;
-	i += (long int)VALUE_FLOAT4;
-	i += (long int)VALUE_INT;
-	i += (long int)VALUE_MATRIX44;
-	i += (long int)MIX_RGB3;
-	i += (long int)MIX_RGB;
-	
-	return i;
-}
-
-static int f = force_linking();
-#endif
-
-BVM_MOD_NAMESPACE_END
+#endif /* __MODULES_H__ */




More information about the Bf-blender-cvs mailing list