Skip to content

Commit

Permalink
Merge pull request #4 from dneg/v0.0.2
Browse files Browse the repository at this point in the history
Version 0.0.2 - October 8, 2018
  • Loading branch information
matt-warner-dev authored Oct 8, 2018
2 parents a19254f + dffd007 commit 3675130
Show file tree
Hide file tree
Showing 37 changed files with 897 additions and 690 deletions.
34 changes: 22 additions & 12 deletions cmake/FindHDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ IF (HDK_FOUND)
)
ENDIF()
# MESSAGE ( "HDK_VERSION_STRING = ${HDK_VERSION_STRING}")
SET ( HCUSTOM_COMMAND $ENV{HFS}/bin/hcustom )
SET ( HCUSTOM_COMMAND $ENV{HFS}/bin/hcustom )
SET ( HOTL_COMMAND $ENV{HFS}/bin/hotl )

SET ( HDK_INCLUDE_DIR "${HDK_LOCATION}/toolkit/include;${HDK_LOCATION}/toolkit/include/htools" CACHE STRING "HDK include directory" )
Expand Down Expand Up @@ -217,12 +217,22 @@ IF (HDK_FOUND)
SET ( HDK_DEFINITIONS " -DDLLEXPORT= -D_GNU_SOURCE -DLINUX -DAMD64 -m64 -fPIC -DSIZEOF_VOID_P=8 -DSESI_LITTLE_ENDIAN -DENABLE_THREADS -DUSE_PTHREADS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -c -DGCC4 -DGCC3 -Wno-deprecated")
SET ( DEBUG_HDK_DEFINITIONS " -DDLLEXPORT= -D_GNU_SOURCE -DLINUX -DAMD64 -m64 -fPIC -DSIZEOF_VOID_P=8 -DSESI_LITTLE_ENDIAN -DENABLE_THREADS -DUSE_PTHREADS -D_REENTRANT -D_FILE_OFFSET_BITS=64 -c -DGCC4 -DGCC3 -Wno-deprecated -g")
ENDIF ()
# MESSAGE ( "DEBUG_HDK_DEFINITIONS = ${DEBUG_HDK_DEFINITIONS}" )
# MESSAGE ( "HDK_DEFINITIONS = ${HDK_DEFINITIONS} ")

# Split each definition and add them separately (otherwise we can get into weird string manipulation issues within CMake)

SEPARATE_ARGUMENTS( DEBUG_HDK_DEFINITIONS )
SEPARATE_ARGUMENTS( HDK_DEFINITIONS )

MESSAGE ( "DEBUG_HDK_DEFINITIONS = ${DEBUG_HDK_DEFINITIONS}" )
MESSAGE ( "HDK_DEFINITIONS = ${HDK_DEFINITIONS} ")
IF (CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS ( "${DEBUG_HDK_DEFINITIONS}" )
FOREACH ( DEFINITION ${DEBUG_HDK_DEFINITIONS} )
ADD_DEFINITIONS( ${DEFINITION} )
ENDFOREACH ()
ELSE (CMAKE_BUILD_TYPE MATCHES Debug)
ADD_DEFINITIONS ( "${HDK_DEFINITIONS}" )
FOREACH ( DEFINITION ${HDK_DEFINITIONS} )
ADD_DEFINITIONS( ${DEFINITION} )
ENDFOREACH ()
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)

ENDIF (WIN32)
Expand All @@ -233,9 +243,9 @@ IF (HDK_FOUND)
#ELSEIF (APPLE)
# FILE ( GLOB DSOLIB_DYLIB $ENV{HFS}/../Libraries/*.dylib )
ELSE (WIN32)
# Linux/OSX
LINK_DIRECTORIES ( $ENV{HDSO} )
# LINK_DIRECTORIES ( $ENV{HFS}/dsolib )
# Linux/OSX
LINK_DIRECTORIES ( $ENV{HDSO} )
# LINK_DIRECTORIES ( $ENV{HFS}/dsolib )
ENDIF (WIN32)

IF (APPLE)
Expand All @@ -255,7 +265,7 @@ IF (HDK_FOUND)
ENDIF ()
FIND_PROGRAM ( PYTHON_EXECUTABLE NAMES python )
EXECUTE_PROCESS ( COMMAND "${PYTHON_EXECUTABLE}" ${PYTHON_SCRIPT} ${_src_name} )

ENDFUNCTION ()

FUNCTION ( HDK_ADD_EXECUTABLE _exe_NAME )
Expand Down Expand Up @@ -300,11 +310,11 @@ IF (HDK_FOUND)
tbb
)
ENDIF (APPLE)

ENDFUNCTION ()

FUNCTION ( HDK_ADD_LIBRARY _lib_NAME )

ADD_DEFINITIONS ( -DMAKING_DSO )

SET ( HDK_LIBRARY_DIRS $ENV{HFS}/../Libraries )
Expand Down Expand Up @@ -339,7 +349,7 @@ IF (HDK_FOUND)
ENDFUNCTION ()

FUNCTION ( HDK_ADD_STANDALONE_LIBRARY _lib_NAME )

ADD_DEFINITIONS ( -DMAKING_DSO )

SET ( HDK_LIBRARY_DIRS $ENV{HFS}/../Libraries )
Expand Down
23 changes: 23 additions & 0 deletions cmake/FindOpenVDB_AX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,27 @@ IF( OpenVDB_AX_FOUND )
NO_SYSTEM_ENVIRONMENT_PATH
)

SET( OPENVDB_AX_VERSION_FILE ${OpenVDB_AX_INCLUDE_DIR}/openvdb_ax/version.h )

FILE( STRINGS "${OPENVDB_AX_VERSION_FILE}" openvdb_ax_major_version_str
REGEX "^#define[\t ]+OPENVDB_AX_LIBRARY_MAJOR_VERSION_NUMBER[\t ]+.*")
FILE( STRINGS "${OPENVDB_AX_VERSION_FILE}" openvdb_ax_minor_version_str
REGEX "^#define[\t ]+OPENVDB_AX_LIBRARY_MINOR_VERSION_NUMBER[\t ]+.*")
FILE( STRINGS "${OPENVDB_AX_VERSION_FILE}" openvdb_ax_patch_version_str
REGEX "^#define[\t ]+OPENVDB_AX_LIBRARY_PATCH_VERSION_NUMBER[\t ]+.*")

STRING( REGEX REPLACE "^.*OPENVDB_AX_LIBRARY_MAJOR_VERSION_NUMBER[\t ]+([0-9]*).*$" "\\1"
_openvdb_ax_major_version_number "${openvdb_ax_major_version_str}")
STRING( REGEX REPLACE "^.*OPENVDB_AX_LIBRARY_MINOR_VERSION_NUMBER[\t ]+([0-9]*).*$" "\\1"
_openvdb_ax_minor_version_number "${openvdb_ax_minor_version_str}")
STRING( REGEX REPLACE "^.*OPENVDB_AX_LIBRARY_PATCH_VERSION_NUMBER[\t ]+([0-9]*).*$" "\\1"
_openvdb_ax_patch_version_number "${openvdb_ax_patch_version_str}")

SET( OPENVDB_AX_MAJOR_VERSION_NUMBER ${_openvdb_ax_major_version_number}
CACHE STRING "OpenVDB AX major version number" )
SET( OPENVDB_AX_MINOR_VERSION_NUMBER ${_openvdb_ax_minor_version_number}
CACHE STRING "OpenVDB AX minor version number" )
SET( OPENVDB_AX_PATCH_VERSION_NUMBER ${_openvdb_ax_patch_version_number}
CACHE STRING "OpenVDB AX patch version number" )

ENDIF( OpenVDB_AX_FOUND )
37 changes: 37 additions & 0 deletions openvdb_ax/CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
OpenVDB AX Version History
==========================

Version 0.0.2 - October 8, 2018

Improvements:
- Added library version naming for libopenvdb_ax.
- Updated Compute Generator initialization methods to leverage the
function signature framework.
- Improved the usage of CustomData for runtime retrieval of user parameters.
- Add Travis CI support for the core library.
- A variety of comment fixes and improvements.
- Added COPYRIGHT and CHANGES file.

Bug fixes:
- Compilation fixes to the vdb_ax command-line binary.
[Reported by Elisa Prana]
- Fixed an issue where LLVM would assert due to void pointer instantiation.
[Reported by Elisa Prana]
- Fixed an issue where MCJIT was not being linked in on some platforms.
[Reported by Elisa Prana]
- CMake and build fixes for Houdini 17.

API Changes:
- Refactoring of the Compute Functions and their usage within their
corresponding Executables. Moved a portion of compiler specific code
into the compiler directory and out of codegen.
- Moved LeafLocalData into the compiler directory.
- Added m prefix to members of CompilerOptions.
- Added a constant shared pointer typedef to CustomData.
- Removed the getFunctionList() compute generator function.
- The CustomData argument for Executable::compiler now has a default empty
argument and is optional.
- Removed CustomData argument from the ComputeGenerator class constructors.


Version 0.0.1 - August 10 2018 (initial public release)
35 changes: 25 additions & 10 deletions openvdb_ax/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,26 @@ IF (NOT WIN32)
FIND_PACKAGE ( Threads REQUIRED )
ENDIF()

# Determine OpenVDB version
FIND_PACKAGE ( OpenVDB REQUIRED )
# Determine OpenVDB AX version

SET( OPENVDB_AX_VERSION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/version.h )

FILE( STRINGS "${OPENVDB_AX_VERSION_FILE}" openvdb_ax_major_version_str REGEX "^#define[\t ]+OPENVDB_AX_LIBRARY_MAJOR_VERSION_NUMBER[\t ]+.*")
FILE( STRINGS "${OPENVDB_AX_VERSION_FILE}" openvdb_ax_minor_version_str REGEX "^#define[\t ]+OPENVDB_AX_LIBRARY_MINOR_VERSION_NUMBER[\t ]+.*")
FILE( STRINGS "${OPENVDB_AX_VERSION_FILE}" openvdb_ax_patch_version_str REGEX "^#define[\t ]+OPENVDB_AX_LIBRARY_PATCH_VERSION_NUMBER[\t ]+.*")

STRING( REGEX REPLACE "^.*OPENVDB_AX_LIBRARY_MAJOR_VERSION_NUMBER[\t ]+([0-9]*).*$" "\\1"
_openvdb_ax_major_version_number "${openvdb_ax_major_version_str}")
STRING( REGEX REPLACE "^.*OPENVDB_AX_LIBRARY_MINOR_VERSION_NUMBER[\t ]+([0-9]*).*$" "\\1"
_openvdb_ax_minor_version_number "${openvdb_ax_minor_version_str}")
STRING( REGEX REPLACE "^.*OPENVDB_AX_LIBRARY_PATCH_VERSION_NUMBER[\t ]+([0-9]*).*$" "\\1"
_openvdb_ax_patch_version_number "${openvdb_ax_patch_version_str}")

SET( OPENVDB_AX_MAJOR_VERSION_NUMBER ${_openvdb_ax_major_version_number} CACHE STRING "OpenVDB AX major version number" )
SET( OPENVDB_AX_MINOR_VERSION_NUMBER ${_openvdb_ax_minor_version_number} CACHE STRING "OpenVDB AX minor version number" )
SET( OPENVDB_AX_PATCH_VERSION_NUMBER ${_openvdb_ax_patch_version_number} CACHE STRING "OpenVDB AX patch version number" )

# Set the variables that are otherwise defined in the core module.
SET ( OPENVDB_MAJOR_VERSION_NUMBER ${OpenVDB_MAJOR_VERSION} )
SET ( OPENVDB_MINOR_VERSION_NUMBER ${OpenVDB_MINOR_VERSION} )
SET ( OPENVDB_PATCH_VERSION_NUMBER ${OpenVDB_PATCH_VERSION} )
FIND_PACKAGE ( OpenVDB REQUIRED )

# Use the library installed
SET ( OPENVDB_SHARED_LIB ${OpenVDB_OPENVDB_LIBRARY} )
Expand Down Expand Up @@ -147,6 +160,8 @@ SET_TARGET_PROPERTIES(
openvdb_ax_shared
PROPERTIES
OUTPUT_NAME openvdb_ax
SOVERSION ${OPENVDB_AX_MAJOR_VERSION_NUMBER}.${OPENVDB_AX_MINOR_VERSION_NUMBER}
VERSION ${OPENVDB_AX_MAJOR_VERSION_NUMBER}.${OPENVDB_AX_MINOR_VERSION_NUMBER}.${OPENVDB_AX_PATCH_VERSION_NUMBER}
)

SET ( VDB_AX_SOURCE_FILES cmd/openvdb_ax/main.cc )
Expand Down Expand Up @@ -290,9 +305,8 @@ SET ( OPENVDB_AX_AST_INCLUDE_FILES
SET ( OPENVDB_AX_CODEGEN_INCLUDE_FILES
codegen/ComputeGenerator.h
codegen/FunctionRegistry.h
codegen/FunctionTypes.h
codegen/Functions.h
codegen/LeafLocalData.h
codegen/FunctionTypes.h
codegen/PointComputeGenerator.h
codegen/PointFunctions.h
codegen/SymbolTable.h
Expand All @@ -306,12 +320,13 @@ SET ( OPENVDB_AX_COMPILER_INCLUDE_FILES
compiler/Compiler.h
compiler/CompilerOptions.h
compiler/CustomData.h
compiler/TargetRegistry.h
compiler/LeafLocalData.h
compiler/PointExecutable.h
compiler/TargetRegistry.h
compiler/VolumeExecutable.h
)

INSTALL (FILES Exceptions.h DESTINATION include/openvdb_ax/)
INSTALL (FILES Exceptions.h version.h DESTINATION include/openvdb_ax/)
INSTALL (FILES ${OPENVDB_AX_AST_INCLUDE_FILES} DESTINATION include/openvdb_ax/ast)
INSTALL (FILES ${OPENVDB_AX_CODEGEN_INCLUDE_FILES} DESTINATION include/openvdb_ax/codegen)
INSTALL (FILES ${OPENVDB_AX_COMPILER_INCLUDE_FILES} DESTINATION include/openvdb_ax/compiler)
25 changes: 25 additions & 0 deletions openvdb_ax/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2015-2018 DNEG Visual Effects

All rights reserved. This software is distributed under the
Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )

Redistributions of source code must retain the above copyright
and license notice and the following restrictions and disclaimer.

* Neither the name of DNEG Visual Effects nor the names
of its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
25 changes: 12 additions & 13 deletions openvdb_ax/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,16 @@ ifdef LINUX
endif

INCLUDE_NAMES := Exceptions.h \
version.h \
ast/AST.h \
ast/Literals.h \
ast/PrintTree.h \
ast/Scanners.h \
ast/Tokens.h \
codegen/ComputeGenerator.h \
codegen/FunctionRegistry.h \
codegen/FunctionTypes.h \
codegen/Functions.h \
codegen/LeafLocalData.h \
codegen/FunctionTypes.h \
codegen/PointComputeGenerator.h \
codegen/PointFunctions.h \
codegen/SymbolTable.h \
Expand All @@ -278,8 +278,9 @@ INCLUDE_NAMES := Exceptions.h \
compiler/Compiler.h \
compiler/CompilerOptions.h \
compiler/CustomData.h \
compiler/TargetRegistry.h \
compiler/LeafLocalData.h \
compiler/PointExecutable.h \
compiler/TargetRegistry.h \
compiler/VolumeExecutable.h \
#

Expand Down Expand Up @@ -372,12 +373,12 @@ ALL_SRC_FILES := $(SRC_FILES)
OBJ_NAMES := $(SRC_NAMES:.cc=.o)
TEST_OBJ_NAMES := $(TEST_SRC_NAMES:.cc=.o)

LIB_MAJOR_VERSION=$(shell grep 'define OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER ' \
$(OPENVDB_INCL_DIR)/openvdb/version.h | sed 's/[^0-9]*//g')
LIB_MINOR_VERSION=$(shell grep 'define OPENVDB_LIBRARY_MINOR_VERSION_NUMBER ' \
$(OPENVDB_INCL_DIR)/openvdb/version.h | sed 's/[^0-9]*//g')
LIB_PATCH_VERSION=$(shell grep 'define OPENVDB_LIBRARY_PATCH_VERSION_NUMBER ' \
$(OPENVDB_INCL_DIR)/openvdb/version.h | sed 's/[^0-9]*//g')
LIB_MAJOR_VERSION=$(shell grep 'define OPENVDB_AX_LIBRARY_MAJOR_VERSION_NUMBER ' \
version.h | sed 's/[^0-9]*//g')
LIB_MINOR_VERSION=$(shell grep 'define OPENVDB_AX_LIBRARY_MINOR_VERSION_NUMBER ' \
version.h | sed 's/[^0-9]*//g')
LIB_PATCH_VERSION=$(shell grep 'define OPENVDB_AX_LIBRARY_PATCH_VERSION_NUMBER ' \
version.h | sed 's/[^0-9]*//g')

LIB_VERSION=$(LIB_MAJOR_VERSION).$(LIB_MINOR_VERSION).$(LIB_PATCH_VERSION)
SO_VERSION=$(LIB_MAJOR_VERSION).$(LIB_MINOR_VERSION)
Expand Down Expand Up @@ -420,7 +421,7 @@ ALL_PRODUCTS := \

.SUFFIXES: .o .cc

.PHONY: all clean depend .depend doc install lib pdfdoc test grammar
.PHONY: all clean depend doc install lib pdfdoc test grammar

.cc.o:
@echo "Building $@ because of $(call list_deps)"
Expand Down Expand Up @@ -556,7 +557,7 @@ install: install_lib vdb_ax doc
# containing a rule for each *.o file. Consider generating a separate
# dependency file for each *.o file instead.

.depend: $(ALL_INCLUDE_FILES) $(ALL_SRC_FILES)
depend: $(ALL_INCLUDE_FILES) $(ALL_SRC_FILES)
@echo "Generating dependencies because of $(list_deps)"
$(RM) $(DEPEND)
for f in $(SRC_NAMES) $(CMD_SRC_NAMES); \
Expand All @@ -572,8 +573,6 @@ install: install_lib vdb_ax doc
done; \
fi

depend: .depend

# Compile an implicit translation unit for each header to identify any indirect includes
HEADER_TEST_CXXFLAGS := $(CXXFLAGS)
HEADER_TEST_FILES := $(addprefix header_test-,$(INCLUDE_NAMES) $(CMD_INCLUDE_NAMES))
Expand Down
2 changes: 1 addition & 1 deletion openvdb_ax/ast/AST.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include <openvdb/Types.h>
#include <openvdb/util/Name.h>
#include <openvdb/version.h>
#include <openvdb_ax/version.h>

#include <memory>
#include <utility>
Expand Down
2 changes: 1 addition & 1 deletion openvdb_ax/ast/PrintTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#ifndef OPENVDB_AX_AST_PRINT_TREE_HAS_BEEN_INCLUDED
#define OPENVDB_AX_AST_PRINT_TREE_HAS_BEEN_INCLUDED

#include <openvdb/version.h>
#include <openvdb_ax/version.h>

#include <iosfwd>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion openvdb_ax/ast/Tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define OPENVDB_AX_AST_TOKENS_HAS_BEEN_INCLUDED

#include <openvdb/util/Name.h>
#include <openvdb/version.h>
#include <openvdb_ax/version.h>

#include <openvdb_ax/Exceptions.h>

Expand Down
Loading

0 comments on commit 3675130

Please sign in to comment.