summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorPaweł Stankowski <aambitny@gmail.com>2016-03-20 09:42:19 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-21 14:51:50 (GMT)
commit53c0dc2dd2216b7927787e6d819a9a734be2c0eb (patch)
tree0c84d992128fba6794d04a613c648e503552874f /Modules/Compiler
parenta9cb00cd50b518656053a5da4147a7106a8bfa78 (diff)
downloadCMake-53c0dc2dd2216b7927787e6d819a9a734be2c0eb.zip
CMake-53c0dc2dd2216b7927787e6d819a9a734be2c0eb.tar.gz
CMake-53c0dc2dd2216b7927787e6d819a9a734be2c0eb.tar.bz2
Add support for Bruce C Compiler (BCC)
Revise C compiler detection code to be K&R compatible.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/Bruce-C-DetermineCompiler.cmake1
-rw-r--r--Modules/Compiler/Bruce-C.cmake7
2 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/Bruce-C-DetermineCompiler.cmake b/Modules/Compiler/Bruce-C-DetermineCompiler.cmake
new file mode 100644
index 0000000..bb9f4b9
--- /dev/null
+++ b/Modules/Compiler/Bruce-C-DetermineCompiler.cmake
@@ -0,0 +1 @@
+set(_compiler_id_pp_test "defined(__BCC__)")
diff --git a/Modules/Compiler/Bruce-C.cmake b/Modules/Compiler/Bruce-C.cmake
new file mode 100644
index 0000000..23676ec
--- /dev/null
+++ b/Modules/Compiler/Bruce-C.cmake
@@ -0,0 +1,7 @@
+# Bruce C Compiler ignores "-g" flag and optimization cannot be
+# enabled here (it is implemented only for 8086 target).
+set (CMAKE_C_FLAGS_INIT "-D__CLASSIC_C__")
+set (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+set (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
+set (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
+set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")