Skip to content

Cmake adding#6

Open
RuslanValiakhmetov wants to merge 4 commits intomasterfrom
cmake_adding
Open

Cmake adding#6
RuslanValiakhmetov wants to merge 4 commits intomasterfrom
cmake_adding

Conversation

@RuslanValiakhmetov
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Owner

@Alexandr1992 Alexandr1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оставил коммент по поводу дублирования

@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.0)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У тебя для каждого теста почти одинаковый код. Сможешь сделать один cmake файл для всех проектов в этой папке?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно сделать и один.
Мне кажется лучше, если каждый отдельный проект описывает конкретный cmake файл.
От дублирования всё равно не уйдешь, просто это всё будет в одном файле, в котором сложнее будет разбираться.
Но, как скажешь)

Copy link
Copy Markdown
Owner

@Alexandr1992 Alexandr1992 May 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

От дублирования можно уйти)).
Просто нужно один раз обхявить список проектов или проэнумерейтить папки на файловой системе и в цикле создать проекты с такими именами. Могу показать

project(${PROJ})

if(${PROJ} STREQUAL "01_bob")
# Steps.cpp contains compile errors
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот и нижний файл так же не лишены дублирования.
Но что бы от него(дублирования) избавиться нужно пофиксить compile errors в файле demo/01_bob/Steps.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants