Skip to content
Snippets Groups Projects

Copy configs

Merged Vladimir Onoprienko requested to merge copy_configs into main
1 file
+ 10
15
Compare changes
  • Side-by-side
  • Inline
+ 10
15
@@ -3,15 +3,15 @@ project(exple_cmake_build CXX)
option(DOWNLOAD_DEPS "Enable automatic download of dependencies" ON)
# download dependency 'explelibx_common' or find it locally
# download dependency 'explelibx-common' or find it locally
if (DOWNLOAD_DEPS)
include(FetchContent)
FetchContent_Declare(
explelibx_common
explelibx-common
GIT_REPOSITORY http://tesla.parallel.ru/vonopr/explelibx-common.git
GIT_TAG 8894a45aa251420fbee723673c8a8d8bf2ac281d)
FetchContent_MakeAvailable(explelibx_common)
set(COMMON_DIR "${explelibx_common_SOURCE_DIR}")
FetchContent_MakeAvailable(explelibx-common)
set(COMMON_DIR "${explelibx-common_SOURCE_DIR}")
else()
if (NOT DEFINED COMMON_DIR)
file(REAL_PATH "${PROJECT_SOURCE_DIR}/../../explelibx-common" COMMON_DIR)
@@ -24,15 +24,15 @@ else()
message(" COMMON_DIR: ${COMMON_DIR}")
endif()
# download dependency 'explelibx_mgrid' or find it locally
# download dependency 'explelibx-mgrid' or find it locally
if (DOWNLOAD_DEPS)
include(FetchContent)
FetchContent_Declare(
explelibx_mgrid
explelibx-mgrid
GIT_REPOSITORY http://tesla.parallel.ru/vonopr/explelibx-mgrid.git
GIT_TAG f8c22c3e0e0c1d3f138ce7cdf08b75fee059f724)
FetchContent_MakeAvailable(explelibx_mgrid)
set(GRID_DIR "${explelibx_mgrid_SOURCE_DIR}")
FetchContent_MakeAvailable(explelibx-mgrid)
set(GRID_DIR "${explelibx-mgrid_SOURCE_DIR}")
else()
if (NOT DEFINED GRID_DIR)
file(REAL_PATH "${PROJECT_SOURCE_DIR}/../../explelibx-mgrid" GRID_DIR)
@@ -70,7 +70,7 @@ list(TRANSFORM CURRENT_SOURCES PREPEND "${SOURCE_DIR}/")
list(TRANSFORM CURRENT_HEADERS PREPEND "${HEADER_DIR}/")
# set targets
add_executable(exple_add_numbers
add_executable(exple-add-numbers
"${CURRENT_SOURCES}"
"${CURRENT_HEADERS}"
"${COMMON_SOURCES}"
@@ -78,9 +78,7 @@ add_executable(exple_add_numbers
"${GRID_SOURCES}"
"${GRID_HEADERS}") # headers should be explicitly added to the target to be shown in IDEs after mentioned in source_group()
# if using Visual Studio switch to project's target representation
set_property(TARGET exple_add_numbers PROPERTY OUTPUT_NAME "exple-add-numbers")
target_include_directories(exple_add_numbers PRIVATE
target_include_directories(exple-add-numbers PRIVATE
"${HEADER_DIR}"
"${COMMON_HEADER_DIR}"
"${GRID_HEADER_DIR}")
@@ -93,6 +91,3 @@ source_group("Grid\\Sources" FILES "${GRID_SOURCES}")
source_group("Grid\\Headers" FILES "${GRID_HEADERS}")
source_group("CMake-Build\\Sources" FILES "${CURRENT_SOURCES}")
source_group("CMake-Build\\Headers" FILES "${CURRENT_HEADERS}")
message(STATUS "common header dir: ${COMMON_HEADER_DIR}")
message(STATUS "header dir: ${HEADER_DIR}")
Loading