Files
ResInsight/Fwk/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/CMakeLists.txt
T
Magne Sjaastad 022d77bef8 macOS: Initial Apple Silicon and x86_64 build support
* Refactor: add MACOSX_BUNDLE option to qt_add_executable in multiple CMakeLists.txt files
* #14045 macOS: Guard std::stacktrace usage and skip ucontext on Apple platforms
* #14045 macOS: Guard std::ispanstream with std::istringstream fallback
* #14045 macOS: Add vcpkg overlay triplets for osx and exclude grpc on osx
* #14045 macOS: CMake macOS build support and openzgy OpenMP-disable patch
* #14045 CI: Add macOS build workflow
* #14045 macOS: Use feature-test macros to detect <stacktrace> and <spanstream>
* #14045 macOS: Make MAX_STIMPLAN_LAYERS constexpr to fix arm64 link error
* #14045 CI: Ship README-macOS.txt with artifact to document Gatekeeper workaround
* #14045 CI: Pin macOS runner to macos-14 and set deployment target to 14.0
* #14045 CI: Move macOS runner to macos-15 and fix README step on configure failure
2026-06-01 12:38:55 +02:00

56 lines
1.3 KiB
CMake

cmake_minimum_required(VERSION 3.15)
project(cafProjectDataModel_UnitTests)
find_package(
Qt6
COMPONENTS
REQUIRED Core Widgets
)
qt_standard_project_setup()
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
# VS 2017 : Disable warnings from from gtest code, using deprecated code
# related to TR1
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
)
set(PROJECT_FILES
cafPdmBasicTest.cpp
cafProjectDataModel_UnitTests.cpp
cafUiTreeManagerTest.cpp
Child.cpp
Parent.cpp
TestObj.cpp
AggregatedTypesInField.cpp
gtest/gtest-all.cpp
)
qt_add_executable(${PROJECT_NAME} MACOSX_BUNDLE ${PROJECT_FILES})
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(
cafProjectDataModel_UnitTests PRIVATE -Wno-ambiguous-reversed-operator
-Wno-invalid-source-encoding
)
endif()
target_link_libraries(
${PROJECT_NAME} PRIVATE cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY}
)
install(
TARGETS ${PROJECT_NAME}
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
qt_generate_deploy_app_script(
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
)
install(SCRIPT ${deploy_script})