Skip to content

cmake: fail early if no module.h found #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2021

Conversation

Totktonada
Copy link
Member

Commit f7f84f0 ('cmake: fix warning')
causes a little regression: if there is no tarantool/module.h header, we
should fail at the cmake stage. After the fix of the warning we'll fail
only at the building stage (when make is called). Here I return the
old behaviour (fail on the cmake stage) back.

Follows up #18

Commit f7f84f0 ('cmake: fix warning')
causes a little regression: if there is no tarantool/module.h header, we
should fail at the cmake stage. After the fix of the warning we'll fail
only at the building stage (when `make` is called). Here I return the
old behaviour (fail on the `cmake` stage) back.

Follows up #18
@Totktonada Totktonada mentioned this pull request Oct 1, 2021
@Totktonada Totktonada requested a review from ligurio October 1, 2021 12:16
@ligurio
Copy link
Member

ligurio commented Oct 1, 2021

Cannot reproduce the described problem:

sergeyb@pony:~/sources/MRG/tuple-keydef/build$ sudo apt remove tarantool-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'tarantool-dev' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
sergeyb@pony:~/sources/MRG/tuple-keydef/build$ rm -rf *
sergeyb@pony:~/sources/MRG/tuple-keydef/build$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /home/sergeyb/.local/lib/python3.8/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find Tarantool (missing: TARANTOOL_INCLUDE_DIR)
Call Stack (most recent call first):
  /home/sergeyb/.local/lib/python3.8/site-packages/cmake/data/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindTarantool.cmake:27 (find_package_handle_standard_args)
  CMakeLists.txt:16 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/sergeyb/sources/MRG/tuple-keydef/build/CMakeFiles/CMakeOutput.log".
sergeyb@pony:~/sources/MRG/tuple-keydef/build$ 

after tarantool-dev installation:

sergeyb@pony:~/sources/MRG/tuple-keydef/build$ sudo apt install -y tarantool-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  tarantool-dev
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 34,9 kB of archives.
After this operation, 128 kB of additional disk space will be used.
Get:1 https://hb.bizmrg.com/tarantool_repo/release/2.2/ubuntu focal/main amd64 tarantool-dev amd64 2.2.3.0.gb9c4c7c04-1 [34,9 kB]
Fetched 34,9 kB in 0s (156 kB/s)         
Selecting previously unselected package tarantool-dev.
(Reading database ... 460303 files and directories currently installed.)
Preparing to unpack .../tarantool-dev_2.2.3.0.gb9c4c7c04-1_amd64.deb ...
Unpacking tarantool-dev (2.2.3.0.gb9c4c7c04-1) ...
Setting up tarantool-dev (2.2.3.0.gb9c4c7c04-1) ...
sergeyb@pony:~/sources/MRG/tuple-keydef/build$ cmake ..
-- Found Tarantool: /usr/include (found version "2.2.3-0-gb9c4c7c04") 
-- Tarantool LUADIR is share/tarantool
-- Tarantool LIBDIR is lib/tarantool
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sergeyb/sources/MRG/tuple-keydef/build
sergeyb@pony:~/sources/MRG/tuple-keydef/build$ 

@ligurio
Copy link
Member

ligurio commented Oct 2, 2021

Cannot reproduce the described problem:

please disregard it, seems I forgot to clean up a build dir.

@Totktonada Totktonada merged commit d86c0a3 into master Oct 2, 2021
@Totktonada Totktonada deleted the Totktonada/fix-cmake-warning-follow-up branch October 2, 2021 11:52
Totktonada added a commit to tarantool/luagraphqlparser that referenced this pull request Oct 16, 2021
Commit 58d39d7 ('cmake: fix warning')
causes a little regression: if there is no tarantool/module.h header, we
should fail at the cmake stage. After the fix of the warning we'll fail
only at the building stage (when `make` is called). Here I return the
old behaviour (fail on the `cmake` stage) back.

See tarantool/tuple-keydef#20
Totktonada added a commit to tarantool/modulekit that referenced this pull request Oct 16, 2021
Commit 32e6593 ('Fix CMake warning')
causes a little regression: if there is no tarantool/module.h header, we
should fail at the cmake stage. After the fix of the warning we'll fail
only at the building stage (when `make` is called). Here I return the
old behaviour (fail on the `cmake` stage) back.

See tarantool/tuple-keydef#20
Totktonada added a commit to tarantool/luagraphqlparser that referenced this pull request Oct 16, 2021
Commit 58d39d7 ('cmake: fix warning')
causes a little regression: if there is no tarantool/module.h header, we
should fail at the cmake stage. After the fix of the warning we'll fail
only at the building stage (when `make` is called). Here I return the
old behaviour (fail on the `cmake` stage) back.

See tarantool/tuple-keydef#20
Totktonada added a commit to tarantool/modulekit that referenced this pull request Oct 18, 2021
Commit 32e6593 ('Fix CMake warning')
causes a little regression: if there is no tarantool/module.h header, we
should fail at the cmake stage. After the fix of the warning we'll fail
only at the building stage (when `make` is called). Here I return the
old behaviour (fail on the `cmake` stage) back.

See tarantool/tuple-keydef#20
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