From bd0adb3040e932e4cfc75d6bb050c607b22e24e4 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Fri, 18 Feb 2022 16:45:04 -0700 Subject: [PATCH] Refactor CMake to user correct C/C++ Standard Make sure the correct C++ version but also refactor the tests CMake code to clean it up. --- CMakeLists.txt | 2 + loader/CMakeLists.txt | 5 ++ tests/CMakeLists.txt | 6 +- tests/framework/CMakeLists.txt | 36 +++++++--- tests/framework/framework_config.h.in | Bin 5003 -> 5003 bytes tests/framework/icd/CMakeLists.txt | 67 ++++++----------- tests/framework/layer/CMakeLists.txt | 68 ++++-------------- tests/framework/shim/CMakeLists.txt | 6 +- tests/framework/test_util.h | 4 ++ tests/live_verification/CMakeLists.txt | 3 +- .../dynamic_loader_behavior/CMakeLists.txt | 9 +++ 11 files changed, 88 insertions(+), 118 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccfb2e27..bac88773 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,6 +261,8 @@ target_compile_definitions(loader_common_options INTERFACE VK_ENABLE_BETA_EXTENS target_compile_features(loader_common_options INTERFACE c_std_99) target_compile_features(loader_common_options INTERFACE cxx_std_11) +set(LOADER_STANDARD_C_PROPERTIES PROPERTIES C_STANDARD 99 C_STANDARD_REQUIRED YES C_EXTENSIONS OFF) +set(LOADER_STANDARD_CXX_PROPERTIES PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS OFF) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") target_compile_options(loader_common_options INTERFACE -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fno-builtin-memcmp) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 43a878f2..167adf41 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -331,6 +331,11 @@ endif() # common attributes of the vulkan library target_link_libraries(vulkan loader_specific_options) +set_target_properties(vulkan ${LOADER_STANDARD_C_PROPERTIES}) +if (TARGET asm_offset) + set_target_properties(asm_offset ${LOADER_STANDARD_C_PROPERTIES}) +endif() + # Generate pkg-config file. include(FindPkgConfig QUIET) if(PKG_CONFIG_FOUND) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1c06c71f..22104474 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,13 +39,15 @@ add_executable( loader_version_tests.cpp loader_unknown_ext_tests.cpp loader_wsi_tests.cpp) -target_link_libraries(test_regression PRIVATE testing_dependencies) +target_link_libraries(test_regression PUBLIC testing_dependencies) +set_target_properties(test_regression ${LOADER_STANDARD_CXX_PROPERTIES}) add_executable( test_threading loader_testing_main.cpp loader_threading_tests.cpp) -target_link_libraries(test_threading PRIVATE testing_dependencies) +target_link_libraries(test_threading PUBLIC testing_dependencies) +set_target_properties(test_threading ${LOADER_STANDARD_CXX_PROPERTIES}) # executables that are meant for testing against real drivers rather than the mocks if (ENABLE_LIVE_VERIFICATION_TESTS) diff --git a/tests/framework/CMakeLists.txt b/tests/framework/CMakeLists.txt index c47cd997..a49159ba 100644 --- a/tests/framework/CMakeLists.txt +++ b/tests/framework/CMakeLists.txt @@ -16,7 +16,8 @@ # ~~~ add_library(testing_framework_util STATIC test_util.cpp) -target_link_libraries(testing_framework_util PUBLIC Vulkan::Headers loader_common_options platform_wsi_defines) +target_link_libraries(testing_framework_util PUBLIC loader_common_options Vulkan::Headers) +set_target_properties(testing_framework_util ${LOADER_STANDARD_CXX_PROPERTIES}) if(UNIX OR APPLE) target_link_libraries(testing_framework_util PUBLIC ${CMAKE_DL_LIBS}) @@ -43,6 +44,23 @@ if (UNIX) endif() endif() +include(CMakeParseArguments) +function(AddSharedLibrary LIBRARY_NAME) + set(singleValueArgs DEF_FILE) + set(multiValueArgs SOURCES DEFINITIONS) + cmake_parse_arguments(PARSED_ARGS "" "${singleValueArgs}" + "${multiValueArgs}" ${ARGN} ) + + add_library(${LIBRARY_NAME} SHARED ${PARSED_ARGS_SOURCES}) + target_link_libraries(${LIBRARY_NAME} PUBLIC testing_framework_util) + target_compile_definitions(${LIBRARY_NAME} PRIVATE ${PARSED_ARGS_DEFINITIONS}) + set_target_properties(${LIBRARY_NAME} ${LOADER_STANDARD_CXX_PROPERTIES}) + # Windows requires export definitions for these libraries + if(WIN32) + target_sources(${LIBRARY_NAME} PRIVATE export_definitions/${PARSED_ARGS_DEF_FILE}.def) + endif() +endfunction() + add_subdirectory(data) add_subdirectory(shim) add_subdirectory(icd) @@ -68,13 +86,9 @@ add_custom_command( add_custom_target (generate_framework_config DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/framework_config.h") add_dependencies (testing_framework_util generate_framework_config) -add_library(test-environment STATIC test_environment.cpp test_environment.h) -target_link_libraries(test-environment - PUBLIC gtest - testing_framework_util shim-library) -target_include_directories(test-environment PUBLIC ${CMAKE_BINARY_DIR}/tests/framework) -target_compile_definitions(test-environment PUBLIC "GTEST_LINKED_AS_SHARED_LIBRARY=1") - -add_library(testing_dependencies INTERFACE) - -target_link_libraries(testing_dependencies INTERFACE Vulkan::Headers testing_framework_util test-environment) +add_library(testing_dependencies STATIC test_environment.cpp test_environment.h) +target_link_libraries(testing_dependencies + PUBLIC gtest Vulkan::Headers testing_framework_util shim-library) +target_include_directories(testing_dependencies PUBLIC ${CMAKE_BINARY_DIR}/tests/framework) +target_compile_definitions(testing_dependencies PUBLIC "GTEST_LINKED_AS_SHARED_LIBRARY=1") +set_target_properties(testing_dependencies ${LOADER_STANDARD_CXX_PROPERTIES}) diff --git a/tests/framework/framework_config.h.in b/tests/framework/framework_config.h.in index fa7d0139889f0e2c1f01a03cfd1fc7b7588db552..fca36cb57d43e8e2594947b6ecb398e6c1611c06 100644 GIT binary patch delta 9 QcmeBH?^fT?CCtbL01&tWy#N3J delta 9 QcmeBH?^fT?CCtbG01&PMvj6}9 diff --git a/tests/framework/icd/CMakeLists.txt b/tests/framework/icd/CMakeLists.txt index bf6d6967..0ef56601 100644 --- a/tests/framework/icd/CMakeLists.txt +++ b/tests/framework/icd/CMakeLists.txt @@ -15,52 +15,27 @@ # limitations under the License. # ~~~ -set(CMAKE_CXX_STANDARD 11) - -add_library(test_icd_deps INTERFACE) - -target_compile_definitions(test_icd_deps INTERFACE VK_NO_PROTOTYPES) - -target_link_libraries(test_icd_deps INTERFACE testing_framework_util) - -set(TEST_ICD_SOURCES test_icd.cpp test_icd.h) - -# test icd without any config macros defined -add_library(test_icd_export_none SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_export_none PRIVATE test_icd_deps) - -add_library(test_icd_export_icd_gipa SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_export_icd_gipa PRIVATE test_icd_deps) -target_compile_definitions(test_icd_export_icd_gipa PRIVATE TEST_ICD_EXPORT_ICD_GIPA=1) - -add_library(test_icd_export_negotiate_interface_version SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_export_negotiate_interface_version PRIVATE test_icd_deps) -target_compile_definitions(test_icd_export_negotiate_interface_version PRIVATE TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION=1) set(TEST_ICD_VERSION_2_DEFINES TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION=1 TEST_ICD_EXPORT_ICD_GIPA=1) -add_library(test_icd_version_2 SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_version_2 PRIVATE test_icd_deps) -target_compile_definitions(test_icd_version_2 PRIVATE ${TEST_ICD_VERSION_2_DEFINES}) - -add_library(test_icd_version_2_export_icd_enumerate_adapter_physical_devices SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_version_2_export_icd_enumerate_adapter_physical_devices PRIVATE test_icd_deps) -target_compile_definitions(test_icd_version_2_export_icd_enumerate_adapter_physical_devices PRIVATE TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES}) - -add_library(test_icd_version_2_export_icd_gpdpa SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_version_2_export_icd_gpdpa PRIVATE test_icd_deps) -target_compile_definitions(test_icd_version_2_export_icd_gpdpa PRIVATE TEST_ICD_EXPORT_ICD_GPDPA=1 ${TEST_ICD_VERSION_2_DEFINES}) - -add_library(test_icd_version_6 SHARED ${TEST_ICD_SOURCES}) -target_link_libraries(test_icd_version_6 PRIVATE test_icd_deps) -target_compile_definitions(test_icd_version_6 PRIVATE TEST_ICD_EXPORT_ICD_GPDPA=1 TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES}) - -if (WIN32) - target_sources(test_icd_export_none PRIVATE export_definitions/test_icd_0.def) - target_sources(test_icd_export_icd_gipa PRIVATE export_definitions/test_icd_gipa.def) - target_sources(test_icd_export_negotiate_interface_version PRIVATE export_definitions/test_icd_negotiate_version.def) - target_sources(test_icd_version_2 PRIVATE export_definitions/test_icd_2.def) - target_sources(test_icd_version_2_export_icd_enumerate_adapter_physical_devices PRIVATE export_definitions/test_icd_2_enum_adapter.def) - target_sources(test_icd_version_2_export_icd_gpdpa PRIVATE export_definitions/test_icd_2_gpdpa.def) - target_sources(test_icd_version_6 PRIVATE export_definitions/test_icd_6.def) -endif() +AddSharedLibrary(test_icd_export_none DEF_FILE test_icd_0 + SOURCES test_icd.cpp + DEFINITIONS "") +AddSharedLibrary(test_icd_export_icd_gipa DEF_FILE test_icd_gipa + SOURCES test_icd.cpp + DEFINITIONS TEST_ICD_EXPORT_ICD_GIPA=1) +AddSharedLibrary(test_icd_export_negotiate_interface_version DEF_FILE test_icd_negotiate_version + SOURCES test_icd.cpp + DEFINITIONS TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION=1) +AddSharedLibrary(test_icd_version_2 DEF_FILE test_icd_2 + SOURCES test_icd.cpp + DEFINITIONS ${TEST_ICD_VERSION_2_DEFINES}) +AddSharedLibrary(test_icd_version_2_export_icd_enumerate_adapter_physical_devices DEF_FILE test_icd_2_enum_adapter + SOURCES test_icd.cpp + DEFINITIONS TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES}) +AddSharedLibrary(test_icd_version_2_export_icd_gpdpa DEF_FILE test_icd_2_gpdpa + SOURCES test_icd.cpp + DEFINITIONS TEST_ICD_EXPORT_ICD_GPDPA=1 ${TEST_ICD_VERSION_2_DEFINES}) +AddSharedLibrary(test_icd_version_6 DEF_FILE test_icd_6 + SOURCES test_icd.cpp + DEFINITIONS TEST_ICD_EXPORT_ICD_GPDPA=1 TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES}) diff --git a/tests/framework/layer/CMakeLists.txt b/tests/framework/layer/CMakeLists.txt index b70d61e9..0ebc6103 100644 --- a/tests/framework/layer/CMakeLists.txt +++ b/tests/framework/layer/CMakeLists.txt @@ -15,38 +15,16 @@ # limitations under the License. # ~~~ -add_library(test_layer_deps INTERFACE) - -target_compile_definitions(test_layer_deps INTERFACE VK_NO_PROTOTYPES) - -target_link_libraries(test_layer_deps INTERFACE testing_framework_util) - -# Interface testing layer -set(TEST_LAYER_SOURCES test_layer.cpp test_layer.h) - set(TEST_LAYER_BASE_EXPORTS TEST_LAYER_EXPORT_ENUMERATE_FUNCTIONS=1) -set(TEST_LAYER_VERSION_0_EXPORTS TEST_LAYER_EXPORT_LAYER_NAMED_GIPA=1 TEST_LAYER_EXPORT_LAYER_NAMED_GDPA=1 ${TEST_LAYER_BASE_EXPORTS}) -set(TEST_LAYER_VERSION_1_EXPORTS TEST_LAYER_EXPORT_NO_PREFIX_GIPA=1 TEST_LAYER_EXPORT_NO_PREFIX_GDPA=1 ${TEST_LAYER_BASE_EXPORTS}) -set(TEST_LAYER_VERSION_2_EXPORTS TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR=1 - LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION=1 ${TEST_LAYER_BASE_EXPORTS}) - -add_library(test_layer_export_base SHARED ${TEST_LAYER_SOURCES}) -target_link_libraries(test_layer_export_base PRIVATE test_layer_deps) -target_compile_definitions(test_layer_export_base PRIVATE ${TEST_LAYER_BASE_EXPORTS}) - -add_library(test_layer_export_version_0 SHARED ${TEST_LAYER_SOURCES}) -target_link_libraries(test_layer_export_version_0 PRIVATE test_layer_deps) -target_compile_definitions(test_layer_export_version_0 PRIVATE ${TEST_LAYER_VERSION_0_EXPORTS}) +set(TEST_LAYER_VERSION_0_EXPORTS ${TEST_LAYER_BASE_EXPORTS} TEST_LAYER_EXPORT_LAYER_NAMED_GIPA=1 TEST_LAYER_EXPORT_LAYER_NAMED_GDPA=1) +set(TEST_LAYER_VERSION_1_EXPORTS ${TEST_LAYER_VERSION_0_EXPORTS} TEST_LAYER_EXPORT_NO_PREFIX_GIPA=1 TEST_LAYER_EXPORT_NO_PREFIX_GDPA=1) +set(TEST_LAYER_VERSION_2_EXPORTS ${TEST_LAYER_VERSION_1_EXPORTS} TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR=1 + LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION=1) -add_library(test_layer_export_version_1 SHARED ${TEST_LAYER_SOURCES}) -target_link_libraries(test_layer_export_version_1 PRIVATE test_layer_deps) -target_compile_definitions(test_layer_export_version_1 PRIVATE - ${TEST_LAYER_VERSION_0_EXPORTS} ${TEST_LAYER_VERSION_1_EXPORTS}) - -add_library(test_layer_export_version_2 SHARED ${TEST_LAYER_SOURCES}) -target_link_libraries(test_layer_export_version_2 PRIVATE test_layer_deps) -target_compile_definitions(test_layer_export_version_2 PRIVATE - ${TEST_LAYER_VERSION_0_EXPORTS} ${TEST_LAYER_VERSION_1_EXPORTS} ${TEST_LAYER_VERSION_2_EXPORTS} ) +AddSharedLibrary(test_layer_export_base DEF_FILE test_layer_base SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_BASE_EXPORTS}) +AddSharedLibrary(test_layer_export_version_0 DEF_FILE test_layer_0 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_0_EXPORTS}) +AddSharedLibrary(test_layer_export_version_1 DEF_FILE test_layer_1 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_1_EXPORTS}) +AddSharedLibrary(test_layer_export_version_2 DEF_FILE test_layer_2 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_2_EXPORTS}) # Wrap Objects layer which wraps dispatchable handles to test that the loader will properly # work in the case where handles in the terminator don't match handles in the trampoline portion. @@ -65,29 +43,7 @@ set(WRAP_LAYER_VERSION_3_EXPORTS TEST_LAYER_EXPORT_PRESENT_IMAGE=1 ) -add_library(test_layer_wrap_objects SHARED wrap_objects.cpp) -target_link_libraries(test_layer_wrap_objects PRIVATE test_layer_deps) - -add_library(test_layer_wrap_objects_1 SHARED wrap_objects.cpp) -target_link_libraries(test_layer_wrap_objects_1 PRIVATE test_layer_deps) -target_compile_definitions(test_layer_wrap_objects_1 PRIVATE ${WRAP_LAYER_VERSION_1_EXPORTS}) - -add_library(test_layer_wrap_objects_2 SHARED wrap_objects.cpp) -target_link_libraries(test_layer_wrap_objects_2 PRIVATE test_layer_deps) -target_compile_definitions(test_layer_wrap_objects_2 PRIVATE ${WRAP_LAYER_VERSION_2_EXPORTS}) - -add_library(test_layer_wrap_objects_3 SHARED wrap_objects.cpp) -target_link_libraries(test_layer_wrap_objects_3 PRIVATE test_layer_deps) -target_compile_definitions(test_layer_wrap_objects_3 PRIVATE ${WRAP_LAYER_VERSION_3_EXPORTS}) - -# Windows requires export definitions for these layers -if(WIN32) - target_sources(test_layer_export_base PRIVATE export_definitions/test_layer_base.def) - target_sources(test_layer_export_version_0 PRIVATE export_definitions/test_layer_0.def) - target_sources(test_layer_export_version_1 PRIVATE export_definitions/test_layer_1.def) - target_sources(test_layer_export_version_2 PRIVATE export_definitions/test_layer_2.def) - target_sources(test_layer_wrap_objects PRIVATE export_definitions/test_layer_wrap_objects.def) - target_sources(test_layer_wrap_objects_1 PRIVATE export_definitions/test_layer_wrap_objects.def) - target_sources(test_layer_wrap_objects_2 PRIVATE export_definitions/test_layer_wrap_objects.def) - target_sources(test_layer_wrap_objects_3 PRIVATE export_definitions/test_layer_wrap_objects.def) -endif() \ No newline at end of file +AddSharedLibrary(test_layer_wrap_objects DEF_FILE test_layer_wrap_objects SOURCES wrap_objects.cpp DEFINITIONS "") +AddSharedLibrary(test_layer_wrap_objects_1 DEF_FILE test_layer_wrap_objects SOURCES wrap_objects.cpp DEFINITIONS ${WRAP_LAYER_VERSION_1_EXPORTS}) +AddSharedLibrary(test_layer_wrap_objects_2 DEF_FILE test_layer_wrap_objects SOURCES wrap_objects.cpp DEFINITIONS ${WRAP_LAYER_VERSION_2_EXPORTS}) +AddSharedLibrary(test_layer_wrap_objects_3 DEF_FILE test_layer_wrap_objects SOURCES wrap_objects.cpp DEFINITIONS ${WRAP_LAYER_VERSION_3_EXPORTS}) diff --git a/tests/framework/shim/CMakeLists.txt b/tests/framework/shim/CMakeLists.txt index f1b27075..82c2573f 100644 --- a/tests/framework/shim/CMakeLists.txt +++ b/tests/framework/shim/CMakeLists.txt @@ -17,7 +17,8 @@ add_library(shim-common STATIC shim_common.cpp) target_link_libraries(shim-common PUBLIC testing_framework_util) -target_include_directories(shim-common PUBLIC ${CMAKE_BINARY_DIR}/loader ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(shim-common PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +set_target_properties(shim-common ${LOADER_STANDARD_CXX_PROPERTIES}) if (WIN32) # need adapters.h which is in the loader folder @@ -35,4 +36,5 @@ elseif(UNIX) endif() endif() #common attributes -target_link_libraries(shim-library PUBLIC shim-common) \ No newline at end of file +target_link_libraries(shim-library PUBLIC shim-common) +set_target_properties(shim-library ${LOADER_STANDARD_CXX_PROPERTIES}) diff --git a/tests/framework/test_util.h b/tests/framework/test_util.h index 0ab83924..ccf605bc 100644 --- a/tests/framework/test_util.h +++ b/tests/framework/test_util.h @@ -82,6 +82,10 @@ #endif +#if !defined(VK_NO_PROTOTYPES) +#define VK_NO_PROTOTYPES +#endif + #include #include #include diff --git a/tests/live_verification/CMakeLists.txt b/tests/live_verification/CMakeLists.txt index e23643cc..1ce0e0dc 100644 --- a/tests/live_verification/CMakeLists.txt +++ b/tests/live_verification/CMakeLists.txt @@ -17,5 +17,6 @@ add_executable(dynamic_rendering_get_proc_addr dynamic_rendering_get_proc_addr.cpp) target_link_libraries(dynamic_rendering_get_proc_addr testing_dependencies) +set_target_properties(dynamic_rendering_get_proc_addr ${LOADER_STANDARD_CXX_PROPERTIES}) -add_subdirectory(dynamic_loader_behavior) \ No newline at end of file +add_subdirectory(dynamic_loader_behavior) diff --git a/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt b/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt index 29c773a5..ef174c91 100644 --- a/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt +++ b/tests/live_verification/dynamic_loader_behavior/CMakeLists.txt @@ -21,14 +21,17 @@ else() add_library(dynamic_library_a dynamic_library.cpp) target_link_libraries(dynamic_library_a PUBLIC testing_framework_util) target_compile_definitions(dynamic_library_a PRIVATE PRINT_OUTPUT_A) +set_target_properties(dynamic_library_a ${LOADER_STANDARD_CXX_PROPERTIES}) add_library(dynamic_library_b dynamic_library.cpp) target_link_libraries(dynamic_library_b PUBLIC testing_framework_util) target_compile_definitions(dynamic_library_b PRIVATE PRINT_OUTPUT_B) +set_target_properties(dynamic_library_b ${LOADER_STANDARD_CXX_PROPERTIES}) add_library(dynamic_library_c dynamic_library.cpp) target_link_libraries(dynamic_library_c PUBLIC testing_framework_util) target_compile_definitions(dynamic_library_c PRIVATE PRINT_OUTPUT_C) +set_target_properties(dynamic_library_c ${LOADER_STANDARD_CXX_PROPERTIES}) add_executable(test_dynamic_linking_a_first test_dynamic_linking.cpp) add_executable(test_dynamic_linking_b_first test_dynamic_linking.cpp) @@ -36,13 +39,19 @@ add_executable(test_dynamic_linking_c_then_load test_dynamic_linking.cpp) target_link_libraries(test_dynamic_linking_a_first PUBLIC dynamic_library_a dynamic_library_b) target_link_libraries(test_dynamic_linking_b_first PUBLIC dynamic_library_b dynamic_library_a) target_link_libraries(test_dynamic_linking_c_then_load PUBLIC dynamic_library_c) +set_target_properties(test_dynamic_linking_a_first ${LOADER_STANDARD_CXX_PROPERTIES}) +set_target_properties(test_dynamic_linking_b_first ${LOADER_STANDARD_CXX_PROPERTIES}) +set_target_properties(test_dynamic_linking_c_then_load ${LOADER_STANDARD_CXX_PROPERTIES}) target_compile_definitions(test_dynamic_linking_c_then_load PRIVATE PRINT_OUTPUT_C) add_executable(test_dynamic_loading test_dynamic_loading.cpp) target_link_libraries(test_dynamic_loading PUBLIC testing_framework_util) +set_target_properties(test_dynamic_loading ${LOADER_STANDARD_CXX_PROPERTIES}) add_executable(test_dynamic_loading_and_linking test_dynamic_loading_and_linking.cpp) target_link_libraries(test_dynamic_loading_and_linking PUBLIC testing_framework_util) target_link_libraries(test_dynamic_loading_and_linking PUBLIC dynamic_library_a) +set_target_properties(test_dynamic_loading_and_linking ${LOADER_STANDARD_CXX_PROPERTIES}) + endif() \ No newline at end of file -- 2.34.1