Closed thewtex closed 3 years ago
@thewtex This fixes the Ninja build issue with gtest. However, the Travis builds were building before and should pass before merging.
Travis error is the following:
CMake Error at CMakeLists.txt:43 (cmake_minimum_required):
CMake 3.10.2 or higher is required. You are running version 3.9.2
As a first attempt, the travis config could be updated adding the following lines or a newer image could be used:
+ before_install:
+ - sudo apt-get -y install cmake
+
+ addons:
+ apt:
+ update: true
@allywarner @jcfr thanks for the updates and reviews.
I pushed an update to Travis to go from Ubuntu 14.04 to 18.04. Let's see how it goes.
Back to green again :green_apple: :rocket: . This should be ready now.
While integrating, I suggest to use "Squash and merge" and setup the following commit title:
COMP: Add support for Ninja CMake Generator (#104)
and message
* Update googletest external project specifying BUILD_BYPRODUCTS required by Ninja generator.
It addressed this error:
ninja: error: 'externals/googletest/lib/lib/libgmock_main.a', needed by 'test/bin/linearviolationchecker_tests', missing and no known rule to make it
* Updates the minimum required version of CMake from 2.6 to 3.10.2. CMake 3.10.2 is
the version available with Ubuntu 18.04, long term release. This also the current minimum
required version for ITK.
* Update TravisCI image to ensure a more recent version of CMake is available.
* For future reference, this commit addresses the following CMake warnings:
CMake Warning (dev) at /home/matt/src/CMake/Modules/CTest.cmake:50 (option):
Policy CMP0077 is not set: option() honors normal variables. Run "cmake
--help-policy CMP0077" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the
normal variable 'BUILD_TESTING'.
Call Stack (most recent call first):
Cleaver2/src/CMakeLists.txt:104 (INCLUDE)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Deprecation Warning at lib/jsoncpp/CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at lib/cleaver/CMakeLists.txt:35 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Co-authored-by: Matt McCormick <matt.mccormick@kitware.com>
Co-authored-by: Jean-Christophe Fillion-Robin <jcfr@kitware.com>
Thanks @allywarner :pray:
@jcfr @jessdtate please take a look.