diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-11-27 01:35:15 -0500 |
---|---|---|
committer | Michael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com> | 2019-12-09 11:15:58 -0500 |
commit | 98fd4e5557cb21affd2e2c124a132953b471a748 (patch) | |
tree | b350f0499b18795c89378790074a790488a3c351 /test cases/cmake | |
parent | 419a7a8f51fb68cdd40f7005394590a0963d3f32 (diff) | |
download | meson-98fd4e5557cb21affd2e2c124a132953b471a748.zip meson-98fd4e5557cb21affd2e2c124a132953b471a748.tar.gz meson-98fd4e5557cb21affd2e2c124a132953b471a748.tar.bz2 |
cmake: add project language to cmakelists.txt
cmake: get language from Meson project if not specified as depedency(..., langugage: ...)
deps: add threads method:cmake
dependency('threads', method: 'cmake') is useful for cmake unit tests
or those who just want to find threads using cmake.
cmake: project(... Fortran) generally also requires C language
Diffstat (limited to 'test cases/cmake')
-rw-r--r-- | test cases/cmake/14 fortran threads/meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test cases/cmake/14 fortran threads/meson.build b/test cases/cmake/14 fortran threads/meson.build new file mode 100644 index 0000000..f160ca8 --- /dev/null +++ b/test cases/cmake/14 fortran threads/meson.build @@ -0,0 +1,9 @@ +project('FortranThreads') + +if not add_languages('fortran', required: false) + error('MESON_SKIP_TEST: Fortran language not available.') +endif + +# want to be sure that CMake can find dependencies where even if the +# project isn't C, the C language is required to find the library. +threads = dependency('threads', method: 'cmake', required: true) |