Skip to content
Snippets Groups Projects
Commit db374755 authored by Vladimir Onoprienko's avatar Vladimir Onoprienko Committed by Debolskiy Andrey
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 d9225960
Branches develop
No related tags found
No related merge requests found
...@@ -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 8894a45aa251420fbee723673c8a8d8bf2ac281d) GIT_TAG 8894a45aa251420fbee723673c8a8d8bf2ac281d)
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 f8c22c3e0e0c1d3f138ce7cdf08b75fee059f724) GIT_TAG f8c22c3e0e0c1d3f138ce7cdf08b75fee059f724)
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}")
...@@ -93,6 +91,3 @@ source_group("Grid\\Sources" FILES "${GRID_SOURCES}") ...@@ -93,6 +91,3 @@ source_group("Grid\\Sources" FILES "${GRID_SOURCES}")
source_group("Grid\\Headers" FILES "${GRID_HEADERS}") source_group("Grid\\Headers" FILES "${GRID_HEADERS}")
source_group("CMake-Build\\Sources" FILES "${CURRENT_SOURCES}") source_group("CMake-Build\\Sources" FILES "${CURRENT_SOURCES}")
source_group("CMake-Build\\Headers" FILES "${CURRENT_HEADERS}") source_group("CMake-Build\\Headers" FILES "${CURRENT_HEADERS}")
message(STATUS "common header dir: ${COMMON_HEADER_DIR}")
message(STATUS "header dir: ${HEADER_DIR}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment