Skip to content

Conversation

gadoofou87-zz
Copy link

Fixes #109

@Mizux Mizux self-requested a review March 11, 2020 10:52
@Mizux Mizux self-assigned this Mar 11, 2020
@Mizux Mizux added cmake CMake related issue enhancement New feature or request labels Mar 11, 2020
@Mizux
Copy link
Collaborator

Mizux commented Mar 11, 2020

LGTM, just need to wait for CI to finish

@gadoofou87-zz
Copy link
Author

I think the build error is due to this commit google/googletest@23b2a3b

@Mizux
Copy link
Collaborator

Mizux commented Mar 11, 2020

I think we should set properties on source files to set LANGUAGE to CXX
ref: https://cmake.org/cmake/help/latest/prop_sf/LANGUAGE.html

CMakeLists.txt Outdated
@@ -197,6 +197,7 @@ if(BUILD_TESTING)
EXCLUDE_FROM_ALL)
endif()

enable_language(CXX)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you should try to move it just after if(BUILD_TESTING) line 162 so googletest is build with support enabled

@gadoofou87-zz
Copy link
Author

Almost fixed! :)

@Mizux
Copy link
Collaborator

Mizux commented Mar 11, 2020

Last remaining issue is ci setup bug (no ninja on ppc64) -> unrelated to this PR

@Mizux
Copy link
Collaborator

Mizux commented Mar 11, 2020

BTW I was not able to reproduce it using a docker
ci/Dockerfile:

# Create a virtual environment with all tools installed
# ref: https://hub.docker.com/_/ubuntu
FROM ubuntu:rolling AS env
LABEL maintainer="mizux.dev@gmail.com"
# Install system build dependencies
RUN apt-get update -qq \
&& apt-get install -yq git wget curl libssl-dev build-essential ninja-build \
&& apt-get install -yq python3-dev python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install CMake 3.16.4
RUN wget "https://cmake.org/files/v3.16/cmake-3.16.4-Linux-x86_64.sh" \
&& chmod a+x cmake-3.16.4-Linux-x86_64.sh \
&& ./cmake-3.16.4-Linux-x86_64.sh --prefix=/usr/local/ --skip-license \
&& rm cmake-3.16.4-Linux-x86_64.sh
CMD [ "/bin/bash" ]

# Create lib directory
WORKDIR /home/lib
# Bundle lib source
COPY . .

FROM env as build
RUN cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -GNinja
#RUN cmake -S. -Bbuild -DBUILD_TESTING=ON
RUN cmake --build build

FROM build as test
RUN cmake --build build --target test
docker build -t cpu_feature  -f ci/Dockerfile  .

@Mizux
Copy link
Collaborator

Mizux commented Mar 11, 2020

FYI last master build was one month ago, without ppc64 jobs
see: #329

I've just triggered a build master: #334

EDIT: after inspection it seems that previously, ppc64 runner was in reality amd64 runner -_-

@Mizux Mizux merged commit ba81cb3 into google:master Mar 11, 2020
@Mizux Mizux mentioned this pull request Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake CMake related issue enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake requires a CXX compiler
2 participants