Skip to content

Move project() call to CMakeLists.txt#1909

Merged
blueyed merged 1 commit intoawesomeWM:masterfrom
psychon:cmake-project
Jul 9, 2017
Merged

Move project() call to CMakeLists.txt#1909
blueyed merged 1 commit intoawesomeWM:masterfrom
psychon:cmake-project

Conversation

@psychon
Copy link
Copy Markdown
Member

@psychon psychon commented Jul 9, 2017

CMake "fakes" a call to "project(Project C CXX)" if it does not see a
project() call in CMakeLists.txt. Since we had this call in a different
file, this default applied. This meant that CMake unnecessarily required
a C++ compiler.

Fix/work-around this by moving the call to project() into CMakeLists.txt

Reference: #1907 (comment)
Signed-off-by: Uli Schlachter psychon@znc.in

@blueyed This should allow you to get rid of the C++ compiler in your docker build.

CMake "fakes" a call to "project(Project C CXX)" if it does not see a
project() call in CMakeLists.txt. Since we had this call in a different
file, this default applied. This meant that CMake unnecessarily required
a C++ compiler.

Fix/work-around this by moving the call to project() into CMakeLists.txt

Reference: awesomeWM#1907 (comment)
Signed-off-by: Uli Schlachter <psychon@znc.in>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 9, 2017

Codecov Report

Merging #1909 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1909   +/-   ##
=======================================
  Coverage   80.45%   80.45%           
=======================================
  Files         397      397           
  Lines       27123    27123           
  Branches      983      983           
=======================================
  Hits        21821    21821           
  Misses       5298     5298           
  Partials        4        4
Flag Coverage Δ
#c_code 72.12% <ø> (ø) ⬆️
#functionaltests 65.51% <ø> (ø) ⬆️
#samples 44.17% <ø> (ø) ⬆️
#unittests 32.53% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f105a4...3d16cbd. Read the comment docs.

@blueyed blueyed merged commit 95b412d into awesomeWM:master Jul 9, 2017
@blueyed
Copy link
Copy Markdown
Member

blueyed commented Jul 9, 2017

Yes, it helps.
Thanks!

@blueyed blueyed mentioned this pull request Jul 9, 2017
4 tasks
@psychon psychon deleted the cmake-project branch July 9, 2017 14:24
@blueyed
Copy link
Copy Markdown
Member

blueyed commented Jul 16, 2017

Also required for the example tests.

@psychon
Copy link
Copy Markdown
Member Author

psychon commented Jul 17, 2017

You mean "tests/examples/CMakeLists.txt does not have a `project()-line and so ends up with CMake's default project(Project C CXX)"? I'll take this as a feature request for me to handle.

petoju pushed a commit to petoju/awesome that referenced this pull request Sep 10, 2017
CMake "fakes" a call to "project(Project C CXX)" if it does not see a
project() call in CMakeLists.txt. Since we had this call in a different
file, this default applied. This meant that CMake unnecessarily required
a C++ compiler.

Fix/work-around this by moving the call to project() into CMakeLists.txt

Reference: awesomeWM#1907 (comment)
Signed-off-by: Uli Schlachter <psychon@znc.in>
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