From 1f47e27f83109eaeb65da4c223b684ce1c010f9d Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Mon, 15 Nov 2021 10:15:32 -0500 Subject: [PATCH 1/3] 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..0e3eac3 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 PRIVATE USE_CGAL) +endif() -- GitLab From b111e097b5f817f87a3f38e50681c894fc923667 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Mon, 15 Nov 2021 10:25:57 -0500 Subject: [PATCH 2/3] right inheritance --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e3eac3..f694ce0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,5 +35,5 @@ target_include_directories(csg-eb target_compile_features(csg-eb PRIVATE cxx_std_17) if (CSG_CGAL_ENABLED) - target_compile_definitions(csg-eb PRIVATE USE_CGAL) + target_compile_definitions(csg-eb INTERFACE USE_CGAL) endif() -- GitLab From 3809a44f749ae06c39638a7a15ebaef9cf027764 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Mon, 15 Nov 2021 10:33:45 -0500 Subject: [PATCH 3/3] right inheritance --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f694ce0..1f8f7ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,5 +35,5 @@ target_include_directories(csg-eb target_compile_features(csg-eb PRIVATE cxx_std_17) if (CSG_CGAL_ENABLED) - target_compile_definitions(csg-eb INTERFACE USE_CGAL) + target_compile_definitions(csg-eb PUBLIC USE_CGAL) endif() -- GitLab