Skip to content
Snippets Groups Projects
Commit ebcc4178 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 9b7f04ea
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
...@@ -3,15 +3,15 @@ project(exple_cmake_build CXX) ...@@ -3,15 +3,15 @@ project(exple_cmake_build CXX)
option(DOWNLOAD_DEPS ON) option(DOWNLOAD_DEPS ON)
# download dependency 'explelibx_common' or find it locally # download dependency 'explelibx-common' or find it locally
if (DOWNLOAD_DEPS) if (DOWNLOAD_DEPS)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
explelibx_common explelibx-common
GIT_REPOSITORY http://tesla.parallel.ru/vonopr/explelibx-common.git GIT_REPOSITORY http://tesla.parallel.ru/vonopr/explelibx-common.git
GIT_TAG e45b60782a6414125c7300d9b7a77d34a8404d6e) GIT_TAG e45b60782a6414125c7300d9b7a77d34a8404d6e)
FetchContent_MakeAvailable(explelibx_common) FetchContent_MakeAvailable(explelibx-common)
set(COMMON_DIR "${explelibx_common_SOURCE_DIR}") set(COMMON_DIR "${explelibx-common_SOURCE_DIR}")
else() else()
if (NOT DEFINED COMMON_DIR) if (NOT DEFINED COMMON_DIR)
file(REAL_PATH "${PROJECT_SOURCE_DIR}/../../explelibx-common" COMMON_DIR) file(REAL_PATH "${PROJECT_SOURCE_DIR}/../../explelibx-common" COMMON_DIR)
...@@ -24,15 +24,15 @@ else() ...@@ -24,15 +24,15 @@ else()
message(" COMMON_DIR: ${COMMON_DIR}") message(" COMMON_DIR: ${COMMON_DIR}")
endif() endif()
# download dependency 'explelibx_mgrid' or find it locally # download dependency 'explelibx-mgrid' or find it locally
if (DOWNLOAD_DEPS) if (DOWNLOAD_DEPS)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
explelibx_mgrid explelibx-mgrid
GIT_REPOSITORY http://tesla.parallel.ru/vonopr/explelibx-mgrid.git GIT_REPOSITORY http://tesla.parallel.ru/vonopr/explelibx-mgrid.git
GIT_TAG c345859b9ebca2227e3b3faea4cc2380fdbb054f) GIT_TAG c345859b9ebca2227e3b3faea4cc2380fdbb054f)
FetchContent_MakeAvailable(explelibx_mgrid) FetchContent_MakeAvailable(explelibx-mgrid)
set(GRID_DIR "${explelibx_mgrid_SOURCE_DIR}") set(GRID_DIR "${explelibx-mgrid_SOURCE_DIR}")
else() else()
if (NOT DEFINED GRID_DIR) if (NOT DEFINED GRID_DIR)
file(REAL_PATH "${PROJECT_SOURCE_DIR}/../../explelibx-mgrid" GRID_DIR) file(REAL_PATH "${PROJECT_SOURCE_DIR}/../../explelibx-mgrid" GRID_DIR)
...@@ -70,7 +70,7 @@ list(TRANSFORM CURRENT_SOURCES PREPEND "${SOURCE_DIR}/") ...@@ -70,7 +70,7 @@ list(TRANSFORM CURRENT_SOURCES PREPEND "${SOURCE_DIR}/")
list(TRANSFORM CURRENT_HEADERS PREPEND "${HEADER_DIR}/") list(TRANSFORM CURRENT_HEADERS PREPEND "${HEADER_DIR}/")
# set targets # set targets
add_executable(exple_add_numbers add_executable(exple-add-numbers
"${CURRENT_SOURCES}" "${CURRENT_SOURCES}"
"${CURRENT_HEADERS}" "${CURRENT_HEADERS}"
"${COMMON_SOURCES}" "${COMMON_SOURCES}"
...@@ -78,9 +78,7 @@ add_executable(exple_add_numbers ...@@ -78,9 +78,7 @@ add_executable(exple_add_numbers
"${GRID_SOURCES}" "${GRID_SOURCES}"
"${GRID_HEADERS}") # headers should be explicitly added to the target to be shown in IDEs after mentioned in source_group() "${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 # 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}" "${HEADER_DIR}"
"${COMMON_HEADER_DIR}" "${COMMON_HEADER_DIR}"
"${GRID_HEADER_DIR}") "${GRID_HEADER_DIR}")
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment