TartanLlama / function_ref

A lightweight, non-owning reference to a callable.
Creative Commons Zero v1.0 Universal
169 stars 23 forks source link

CMake: add subproject detection and fix source location. #11

Open no-more-secrets opened 5 years ago

no-more-secrets commented 5 years ago

The subproject detection avoids adding things into the build that are not necessary (i.e., standardese, unit tests) and/or may cause conflicts (i.e., tests target name) when building as a submodule in a parent project.

Also change CMAKE_SOURCE_LOCATION --> CMAKE_CURRENT_SOURCE_LOCATION which is more correct and is needed when the source location is not the top level folder in the project.