summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompilerId.c.in22
-rw-r--r--Modules/CMakeCompilerIdDetection.cmake1
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake3
-rw-r--r--Modules/CMakePlatformId.h.in6
-rw-r--r--Modules/CPack.OSXX11.Info.plist.in2
-rw-r--r--Modules/Compiler/Bruce-C-DetermineCompiler.cmake1
-rw-r--r--Modules/Compiler/Bruce-C.cmake7
-rw-r--r--Modules/FindBLAS.cmake20
-rw-r--r--Modules/FindLAPACK.cmake15
-rw-r--r--Modules/FindPkgConfig.cmake2
-rw-r--r--Modules/MacOSXBundleInfo.plist.in2
11 files changed, 63 insertions, 18 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 5bfe0fd..c107dfd 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -5,6 +5,11 @@
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
+#if defined(__CLASSIC_C__)
+/* cv-qualifiers did not exist in K&R C */
+# define const
+# define volatile
+#endif
@CMAKE_C_COMPILER_ID_CONTENT@
@@ -28,23 +33,28 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
-const char* info_language_dialect_default = "INFO" ":" "dialect_default["
-#if !defined(__STDC_VERSION__)
- "90"
+#if !defined(__STDC__)
+# define C_DIALECT
#elif __STDC_VERSION__ >= 201000L
- "11"
+# define C_DIALECT "11"
#elif __STDC_VERSION__ >= 199901L
- "99"
+# define C_DIALECT "99"
#else
+# define C_DIALECT "90"
#endif
-"]";
+const char* info_language_dialect_default =
+ "INFO" ":" "dialect_default[" C_DIALECT "]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
+# if defined(__CLASSIC_C__)
+int main(argc, argv) int argc; char *argv[];
+# else
int main(int argc, char* argv[])
+# endif
{
int require = 0;
require += info_compiler[argc];
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake
index cbc0055..1d341e5 100644
--- a/Modules/CMakeCompilerIdDetection.cmake
+++ b/Modules/CMakeCompilerIdDetection.cmake
@@ -79,6 +79,7 @@ function(compiler_id_detection outvar lang)
if (lang STREQUAL C)
list(APPEND ordered_compilers
TinyCC
+ Bruce
)
endif()
list(APPEND ordered_compilers
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index e0b5468..f8c6303 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -87,6 +87,9 @@ else()
# Try enabling ANSI mode on HP.
"-Aa"
+
+ # Try compiling K&R-compatible code (needed by Bruce C Compiler).
+ "-D__CLASSIC_C__"
)
endif()
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index da99b9e..47eb00a 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -91,11 +91,11 @@
# define PLATFORM_ID "Windows3x"
# else /* unknown platform */
-# define PLATFORM_ID ""
+# define PLATFORM_ID
# endif
#else /* unknown platform */
-# define PLATFORM_ID ""
+# define PLATFORM_ID
#endif
@@ -145,7 +145,7 @@
# endif
#else
-# define ARCHITECTURE_ID ""
+# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
diff --git a/Modules/CPack.OSXX11.Info.plist.in b/Modules/CPack.OSXX11.Info.plist.in
index 851b67b..23a1483 100644
--- a/Modules/CPack.OSXX11.Info.plist.in
+++ b/Modules/CPack.OSXX11.Info.plist.in
@@ -41,8 +41,6 @@
<string>@CPACK_APPLE_GUI_BUNDLE_VERSION@</string>
<key>CSResourcesFileMapped</key>
<true/>
- <key>LSRequiresCarbon</key>
- <true/>
<key>NSHumanReadableCopyright</key>
<string>@CPACK_APPLE_GUI_COPYRIGHT@</string>
</dict>
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")
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 416b666..546ada1 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -30,9 +30,9 @@
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
#
# ######### ## List of vendors (BLA_VENDOR) valid in this module #
-# Goto,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,Intel10_32
-# (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,lp thread
-# model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64
+# Goto,OpenBLAS,ATLAS PhiPACK,CXML,DXML,SunPerf,SCSL,SGIMATH,IBMESSL,
+# Intel10_32 (intel mkl v10 32 bit),Intel10_64lp (intel mkl v10 64 bit,
+# lp thread model, lp64 model), # Intel10_64lp_seq (intel mkl v10 64
# bit,sequential code, lp64 model), # Intel( older versions of mkl 32
# and 64 bit), ACML,ACML_MP,ACML_GPU,Apple, NAS, Generic C/CXX should be
# enabled to use Intel mkl
@@ -172,6 +172,20 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
+if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
+ if(NOT BLAS_LIBRARIES)
+ # OpenBLAS (http://www.openblas.net)
+ check_fortran_libraries(
+ BLAS_LIBRARIES
+ BLAS
+ sgemm
+ ""
+ "openblas"
+ ""
+ )
+ endif()
+endif ()
+
if (BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index b11edc3..2708de0 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -31,7 +31,7 @@
# BLA_F95 if set on tries to find the f95 interfaces for BLAS/LAPACK
#
# ## List of vendors (BLA_VENDOR) valid in this module # Intel(mkl),
-# ACML,Apple, NAS, Generic
+# OpenBLAS, ACML,Apple, NAS, Generic
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
@@ -181,6 +181,19 @@ if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All")
endif()
endif ()
+if (BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
+ if(NOT LAPACK_LIBRARIES)
+ check_lapack_libraries(
+ LAPACK_LIBRARIES
+ LAPACK
+ cheev
+ ""
+ "openblas"
+ "${BLAS_LIBRARIES}"
+ ""
+ )
+ endif()
+endif ()
#acml lapack
if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All")
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 4f50e38..447c526 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -383,7 +383,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
pkg_get_variable("${_pkg_check_prefix}_INCLUDEDIR" ${_pkg_check_modules_pkg} "includedir")
pkg_get_variable("${_pkg_check_prefix}_LIBDIR" ${_pkg_check_modules_pkg} "libdir")
foreach (variable IN ITEMS PREFIX INCLUDEDIR LIBDIR)
- _pkgconfig_set("${_pkg_check_modules_pkg}_${variable}" "${${_pkg_check_modules_pkg}_${variable}}")
+ _pkgconfig_set("${_pkg_check_prefix}_${variable}" "${${_pkg_check_prefix}_${variable}}")
endforeach ()
if (NOT ${_is_silent})
diff --git a/Modules/MacOSXBundleInfo.plist.in b/Modules/MacOSXBundleInfo.plist.in
index a466dc7..a4009bc 100644
--- a/Modules/MacOSXBundleInfo.plist.in
+++ b/Modules/MacOSXBundleInfo.plist.in
@@ -28,8 +28,6 @@
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
- <key>LSRequiresCarbon</key>
- <true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
</dict>