forked from intel/compile-time-init-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
26 lines (20 loc) · 806 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
26 lines (20 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 3.16)
project(hello_world LANGUAGES CXX)
add_executable(hello_world main.cpp dont_panic.cpp)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# to fetch cib, either use CPM (https://github.com/cpm-cmake/CPM.cmake) or
# plain old CMake functionality
# update this to a more recent commit ID (or tag) for your project
set(CIB_VERSION "476c583")
if(CPM_DOWNLOAD_VERSION)
cpmaddpackage("gh:intel/compile-time-init-build#${CIB_VERSION}")
else()
include(FetchContent)
FetchContent_Declare(
cib
GIT_REPOSITORY https://github.com/intel/compile-time-init-build.git
GIT_TAG ${CIB_VERSION})
FetchContent_MakeAvailable(cib)
endif()
endif()
target_link_libraries(hello_world cib)