From cc737ae8295156812e697a9d2f3f7b79bf7b72c8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 31 May 2023 16:32:45 -0400 Subject: Linux: Provide multiarch library directory regex earlier Make `CMAKE_LIBRARY_ARCHITECTURE_REGEX` available while determining compilers before `Platform/Linux` is loaded. --- Modules/Platform/Linux-Initialize.cmake | 2 ++ Modules/Platform/Linux.cmake | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 Modules/Platform/Linux-Initialize.cmake diff --git a/Modules/Platform/Linux-Initialize.cmake b/Modules/Platform/Linux-Initialize.cmake new file mode 100644 index 0000000..6d9cbae --- /dev/null +++ b/Modules/Platform/Linux-Initialize.cmake @@ -0,0 +1,2 @@ +# Match multiarch library directory names. +set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake index 3dc3ca3..1f2d8e6 100644 --- a/Modules/Platform/Linux.cmake +++ b/Modules/Platform/Linux.cmake @@ -80,9 +80,6 @@ else() endif() endif() -# Match multiarch library directory names. -set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*") - include(Platform/UnixPaths) # Debian has lib32 and lib64 paths only for compatibility so they should not be -- cgit v0.12