diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ea090f..187babf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Version History =============== -## Open PGL x.x.x +## Open PGL 0.3.1 - `Field`: - Added `Reset()` function to reset a guiding field (e.g., when the lighting or the scene diff --git a/CMakeLists.txt b/CMakeLists.txt index b105f97..8a7527e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,18 +21,20 @@ include(GNUInstallDirs) ## Establish project ## -project(openpgl VERSION 0.3.0 LANGUAGES C CXX) +project(openpgl VERSION 0.3.1 LANGUAGES C CXX) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) include(openpgl_macros) ## openpgl specific configuration ## -option(BUILD_PYTHON "Build python wrapper 'pyopenpgl'." OFF) -option(USE_OMP_THREADING "Use omp instead of tbb for threading." OFF) -option(BUILD_STATIC "Build OpenPGL as static library." OFF) +option(OPENPGL_BUILD_PYTHON "Build python wrapper 'pyopenpgl'." OFF) +option(OPENPGL_USE_OMP_THREADING "Use omp instead of tbb for threading." OFF) +option(OPENPGL_BUILD_STATIC "Build OpenPGL as static library." OFF) -option(ISA_AVX512 "Build with support for AVX512." OFF) +option(OPENPGL_ISA_AVX512 "Build with support for AVX512." OFF) + +SET(OPENPGL_TBB_COMPONENT "tbb" CACHE STRING "The TBB component/library name.") find_package(embree 3.6.1 REQUIRED) diff --git a/README.md b/README.md index 9198ae0..85f16f2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Intel® Open Path Guiding Library -This is release v0.3.0 of Intel® Open PGL. For changes and new features, +This is release v0.3.1 of Intel® Open PGL. For changes and new features, see the [changelog](CHANGELOG.md). Visit http://www.openpgl.org for more information. @@ -48,7 +48,7 @@ specification is still in flux and might change with upcoming releases. # Version History -## Open PGL x.x.x +## Open PGL 0.3.1 - `Field`: - Added `Reset()` function to reset a guiding field (e.g., when @@ -219,16 +219,16 @@ Configure the Open PGL build using: - `CMAKE_INSTALL_PREFIX` will be the root directory where everything gets installed. - - `BUILD_STATIC` if Open PGL should be built as a static or shared - library (default `OFF`). + - `OPENPGL_BUILD_STATIC` if Open PGL should be built as a static + or shared library (default `OFF`). - - `ISA_AVX512` if Open PGL is compiled with AVX-512 support - (default `OFF`). + - `OPENPGL_ISA_AVX512` if Open PGL is compiled with AVX-512 + support (default `OFF`). - `embree_DIR` location of the Embree CMake configuration file (e.g., \[embree\_install\]/lib/cmake/embree-3.6.1). - - `TBB_ROOT` location of the TBB installation. + - `OPENPGL_TBB_ROOT` location of the TBB installation. Build and install Open PGL using: @@ -249,7 +249,7 @@ To make CMake aware of Open PGL’s CMake configuration scripts the `openpgl_DIR` has to be set to their location during configuration: ``` bash -cmake -Dopenpgl_DIR=[openpgl_install]/lib/cmake/openpgl-0.3.0 .. +cmake -Dopenpgl_DIR=[openpgl_install]/lib/cmake/openpgl-0.3.1 .. ``` After that, adding OpenPGL to a CMake project/target is done by first diff --git a/doc/compilation.md b/doc/compilation.md index dea16ea..560d8fa 100644 --- a/doc/compilation.md +++ b/doc/compilation.md @@ -79,14 +79,14 @@ Configure the Open PGL build using: - `CMAKE_INSTALL_PREFIX` will be the root directory where everything gets installed. - - `BUILD_STATIC` if Open PGL should be built as a static or shared library (default `OFF`). + - `OPENPGL_BUILD_STATIC` if Open PGL should be built as a static or shared library (default `OFF`). - - `ISA_AVX512` if Open PGL is compiled with AVX-512 support (default `OFF`). + - `OPENPGL_ISA_AVX512` if Open PGL is compiled with AVX-512 support (default `OFF`). - `embree_DIR` location of the Embree CMake configuration file (e.g., [embree_install]/lib/cmake/embree-3.6.1). - - `TBB_ROOT` location of the TBB installation. + - `OPENPGL_TBB_ROOT` location of the TBB installation. Build and install Open PGL using: diff --git a/gitlab/.gitlab-ci.yml b/gitlab/.gitlab-ci.yml index 2c2dfa0..4feddcf 100644 --- a/gitlab/.gitlab-ci.yml +++ b/gitlab/.gitlab-ci.yml @@ -17,7 +17,7 @@ stages: .job_template: &base_build_job stage: build script: - - gitlab/build.sh -G Ninja -D BUILD_PYTHON=OFF + - gitlab/build.sh -G Ninja -D OPENPGL_BUILD_PYTHON=OFF artifacts: paths: - build/install @@ -46,38 +46,38 @@ build-centos7: <<: *build_job_docker image: $DOCKER_REGISTRY/ospray/docker-images:centos7 script: - - gitlab/build.sh -D BUILD_PYTHON=OFF + - gitlab/build.sh -D OPENPGL_BUILD_PYTHON=OFF build-centos8: <<: *build_job_docker image: $DOCKER_REGISTRY/ospray/docker-images:centos8 script: - - gitlab/build.sh -G Ninja -D BUILD_PYTHON=OFF + - gitlab/build.sh -G Ninja -D OPENPGL_BUILD_PYTHON=OFF build-ubuntu16.04: <<: *build_job_docker image: $DOCKER_REGISTRY/ospray/docker-images:ubuntu16.04 script: - - gitlab/build.sh -G Ninja -D BUILD_PYTHON=OFF + - gitlab/build.sh -G Ninja -D OPENPGL_BUILD_PYTHON=OFF allow_failure: true build-ubuntu18.04: <<: *build_job_docker image: $DOCKER_REGISTRY/ospray/docker-images:ubuntu18.04 script: - - gitlab/build.sh -G Ninja -D BUILD_PYTHON=OFF + - gitlab/build.sh -G Ninja -D OPENPGL_BUILD_PYTHON=OFF build-ubuntu20.04: <<: *build_job_docker image: $DOCKER_REGISTRY/ospray/docker-images:ubuntu20.04 script: - - gitlab/build.sh -G Ninja -D BUILD_PYTHON=OFF + - gitlab/build.sh -G Ninja -D OPENPGL_BUILD_PYTHON=OFF build-arch: <<: *build_job_docker image: $DOCKER_REGISTRY/ospray/docker-images:arch script: - - gitlab/build.sh -D BUILD_PYTHON=OFF + - gitlab/build.sh -D OPENPGL_BUILD_PYTHON=OFF build-macOS: <<: *base_build_job diff --git a/openpgl/CMakeLists.txt b/openpgl/CMakeLists.txt index e32eb93..6c6400d 100644 --- a/openpgl/CMakeLists.txt +++ b/openpgl/CMakeLists.txt @@ -5,7 +5,7 @@ set(DEVICE_SRC api/deviceCPU4.cpp api/deviceCPU8.cpp) -if(ISA_AVX512) +if(OPENPGL_ISA_AVX512) set(DEVICE_SRC ${DEVICE_SRC} api/deviceCPU16.cpp) endif() @@ -18,7 +18,7 @@ set(OPENPGL_SRC ../third-party/embreeSrc/common/simd/sse.cpp ) -if(BUILD_STATIC) +if(OPENPGL_BUILD_STATIC) add_library(${PROJECT_NAME} STATIC ${OPENPGL_SRC} ) @@ -52,7 +52,7 @@ else() set(OPENPGL_RELEASE_OPTIONS -O3 -Wall -msse2 -msse4.1) set_source_files_properties(api/deviceCPU4.cpp PROPERTIES COMPILE_FLAGS "-msse2 -msse4.1") set_source_files_properties(api/deviceCPU8.cpp PROPERTIES COMPILE_FLAGS "-msse2 -msse4.1 -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") - if(ISA_AVX512) + if(OPENPGL_ISA_AVX512) set_source_files_properties(api/deviceCPU16.cpp PROPERTIES COMPILE_FLAGS "-msse2 -msse4.1 -mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl -mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2") endif() #set(OPENPGL_RELEASE_OPTIONS ${OPENPGL_RELEASE_OPTIONS} -fno-strict-aliasing -Wno-padded -ftree-vectorize -mfpmath=sse -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fno-math-errno -fomit-frame-pointer ) @@ -60,7 +60,7 @@ else() endif() -if(USE_OMP_THREADING) +if(OPENPGL_USE_OMP_THREADING) set(OPENPGL_RELEASE_OPTIONS -fopenmp) endif() @@ -69,13 +69,19 @@ target_compile_options(${PROJECT_NAME} PUBLIC "$<$:${OPENPGL_REL # CMAKE 3.8 feature #target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) -if(USE_OMP_THREADING) +if(OPENPGL_USE_OMP_THREADING) add_compile_definitions(OPENPGL_USE_OMP_THREADING) endif() #add_compile_options() -FIND_PACKAGE(TBB REQUIRED tbb) +if (NOT ${OPENPGL_TBB_ROOT} STREQUAL "") + set(TBB_FIND_PACKAGE_OPTION "NO_DEFAULT_PATH") + set(TBB_ROOT ${OPENPGL_TBB_ROOT}) + list(APPEND CMAKE_PREFIX_PATH ${OPENPGL_TBB_ROOT}) +endif() + +FIND_PACKAGE(TBB REQUIRED ${OPENPGL_TBB_COMPONENT}) FIND_PACKAGE(embree 3.6 REQUIRED) @@ -100,7 +106,7 @@ target_include_directories(${PROJECT_NAME} ) target_link_libraries(${PROJECT_NAME} PRIVATE embree) -target_link_libraries(${PROJECT_NAME} PRIVATE TBB::tbb) +target_link_libraries(${PROJECT_NAME} PRIVATE TBB::${OPENPGL_TBB_COMPONENT}) ## Configure OpenPGL installation ## diff --git a/superbuild/CMakeLists.txt b/superbuild/CMakeLists.txt index 23acd31..12cc783 100644 --- a/superbuild/CMakeLists.txt +++ b/superbuild/CMakeLists.txt @@ -172,7 +172,6 @@ if (NOT BUILD_DEPENDENCIES_ONLY) set(OPENPGL_ARGS -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH} - -DBUILD_PYTHON=OFF -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} @@ -181,17 +180,19 @@ if (NOT BUILD_DEPENDENCIES_ONLY) -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} -DCMAKE_INSTALL_DOCDIR=${CMAKE_INSTALL_DOCDIR} -DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR} + -DOPENPGL_BUILD_PYTHON=OFF ) if(BUILD_STATIC) set(OPENPGL_ARGS ${OPENPGL_ARGS} - -DBUILD_STATIC=${BUILD_STATIC} + -DOPENPGL_BUILD_STATIC=${BUILD_STATIC} ) endif() - if(TBB_ROOT) + if(OPENPGL_TBB_ROOT) set(OPENPGL_ARGS ${OPENPGL_ARGS} - -DTBB_ROOT=${TBB_ROOT} + -DTBB_ROOT=${OPENPGL_TBB_ROOT} + -DOPENPGL_TBB_ROOT=${OPENPGL_TBB_ROOT} ) endif() @@ -204,9 +205,8 @@ if (NOT BUILD_DEPENDENCIES_ONLY) LIST_SEPARATOR | # CMAKE_PREFIX_PATH uses alternate separator. CMAKE_ARGS ${OPENPGL_ARGS} - #$<$:-DISPC_EXECUTABLE=${ISPC_PATH}> BUILD_COMMAND ${DEFAULT_BUILD_COMMAND} - BUILD_ALWAYS OFF + BUILD_ALWAYS ON ) ExternalProject_Add_StepDependencies(openpgl