Skip to content
Snippets Groups Projects
Commit 71aa4b18 authored by John Biddiscombe's avatar John Biddiscombe Committed by Ben Cumming
Browse files

CMake fixes (#137)

* Fix CMakeLists to handle build as a subproject

When several CMake generated projects are build together, it is common
practice to have a 'superproject' CMakeLists that uses
  add_subdir(proj1)
  add_subdir(proj2)
  ...
where each subproject is a self contained CMake based project
(Example proj1=HPX, proj2=nestmc, proj3=another, ...)

CMAKE_SOURCE_DIR always points to the top level directory which
is the superproject dir in this case, whereas PROJECT_SOURCE_DIR
always points to the root of the current project() in the CMakeLists
so one shouod use PROJECT_SOURCE_DIR as this gets the relative paths
correct.

* Add option to turn off auto generation from *.mod files

* Fix #134 : Change CMake WITH_OPTION to NMC_WITH_OPTION, compiler #define to NMC_HAVE_OPTION

1) The user may select an option by saying NMC_WITH_XXX

2) This may trigger CMake to use find_package(...) or setup some
other variables. CMake can then set variable NMC_HAVE_XXX and add a
what has actually...
parent d2c05fb0
No related branches found
No related tags found
No related merge requests found
Showing
with 170 additions and 113 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment