From a90e707c53f17f002d3115efc0c6ba5a003d3ac8 Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 1 Dec 2022 15:02:12 -0500 Subject: [PATCH] Use the CMakeLists.txt for IS_NEWER_THAN The directory isn't updated every build necessarily but the CMakeLists.txt itself is regenerated often. This should improve the consistency of changing targets & re-loading the cmake project Test: make && reload cmake in clion Change-Id: I5a184ea9c626f03d70f6dc3a5e05646ee33cfe2f --- ide/clion/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ide/clion/CMakeLists.txt b/ide/clion/CMakeLists.txt index b2b5d3f23..122939a40 100644 --- a/ide/clion/CMakeLists.txt +++ b/ide/clion/CMakeLists.txt @@ -21,8 +21,8 @@ function(try_add_subdir path) endif() if (${has_arm64} AND ${has_x64}) - if ("${CMAKE_CURRENT_SOURCE_DIR}/${path_arm64}" IS_NEWER_THAN - "${CMAKE_CURRENT_SOURCE_DIR}/${path_x64}") + if ("${CMAKE_CURRENT_SOURCE_DIR}/${path_arm64}/CMakeLists.txt" IS_NEWER_THAN + "${CMAKE_CURRENT_SOURCE_DIR}/${path_x64}/CMakeLists.txt") add_subdirectory(${path_arm64}) else() add_subdirectory(${path_x64})