From 05450c6be2d5320fd3ad205fcff90045ae3cb23d Mon Sep 17 00:00:00 2001 From: scivision Date: Tue, 30 Jul 2024 22:29:00 -0400 Subject: [PATCH] remove unused cmake logic --- CMakeLists.txt | 2 +- options.cmake | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94a8498..e7c4dd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ target_link_libraries(hwm14::hwm_ifc INTERFACE hwm_ifc) # --- tests -if(${PROJECT_NAME}_BUILD_TESTING) +if(hwm14_BUILD_TESTING) add_executable(hwm14check test/checkhwm14.f90) target_link_libraries(hwm14check PRIVATE hwm14) add_test(NAME HWM14check COMMAND hwm14check) diff --git a/options.cmake b/options.cmake index 52f4bfc..54e81a4 100644 --- a/options.cmake +++ b/options.cmake @@ -2,16 +2,7 @@ include(GNUInstallDirs) message(STATUS "${PROJECT_NAME} ${PROJECT_VERSION} CMake ${CMAKE_VERSION} Toolchain ${CMAKE_TOOLCHAIN_FILE}") -if(CMAKE_VERSION VERSION_LESS 3.21) - get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY) - if(not_top) - set(${PROJECT_NAME}_IS_TOP_LEVEL false) - else() - set(${PROJECT_NAME}_IS_TOP_LEVEL true) - endif() -endif() - -option(${PROJECT_NAME}_BUILD_TESTING "Build tests" ${${PROJECT_NAME}_IS_TOP_LEVEL}) +option(hwm14_BUILD_TESTING "Build tests" ${hwm14_IS_TOP_LEVEL}) # Necessary for shared library with Visual Studio / Windows oneAPI set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true)