Skip to content

Commit a734654

Browse files
committed
making fetching of libtokamap optional (default off)
1 parent b889bd4 commit a734654

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

CMakeLists.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,25 @@ include( Utils )
4747

4848
option( ENABLE_TESTING "Enable unit tests for the project (from the `test` subfolder)." OFF )
4949
option( ENABLE_PROFILING "Enable profiling for the project." OFF )
50+
option( FETCH_LIBTOKAMAP "Fetch libtokamap as a dependency." OFF )
5051

5152
# add_clang_format_target()
5253

5354
if( ENABLE_TESTING )
5455
enable_testing()
5556
endif()
5657

57-
include( FetchContent )
58-
FetchContent_Declare(
59-
libtokamap
60-
GIT_REPOSITORY https://github.com/ukaea/libtokamap.git
61-
GIT_TAG develop
62-
CMAKE_ARGS -DENABLE_TESTS=OFF -DENABLE_PROFILING=${ENABLE_PROFILING}
63-
)
58+
if( FETCH_LIBTOKAMAP )
59+
include( FetchContent )
60+
FetchContent_Declare(
61+
libtokamap
62+
GIT_REPOSITORY https://github.com/ukaea/libtokamap.git
63+
GIT_TAG develop
64+
CMAKE_ARGS -DENABLE_TESTS=OFF -DENABLE_PROFILING=${ENABLE_PROFILING}
65+
)
6466

65-
FetchContent_MakeAvailable( libtokamap )
67+
FetchContent_MakeAvailable( libtokamap )
68+
endif()
6669

6770
find_package( UDA REQUIRED )
6871
add_subdirectory( mapping_plugin )

0 commit comments

Comments
 (0)