Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Just gtest. #28

Closed
wants to merge 51 commits into from
Closed

Just gtest. #28

wants to merge 51 commits into from

Conversation

codecurve
Copy link
Contributor

Originally was pull request cellml/libcellml#26, but due to not being able to change the target branch of a pull request, had to close and restart (since original erroneously targeted master).
The focus here is on getting Google Test into the repo, so that it does not clutter future pull requests which focus on actual use cases.

@codecurve
Copy link
Contributor Author

Just to be clear: review comments on cellml/libcellml#26 still apply to this pull request, but please continue any further discussion on this pull request.

@codecurve
Copy link
Contributor Author

Review progress

Done (or otherwise addressed):

  • This pull request should be made against the develop branch of cellml/libcellml
  • src file names should be all lowercase
  • header guards missing from LibcellmlConfig.h.in
  • version number variables should be all uppercase (Libcellml_VERSION_MAJOR)
  • version test doesn’t test anything
  • #include should be the first include in Version.cpp
  • patch version missing from version number

The following are not done yet. I'd propose we add all but the first one of these as a separate issue ("cmake improvements"), and defer it till later, so that we can focus on domain specific issues for now.

  • api header files put into libcellml directory so that all api includes are the same for internal calls (please clarify what is meant here)
  • refactor CMakeLists.txt layout put CMakeLists.txt in src directory for the library target put CMakeLists.txt in tests directory for the test targets, leaving the main CMakeLists.txt for handling general options, tests, build type etc.
  • not able to set type of library to build [shared, static]
  • library target should be named cellml, not add_library(Libcellml
  • test option should be LIBCELLML_TESTS with a test for TESTS variable, all configurable options should be namespaced with LIBCELLML_ for gui users
  • can’t set -g -Wall to CMAKE_CXX_FLAGS this is not generic to all compilers
  • check for cmake c++ compiler support is not well thought through, if there is a problem with the compiler it should be an error

@nickerso
Copy link
Contributor

I don't think it is acceptable to delay addressing outstanding issues in the review. They all seem like either critical issues to address in the proposed code or trivial changes that should be quick to fix.

@nickerso
Copy link
Contributor

Further review comment: I'd expect the documentation of the getVersion() method to include a description of the returned string.

@hsorby
Copy link
Contributor

hsorby commented Feb 24, 2015

Clarification: in the src directory create a directory "libcellml" into which you put API header files

@nickerso
Copy link
Contributor

Further to @hsorby's comment regarding "-g" in the CXX flags, it is bad to force debug build (and even worse to do so in a manner that will not work across all target compiler toolchains) - should make use of standard CMake build types (Debug, Release, etc) which will take care of such flags in a way that is safe across compiler toolchains.

@codecurve
Copy link
Contributor Author

"check for cmake c++ compiler support is not well thought through, if there is a problem with the compiler it should be an error" is resolved if we use cmake 3.2 (currently at rc2 stage). See https://github.com/cellml/libcellml/blob/ab70fbb3798597fde0c23cad39c5df16df0cfefc/CMakeLists.txt

@hsorby
Copy link
Contributor

hsorby commented Mar 3, 2015

I would probably use this form for setting a targets properties:

set_target_properties(libcellmlTest PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)

I would prefer to stick with CMake 3.1 if possible. As demonstrated the above works on my GNU/Linux with CMake 3.1

@codecurve
Copy link
Contributor Author

BuildBot tests currently failing on Windows and Mac slaves, passing on Linux. The fix is to use CMake 3.2. Once CMake 3.2 is released (should be soon, since it is at release candidate 2 at the time of writing this), we will install it on the build slaves, and update the minimum version requirement to 3.2. Leaving minimum version requirement at 3.1 for now so that it still builds on Linux. See http://www.cmake.org/Bug/view.php?id=15355

This was discussed with @hsorby a few minutes ago.

@hsorby
Copy link
Contributor

hsorby commented Mar 3, 2015

  • the test for the version should test the expected value vs. the actual value, not actual vs. actual
  • still have the tests option, this should be removed
  • LIBCELLML_TESTS variable should default to ON
  • should be able to set build type similarly to how tests is set

Randall Britten added 2 commits March 4, 2015 11:16
CodeSynthesis XSD is an XML bindings generator.
This is the library to which generated bindings code will make calls.

See http://www.codesynthesis.com/products/xsd/
@hsorby finished off the remaining cmake task (still to be checked?) and added Apache 2.0 license.
hsorby and others added 7 commits March 4, 2015 11:48
@nickerso
Copy link
Contributor

nickerso commented Mar 4, 2015

That

Merge branch 'upstream_master' into gtest01

should not be here.

@nickerso
Copy link
Contributor

nickerso commented Mar 4, 2015

With the mix up in merging #33 and reverting (#35) and its subsequent merge into this pull request, I wonder if it might not be significantly less hassle to simply start this one over? Is cherry picking 7ea7aab and starting from there an option? That seems to be the one with everything in a state which is working and presumably answering most issues that have arisen in this review...

@agarny
Copy link
Contributor

agarny commented Mar 4, 2015

I haven't followed things very closely, but it certainly looks like a mess... :)

@nickerso nickerso closed this Mar 4, 2015
@codecurve codecurve mentioned this pull request Mar 4, 2015
@nickerso nickerso mentioned this pull request Mar 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants