From 3afc8f9875979e57cce97edd68a5971d6771e097 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Tue, 3 Jun 2014 15:22:41 +0100 Subject: Make ECM language-independent again, but make the tests use C Setting the language for ECM's project() call to C had unanticipated side-effects - notably that the installed version file required the architecture to match the one used at build time. Instead, we make the tests a sub-project, setting up C as the language there (since most of the tests do use C, albeit slightly indirectly). REVIEW: 118498 --- tests/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dfcc252a..65de038e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,9 +1,14 @@ -# a macro for tests that have a simple format where the name matches the -# directory and project +# We need to set a language to find CMake packages installed in +# architecture-dependent locations (like /usr/lib64). +# We only set this for the tests, making sure it does not interfere +# with other files (as ECM itself is architecture-independent). +project(ECMTests C) add_subdirectory(ECMGenerateHeadersTest) add_subdirectory(ECMSetupVersionTest) +# a macro for tests that have a simple format where the name matches the +# directory and project macro(ADD_TEST_MACRO NAME COMMAND) string(REPLACE "." "/" dir "${NAME}") string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}") -- cgit v1.2.1