Skip to content

Conversation

@khrushv
Copy link
Contributor

@khrushv khrushv commented Jun 17, 2020

No description provided.

Comment on lines +4 to 6
add_executable(client client.c utils/extract_ip_port_from_string.c utils/opt_arg.c ../lib/check_port.c ../lib/set_sockaddr_in.c)

target_include_directories(client PUBLIC ./)
Copy link
Owner

Choose a reason for hiding this comment

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

In a library directory we have libraries so, why don't you create a directory with check_callbacks and place here check_callbacks.h and build it as a library?

Copy link
Owner

Choose a reason for hiding this comment

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

Also, you didn't fix last problem, you've included ./ but not ../lib it's unnecessary if you'll make a library, you can just target_link_libraries(client STATIC CheckCallbacks)

Copy link
Owner

Choose a reason for hiding this comment

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

It's better to explicitly set utils folder and not forcing CMake looking for it!
target_include_directories(client PUBLIC ./ ./utils)

Comment on lines 4 to 6
add_executable(server server.c utils/opt_arg.c utils/factorial.h utils/factorial.c ../lib/check_port.h ../lib/check_port.c ../lib/set_sockaddr_in.h utils/check_tnum.h utils/check_tnum.c ../lib/set_sockaddr_in.c ../lib/set_sockaddr_in.h ../lib/set_sockaddr_in.c)
add_executable(server server.c utils/opt_arg.c utils/factorial.c ../lib/check_port.c ../lib/set_sockaddr_in.c)

target_include_directories(server PUBLIC ./)
Copy link
Owner

Choose a reason for hiding this comment

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

Look above


unsigned int* handle_options(int, char**, struct option[], const int, int (* [])(unsigned int*));

int check_tnum(unsigned int* tnum);
Copy link
Owner

Choose a reason for hiding this comment

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

In our codestyle we don't write a name of parameter in a header file

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