Skip to content

Commit 7950c1d

Browse files
authored
Merge pull request #110 from InsightSoftwareConsortium/modernize-cmake-examples
ENH: Modernize CMake configuration for examples
2 parents 7ea50a5 + a5b5c71 commit 7950c1d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ project(PerformanceBenchmarking
2222
)
2323

2424
set(PerformanceBenchmarking_LIBRARIES PerformanceBenchmarking)
25+
# Path for configured PerformanceBenchmarkingInformation.h
26+
set(PerformanceBenchmarking_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include/)
27+
28+
set(Module_PerformanceBenchmarking_BUILD_EXAMPLES ON)
2529

2630
if(NOT ITK_SOURCE_DIR)
2731
find_package(ITK REQUIRED)
@@ -51,5 +55,4 @@ else()
5155
itk_module_impl()
5256
endif()
5357

54-
itk_module_examples() # This builds the src directory
55-
add_subdirectory(examples) # this builds each of the itk benchmark domains
58+
itk_module_examples() # This builds the examples directory

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ set(MAPPING_VALUES "
5555
configure_file(PerformanceBenchmarkingInformation.cxx.in ${CMAKE_BINARY_DIR}/PerformanceBenchmarkingInformation.cxx)
5656
configure_file(PerformanceBenchmarkingInformation.h.in ${CMAKE_BINARY_DIR}/include/PerformanceBenchmarkingInformation.h)
5757

58+
5859
set( PerformanceBenchmarking_SRCS
5960
jsonxx.cc ## MIT License https://github.com/hjiang/jsonxx
6061
${CMAKE_BINARY_DIR}/PerformanceBenchmarkingInformation.cxx

0 commit comments

Comments
 (0)