Skip to content
Snippets Groups Projects
Commit b62ecb9d authored by Vladimir Onoprienko's avatar Vladimir Onoprienko
Browse files

Substitute underscores with hyphens in CMakeLists

Using hyphens is preffered throughout the project. This should be
applied to CMakeLists.txt as well
parent 537ff20a
No related branches found
No related tags found
1 merge request!2Use hyphens in cmake instead of underscores when appropriate
......@@ -13,15 +13,15 @@ set(GRID_LIB_URL "http://tesla.parallel.ru/vonopr/explelibx-mgrid.git"
set(GRID_LIB_TAG "c345859b9ebca2227e3b3faea4cc2380fdbb054f"
CACHE STRING "Specify the branch name, tag name or commit hash of the downloaded 'explelibx-mgrid' dependency; used if DOWNLOAD_DEPS enabled")
# 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 "${COMMON_LIB_URL}"
GIT_TAG "${COMMON_LIB_TAG}")
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)
......@@ -34,15 +34,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 "${GRID_LIB_URL}"
GIT_TAG "${GRID_LIB_TAG}")
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)
......@@ -80,7 +80,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}"
......@@ -88,9 +88,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}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment