summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-11-24 10:00:06 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-11-24 20:03:02 +0300
commitb32861c68610b2993fda3ee7f9c5b5832e5989d1 (patch)
treeccdc379d9bae9206419d40824be82805325554dc /CMakeLists.txt
parenteede547e2cd4dde96053f987bfb3a7ea3d36f032 (diff)
downloadbdwgc-b32861c68610b2993fda3ee7f9c5b5832e5989d1.tar.gz
Put gc_badalc/cpp.cpp instead of .cc ones in CMake script (MSVC/BCC/WCC)
This is for testing purpose mostly. * CMakeLists.txt [enable_cplusplus && (BORLAND || MSVC || WATCOM)] (gccpp): Add .cpp files instead of .cc ones. * CMakeLists.txt [enable_cplusplus && (BORLAND || MSVC || WATCOM) && enable_throw_bad_alloc_library] (gctba): Likewise.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f975e9e4..214ffbe9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -463,14 +463,22 @@ target_include_directories(gc INTERFACE
"$<INSTALL_INTERFACE:include>")
if (enable_cplusplus)
- add_library(gccpp gc_badalc.cc gc_cpp.cc)
+ if (BORLAND OR MSVC OR WATCOM)
+ add_library(gccpp gc_badalc.cpp gc_cpp.cpp)
+ else()
+ add_library(gccpp gc_badalc.cc gc_cpp.cc)
+ endif()
target_link_libraries(gccpp PRIVATE gc)
target_include_directories(gccpp INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
if (enable_throw_bad_alloc_library)
# The same as gccpp but contains only gc_badalc.
- add_library(gctba gc_badalc.cc)
+ if (BORLAND OR MSVC OR WATCOM)
+ add_library(gctba gc_badalc.cpp)
+ else()
+ add_library(gctba gc_badalc.cc)
+ endif()
target_link_libraries(gctba PRIVATE gc)
target_include_directories(gctba INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"