Skip to content

Conversation

zbeekman
Copy link
Collaborator

@zbeekman zbeekman commented Feb 6, 2016

Resolves #58, mostly. Still some stuff left to do concerning cleaning up install directories, install logic, and improving/fixing the CMake project export capabilities. (This last feature is CMake's answer to pkg-config---It tells other CMake projects that want to use OpenCoarrays, what linker & compiler flags they need, where OC is installed, etc.)

A number of extraneous CMake files and syntax were removed. Enhancements include:

  1. Use the "CMake way" to query system processor and OS
  2. Check if the compiler is OCA once in the top level CMakeLists.txt and then just query the variable, opencoarrays_aware_compiler indicating if the compiler is OCA
  3. Don't hack and distribute intrinsic CMake module: "CHECK_Fortran_SOURCE_COMPILES", use CMAKE_REQUIRED_FLAGS to pass -fcoarray=single to the introspection fortran compiler invocations.
  4. Fix bug wherein CMake is exporting the package to tell other CMake software how to find and build against OpenCoarrays, but it was always telling this software that it is V1.0 not the current version.

 - Prevent having to explicitly run `uname` CMAKE_SYSTEM_PROCESSOR holds
   the output of `uname -p` which will be x86_64 on all x86_64 Linux
   machines, and another value on incompatible machines line OS X, arm,
   etc.

- Since this is a CMake variable no scoping/inheritence etc. issues, or
  concerns about conditional definition etc.
 - Fixes #58 The checks performed in the top level CMakeLists.txt are
   inherited whenever other CMake files are `include`d or
   `add_subdirectory`-d
 - `${opencoarrays_aware_compiler}` set in top level and inherited
   everywhere else
 - Pass the `-fcoarray=single` flag to the builtin CMake macro
   `CHECK_Fortran_SOURCE_COMPILES` from the `CheckFortranSourceCompiles`
    builtin macro, using the standard `CMAKE_REQUIRED_FLAGS
@codecov-io
Copy link

Current coverage is 39.12%

Merging #138 into master will not affect coverage as of e95519e

@@            master    #138   diff @@
======================================
  Files            2       2       
  Stmts          892     892       
  Branches         0       0       
  Methods          0       0       
======================================
  Hit            349     349       
  Partial          0       0       
  Missed         543     543       

Review entire Coverage Diff as of e95519e


Uncovered Suggestions

  1. +1.92% via src/mpi/mpi_caf.c#1904...1920
  2. +1.58% via src/mpi/mpi_caf.c#2002...2015
  3. +1.58% via src/mpi/mpi_caf.c#1557...1570
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

 - OpenCoarraysConfig.cmake.in moved to `./cmake/pkg`
 - Updated cmake logic to be more robust against spaces, odd paths etc.
@zbeekman
Copy link
Collaborator Author

zbeekman commented Feb 7, 2016

LGTM

Approved with PullApprove

zbeekman added a commit that referenced this pull request Feb 9, 2016
CMake cleanup, issue #58

 Resolves #58 
 Some tweaks remain to be made to the build system
@zbeekman zbeekman merged commit b281a23 into master Feb 9, 2016
@zbeekman zbeekman deleted the CMake-cleanup-#58 branch February 9, 2016 01:48
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.

reduce build system redundancy
2 participants