From 544adf6bb393aee1338ad3699403d0617d503c43 Mon Sep 17 00:00:00 2001
From: Deepak Rangarajan <deepak.rangarajan@netl.doe.gov>
Date: Mon, 15 Nov 2021 15:41:27 +0000
Subject: [PATCH] switch cmake to use target_compile_definitions instead of
 add_definitions

---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 042cbeb..1f8f7ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,6 @@ find_package(pegtl REQUIRED)
 
 if (CSG_CGAL_ENABLED)
    find_package(CGAL REQUIRED)
-   add_definitions(-DUSE_CGAL)
 endif()
 
 add_subdirectory(src/csg)
@@ -34,3 +33,7 @@ target_include_directories(csg-eb
   )
 
 target_compile_features(csg-eb PRIVATE cxx_std_17)
+
+if (CSG_CGAL_ENABLED)
+   target_compile_definitions(csg-eb PUBLIC USE_CGAL)
+endif()
-- 
GitLab