Skip to content

Commit

Permalink
Merge pull request #326 from cgogn/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pierrekraemer authored Oct 4, 2017
2 parents f9f0c56 + 786fe71 commit 569a0d6
Show file tree
Hide file tree
Showing 471 changed files with 196,126 additions and 19,469 deletions.
48 changes: 30 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ project(CGoGN
LANGUAGES CXX C
)

foreach(p
CMP0048 # version
CMP0054 # CMake 3.1
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
endif()
endforeach()

enable_testing()

#### Default build type
Expand Down Expand Up @@ -47,9 +56,9 @@ endif(NOT MSVC)
set(CGOGN_THIRDPARTY_DIR ${CGOGN_PATH}/thirdparty)
option(CGOGN_PROVIDE_EIGEN "Use the version of eigen that is packaged with CGoGN." ON)
option(CGOGN_PROVIDE_TINYXML2 "Use the version of tinyxml2 that is packaged with CGoGN." ON)
option(CGOGN_BUILD_TESTS "Build cgogn unit tests using google test framework." ON)
option(CGOGN_BUILD_EXAMPLES "Build some example apps." ON)
option(CGOGN_BUILD_BENCHS "Build the benchmarks using google benchmark framework." ON)
option(CGOGN_BUILD_TESTS "Build cgogn unit tests using google test framework." OFF)
option(CGOGN_BUILD_EXAMPLES "Build some example apps." OFF)
option(CGOGN_BUILD_BENCHS "Build the benchmarks using google benchmark framework." OFF)
option(CGOGN_USE_OPENMP "Activate openMP directives." OFF)
option(CGOGN_USE_SIMD "Enable SIMD instructions (sse,avx...)" ON)
option(CGOGN_ENABLE_LTO "Enable link-time optimizations (only with gcc)" ON)
Expand Down Expand Up @@ -140,35 +149,38 @@ endif()
include(GenerateExportHeader)
include(CMakePackageConfigHelpers)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)


subdirlist(CGOGN_CONFIGURED_MODULES ${CGOGN_SOURCE_DIR}/cgogn)

add_subdirectory(${CGOGN_THIRDPARTY_DIR})

foreach(subdir ${CGOGN_CONFIGURED_MODULES})
set(enabled_by_default ON)
option( MODULE_${subdir} "Enable CGOGN component ${subdir}" ${enabled_by_default})
if(MODULE_${subdir})
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir}")
option( CGOGN_MODULE_${subdir} "Enable CGOGN component ${subdir}" ON)
if(CGOGN_MODULE_${subdir})
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir}")
endif()
endforeach()

foreach(subdir ${CGOGN_CONFIGURED_MODULES})
if(MODULE_${subdir})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir})
if(CGOGN_MODULE_${subdir})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir})
endif()
endforeach()

foreach(subdir ${CGOGN_CONFIGURED_MODULES})
if(CGOGN_BUILD_TESTS)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir}/tests/)
add_subdirectory(cgogn/${subdir}/tests)
endif()
endif()
if(CGOGN_BUILD_EXAMPLES)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir}/examples/)
add_subdirectory(cgogn/${subdir}/examples)
endif()
if(CGOGN_MODULE_${subdir})
if(CGOGN_BUILD_TESTS)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir}/tests/)
add_subdirectory(cgogn/${subdir}/tests)
endif()
endif()
if(CGOGN_BUILD_EXAMPLES)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/cgogn/${subdir}/examples/)
add_subdirectory(cgogn/${subdir}/examples)
endif()
endif()
endif()
endforeach()

Expand Down
2 changes: 2 additions & 0 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ add_subdirectory(multithreading)
add_subdirectory(tri_map)
add_subdirectory(quad_map)
add_subdirectory(tetra_map)
add_subdirectory(comparison)
add_subdirectory(attributes)
16 changes: 16 additions & 0 deletions benchmarks/attributes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)

project(bench_attrib
LANGUAGES CXX
)

find_package(cgogn_core REQUIRED)
find_package(cgogn_geometry REQUIRED)
find_package(cgogn_modeling REQUIRED)

set(CMAKE_AUTOMOC ON)

add_executable(${PROJECT_NAME} bench_attrib.cpp)
target_link_libraries(${PROJECT_NAME} ${cgogn_core_LIBRARIES} ${cgogn_modeling_LIBRARIES} )

set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER benchmarks)
Loading

0 comments on commit 569a0d6

Please sign in to comment.