diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-05-28 23:44:58 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-05-29 15:48:04 +0200 |
commit | 06f528a5b7a42eadf84961414087117deb2365aa (patch) | |
tree | a227ba1b25a762e49fb03057a34dcd30a41c6715 /test cases/cmake | |
parent | 49c730ef05573410eda88256678ed6d1379cf5ea (diff) | |
download | meson-06f528a5b7a42eadf84961414087117deb2365aa.zip meson-06f528a5b7a42eadf84961414087117deb2365aa.tar.gz meson-06f528a5b7a42eadf84961414087117deb2365aa.tar.bz2 |
cmake: Update test case
Diffstat (limited to 'test cases/cmake')
5 files changed, 31 insertions, 3 deletions
diff --git a/test cases/cmake/16 threads/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/16 threads/subprojects/cmMod/CMakeLists.txt index 442a60e..4d61b0c 100644 --- a/test cases/cmake/16 threads/subprojects/cmMod/CMakeLists.txt +++ b/test cases/cmake/16 threads/subprojects/cmMod/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -project(cmMod CXX) +project(cmMod C CXX) set (CMAKE_CXX_STANDARD 14) if(NOT USE_PTHREAD STREQUAL NOT_SET) diff --git a/test cases/cmake/23 cmake toolchain/meson.build b/test cases/cmake/23 cmake toolchain/meson.build index 98f8d21..8399597 100644 --- a/test cases/cmake/23 cmake toolchain/meson.build +++ b/test cases/cmake/23 cmake toolchain/meson.build @@ -1,4 +1,4 @@ -project('cmake toolchain test', ['c', 'cpp']) +project('cmake toolchain test', ['c']) if meson.is_cross_build() error('MESON_SKIP_TEST: skip this on cross builds') @@ -7,3 +7,7 @@ endif cm = import('cmake') sub_pro = cm.subproject('cmMod') + +add_languages('cpp') + +sub_pro = cm.subproject('cmModFortran') diff --git a/test cases/cmake/23 cmake toolchain/nativefile.ini.in b/test cases/cmake/23 cmake toolchain/nativefile.ini.in index 2cd6e94..1f4037d 100644 --- a/test cases/cmake/23 cmake toolchain/nativefile.ini.in +++ b/test cases/cmake/23 cmake toolchain/nativefile.ini.in @@ -1,6 +1,7 @@ [properties] cmake_toolchain_file = '@MESON_TEST_ROOT@/CMakeToolchain.cmake' +cmake_skip_compiler_test = 'always' [cmake] diff --git a/test cases/cmake/23 cmake toolchain/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/23 cmake toolchain/subprojects/cmMod/CMakeLists.txt index 8aeabc2..a00affa 100644 --- a/test cases/cmake/23 cmake toolchain/subprojects/cmMod/CMakeLists.txt +++ b/test cases/cmake/23 cmake toolchain/subprojects/cmMod/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -project(cmMod) +project(cmMod NONE) if(NOT "${MESON_TEST_VAR1}" STREQUAL "VAR1 space") message(FATAL_ERROR "MESON_TEST_VAR1 -- '${MESON_TEST_VAR1}' != 'VAR1 space'") @@ -9,3 +9,7 @@ endif() if(NOT "${MESON_TEST_VAR2}" STREQUAL "VAR2") message(FATAL_ERROR "MESON_TEST_VAR2 -- '${MESON_TEST_VAR2}' != 'VAR2'") endif() + +if(NOT DEFINED CMAKE_C_COMPILER_VERSION) + message(FATAL_ERROR "CMAKE_C_COMPILER_VERSION was not defined") +endif() diff --git a/test cases/cmake/23 cmake toolchain/subprojects/cmModFortran/CMakeLists.txt b/test cases/cmake/23 cmake toolchain/subprojects/cmModFortran/CMakeLists.txt new file mode 100644 index 0000000..ecf1737 --- /dev/null +++ b/test cases/cmake/23 cmake toolchain/subprojects/cmModFortran/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5) + +project(cmMod NONE) + +if(NOT "${MESON_TEST_VAR1}" STREQUAL "VAR1 space") + message(FATAL_ERROR "MESON_TEST_VAR1 -- '${MESON_TEST_VAR1}' != 'VAR1 space'") +endif() + +if(NOT "${MESON_TEST_VAR2}" STREQUAL "VAR2") + message(FATAL_ERROR "MESON_TEST_VAR2 -- '${MESON_TEST_VAR2}' != 'VAR2'") +endif() + +if(NOT DEFINED CMAKE_C_COMPILER_VERSION) + message(FATAL_ERROR "CMAKE_C_COMPILER_VERSION was not defined") +endif() + +if(NOT DEFINED CMAKE_CXX_COMPILER_VERSION) + message(FATAL_ERROR "CMAKE_CXX_COMPILER_VERSION was not defined") +endif() |