mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
- Update the minimum required CMake version to 3.15 for Fwk folders that might be used as top level projects. - Remove the minimum required CMake version from projects that is just included from other top level projects. Since version 3.19 CMake has been warning that CMake versions below 3.5 is deprecated and support will be removed in the future. This will silence those warning. By removing the minimum required version check from projects that is not intended as top level projects we avoid redundant checks and simplifies future maintenance. Closes #10957
35 lines
1016 B
CMake
35 lines
1016 B
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
# Builds all the unit tests
|
|
|
|
|
|
# Just use the base compile flags for all unit tests
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CEE_BASE_CXX_FLAGS}")
|
|
|
|
# And then relax some of the warnings for the unit tests
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-variadic-macros -Wno-long-long -Wno-sign-compare")
|
|
endif()
|
|
|
|
# Setup our platform dependent libraries here, assuming they'll be the same for all the tests
|
|
if (UNIX AND NOT APPLE)
|
|
set(CEE_PLATFORM_LIBS rt pthread)
|
|
endif()
|
|
|
|
add_definitions(-DCVF_UTEST_DEFAULT_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/TestData/")
|
|
|
|
add_subdirectory(LibCore_UnitTests)
|
|
add_subdirectory(LibIo_UnitTests)
|
|
add_subdirectory(LibGeometry_UnitTests)
|
|
add_subdirectory(LibRender_UnitTests)
|
|
add_subdirectory(LibViewing_UnitTests)
|
|
|
|
add_subdirectory(LibRegGrid2D_UnitTests)
|
|
add_subdirectory(LibStructGrid_UnitTests)
|
|
|
|
add_subdirectory(LibUtilities_UnitTests)
|
|
|
|
if (CEE_BUILD_GUI_QT)
|
|
add_subdirectory(LibGuiQt_UnitTests)
|
|
endif()
|