aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-01-02 22:33:48 +0800
committerGitHub <noreply@github.com>2023-01-02 22:33:48 +0800
commitbb740e3b117f1a3c65152d01e5755523a908ecb1 (patch)
treecce1a3cf9981a4a233cd89083e159d26416279e2 /cmake
parentTests: test_check: Test corner cases of CLMUL CRC64. (diff)
downloadxz-bb740e3b117f1a3c65152d01e5755523a908ecb1.tar.xz
Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1.
HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to HAVE_PROGRAM_INVOCATION_NAME. Previously, HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when building with autotools. CMake would only set this when it was 1, and the dos/config.h did not define it. The new macro definition is consistent across build systems.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/tuklib_progname.cmake5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmake/tuklib_progname.cmake b/cmake/tuklib_progname.cmake
index 0fa1d3d7..d4ab0066 100644
--- a/cmake/tuklib_progname.cmake
+++ b/cmake/tuklib_progname.cmake
@@ -13,7 +13,6 @@ include(CheckSymbolExists)
function(tuklib_progname TARGET_OR_ALL)
# NOTE: This glibc extension requires _GNU_SOURCE.
check_symbol_exists(program_invocation_name errno.h
- HAVE_DECL_PROGRAM_INVOCATION_NAME)
- tuklib_add_definition_if("${TARGET_OR_ALL}"
- HAVE_DECL_PROGRAM_INVOCATION_NAME)
+ HAVE_PROGRAM_INVOCATION_NAME)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_PROGRAM_INVOCATION_NAME)
endfunction()