Tests: Explicitly disable AIX_SHARED_LIBRARY_ARCHIVE in some cases

We do not want AIX shared library archives in test cases that rely on
cross-platform appearance of `.so` files.
This commit is contained in:
Brad King 2024-11-21 18:49:02 -05:00
parent 1cd99d288f
commit 655a245d60
23 changed files with 63 additions and 39 deletions

View File

@ -1,5 +1,7 @@
project(PerConfig C) project(PerConfig C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
# Targets with per-configuration names. # Targets with per-configuration names.
add_library(pcStatic STATIC pcStatic.c) add_library(pcStatic STATIC pcStatic.c)
set_property(TARGET pcStatic PROPERTY RELEASE_POSTFIX -opt) set_property(TARGET pcStatic PROPERTY RELEASE_POSTFIX -opt)

View File

@ -51,7 +51,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 43, "line": 45,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -96,7 +96,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -144,7 +144,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -189,7 +189,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -233,7 +233,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -277,7 +277,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 51, "line": 53,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -324,7 +324,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 53, "line": 55,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -369,7 +369,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 54, "line": 56,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -418,7 +418,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 55, "line": 57,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -470,7 +470,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 56, "line": 58,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -519,7 +519,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 57, "line": 59,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -561,7 +561,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 58, "line": 60,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -603,7 +603,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 59, "line": 61,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },

View File

@ -16,7 +16,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 6, "line": 8,
"command": "add_executable", "command": "add_executable",
"hasParent": true "hasParent": true
}, },
@ -64,7 +64,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 6, "line": 8,
"command": "add_executable", "command": "add_executable",
"hasParent": true "hasParent": true
}, },
@ -114,7 +114,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 7, "line": 9,
"command": "target_link_libraries", "command": "target_link_libraries",
"hasParent": true "hasParent": true
}, },

View File

@ -16,7 +16,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 5, "line": 7,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },
@ -64,7 +64,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 5, "line": 7,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },

View File

@ -16,7 +16,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 10, "line": 12,
"command": "add_executable", "command": "add_executable",
"hasParent": true "hasParent": true
}, },
@ -64,7 +64,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 10, "line": 12,
"command": "add_executable", "command": "add_executable",
"hasParent": true "hasParent": true
}, },
@ -114,7 +114,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 11, "line": 13,
"command": "target_link_libraries", "command": "target_link_libraries",
"hasParent": true "hasParent": true
}, },

View File

@ -16,7 +16,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 9, "line": 11,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },
@ -69,7 +69,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 9, "line": 11,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },
@ -118,7 +118,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -148,7 +148,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -178,7 +178,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 51, "line": 53,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },

View File

@ -16,7 +16,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 14, "line": 16,
"command": "add_executable", "command": "add_executable",
"hasParent": true "hasParent": true
}, },
@ -64,7 +64,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 14, "line": 16,
"command": "add_executable", "command": "add_executable",
"hasParent": true "hasParent": true
}, },
@ -114,7 +114,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 15, "line": 17,
"command": "target_link_libraries", "command": "target_link_libraries",
"hasParent": true "hasParent": true
}, },

View File

@ -16,7 +16,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 13, "line": 15,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },
@ -64,7 +64,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 13, "line": 15,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },

View File

@ -89,7 +89,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 17, "line": 19,
"command": "add_library", "command": "add_library",
"hasParent": true "hasParent": true
}, },

View File

@ -139,7 +139,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 43, "line": 45,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },

View File

@ -94,7 +94,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -124,7 +124,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 46, "line": 48,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },
@ -154,7 +154,7 @@
"backtrace": [ "backtrace": [
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 51, "line": 53,
"command": "install", "command": "install",
"hasParent": true "hasParent": true
}, },

View File

@ -28,7 +28,7 @@
}, },
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 3, "line": 5,
"command": "include", "command": "include",
"hasParent": true "hasParent": true
}, },
@ -91,7 +91,7 @@
}, },
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 3, "line": 5,
"command": "include", "command": "include",
"hasParent": true "hasParent": true
}, },
@ -134,7 +134,7 @@
}, },
{ {
"file": "^codemodel-v2\\.cmake$", "file": "^codemodel-v2\\.cmake$",
"line": 3, "line": 5,
"command": "include", "command": "include",
"hasParent": true "hasParent": true
}, },

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
include("${CMAKE_CURRENT_LIST_DIR}/include_test.cmake") include("${CMAKE_CURRENT_LIST_DIR}/include_test.cmake")
add_library(c_lib empty.c) add_library(c_lib empty.c)

View File

@ -1,5 +1,7 @@
enable_language (C) enable_language (C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
set (win_platforms Windows CYGWIN MSYS) set (win_platforms Windows CYGWIN MSYS)
set (GENERATE_CONTENT [[ set (GENERATE_CONTENT [[

View File

@ -1,5 +1,7 @@
enable_language (C) enable_language (C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
set (win_platforms Windows CYGWIN MSYS) set (win_platforms Windows CYGWIN MSYS)
set (GENERATE_CONTENT [[ set (GENERATE_CONTENT [[

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
set (GENERATE_CONTENT [[ set (GENERATE_CONTENT [[
macro (CHECK_VALUE test_msg value expected) macro (CHECK_VALUE test_msg value expected)
if (NOT "${value}" STREQUAL "${expected}") if (NOT "${value}" STREQUAL "${expected}")

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
add_executable(exe main.c) add_executable(exe main.c)
add_library(lib1 SHARED obj1.c) add_library(lib1 SHARED obj1.c)
set_property(TARGET lib1 PROPERTY PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj3.h) set_property(TARGET lib1 PROPERTY PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj3.h)

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
add_executable(exe main.c) add_executable(exe main.c)
add_library(lib1 SHARED obj1.c) add_library(lib1 SHARED obj1.c)
set_property(TARGET lib1 PROPERTY PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj3.h) set_property(TARGET lib1 PROPERTY PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj3.h)

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
macro(add_versioned_library NAME) macro(add_versioned_library NAME)
add_library(${NAME} SHARED obj1.c) add_library(${NAME} SHARED obj1.c)
set_target_properties(${NAME} PROPERTIES set_target_properties(${NAME} PROPERTIES

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
add_executable(test1 main.c) add_executable(test1 main.c)
set_property(TARGET test1 PROPERTY OUTPUT_NAME test1out) set_property(TARGET test1 PROPERTY OUTPUT_NAME test1out)
set_property(TARGET test1 PROPERTY RELEASE_OUTPUT_NAME test1rel) set_property(TARGET test1 PROPERTY RELEASE_OUTPUT_NAME test1rel)

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
add_library (func SHARED func.c) add_library (func SHARED func.c)
set (binary_dir "${CMAKE_BINARY_DIR}") set (binary_dir "${CMAKE_BINARY_DIR}")

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
# ensure command line is always displayed and do not use any response file # ensure command line is always displayed and do not use any response file
set(CMAKE_VERBOSE_MAKEFILE TRUE) set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE) set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE)

View File

@ -1,5 +1,7 @@
enable_language(C) enable_language(C)
set(CMAKE_AIX_SHARED_LIBRARY_ARCHIVE 0)
if(CMP0156 STREQUAL "NEW") if(CMP0156 STREQUAL "NEW")
cmake_policy(SET CMP0156 NEW) cmake_policy(SET CMP0156 NEW)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LIBRARIES_PROCESSING.cmake" "set(CMAKE_C_LINK_LIBRARIES_PROCESSING \"${CMAKE_C_LINK_LIBRARIES_PROCESSING}\")\n") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/LIBRARIES_PROCESSING.cmake" "set(CMAKE_C_LINK_LIBRARIES_PROCESSING \"${CMAKE_C_LINK_LIBRARIES_PROCESSING}\")\n")