summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFindBinUtils.cmake12
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake3
-rw-r--r--Modules/Compiler/AppleClang-C.cmake3
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake2
-rw-r--r--Modules/Compiler/Clang-C-FeatureTests.cmake4
-rw-r--r--Modules/Compiler/Clang-C.cmake10
-rw-r--r--Modules/Compiler/Clang-CXX.cmake2
-rw-r--r--Modules/Compiler/Clang.cmake4
-rw-r--r--Modules/Compiler/GNU-C-FeatureTests.cmake4
-rw-r--r--Modules/Compiler/GNU-C.cmake7
-rw-r--r--Modules/Compiler/GNU-CXX.cmake7
-rw-r--r--Modules/FindJava.cmake5
-rw-r--r--Modules/FindOpenGL.cmake40
-rw-r--r--Modules/FindOpenMP.cmake10
-rw-r--r--Modules/FindPythonInterp.cmake4
-rw-r--r--Modules/FindwxWidgets.cmake2
-rw-r--r--Modules/Platform/Windows-Clang.cmake4
-rw-r--r--Modules/WriteCompilerDetectionHeader.cmake2
18 files changed, 49 insertions, 76 deletions
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index e0ba131..376a6dc 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -30,12 +30,12 @@
# License text for the above reference.)
# if it's the MS C/CXX compiler, search for link
-if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC"
- OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC"
- OR "${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "MSVC"
- OR "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC"
- OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
- OR ("${CMAKE_GENERATOR}" MATCHES "Visual Studio"
+if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
+ OR (CMAKE_GENERATOR MATCHES "Visual Studio"
AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))
find_program(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index bfcf455..fcc13da 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -66,7 +66,8 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
set(log "${log} arg [${arg}] ==> dir [${dir}]\n")
elseif("${arg}" MATCHES "^-l([^:].*)$")
# Unix library.
- list(APPEND implicit_libs_tmp ${CMAKE_MATCH_1})
+ set(lib "${CMAKE_MATCH_1}")
+ list(APPEND implicit_libs_tmp ${lib})
set(log "${log} arg [${arg}] ==> lib [${lib}]\n")
elseif("${arg}" MATCHES "^(.:)?[/\\].*\\.a$")
# Unix library full path.
diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake
index 44070b8..98fcd0b 100644
--- a/Modules/Compiler/AppleClang-C.cmake
+++ b/Modules/Compiler/AppleClang-C.cmake
@@ -1 +1,2 @@
-include(Compiler/Clang-C)
+include(Compiler/Clang)
+__compiler_clang(C)
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 0372e18..c1acae6 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -1,6 +1,6 @@
include(Compiler/Clang)
__compiler_clang(CXX)
-if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()
diff --git a/Modules/Compiler/Clang-C-FeatureTests.cmake b/Modules/Compiler/Clang-C-FeatureTests.cmake
index 4a72e87..2d8673d 100644
--- a/Modules/Compiler/Clang-C-FeatureTests.cmake
+++ b/Modules/Compiler/Clang-C-FeatureTests.cmake
@@ -1,9 +1,9 @@
set(_cmake_oldestSupported "((__clang_major__ * 100) + __clang_minor__) >= 304")
-set(Clang_C11 "${_cmake_oldestSupported} && __STDC_VERSION__ >= 201112L")
+set(Clang_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L")
set(_cmake_feature_test_c_static_assert "${Clang_C11}")
-set(Clang_C99 "${_cmake_oldestSupported} && __STDC_VERSION__ >= 199901L")
+set(Clang_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L")
set(_cmake_feature_test_c_restrict "${Clang_C99}")
set(_cmake_feature_test_c_variadic_macros "${Clang_C99}")
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake
index 05d3c0b..d504d69 100644
--- a/Modules/Compiler/Clang-C.cmake
+++ b/Modules/Compiler/Clang-C.cmake
@@ -6,7 +6,7 @@ if(WIN32 OR (APPLE AND NOT appleClangPolicy STREQUAL NEW))
return()
endif()
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
+if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
@@ -17,14 +17,18 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
endif()
-set(CMAKE_C_STANDARD_DEFAULT 90)
+if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6)
+ set(CMAKE_C_STANDARD_DEFAULT 11)
+elseif(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
+ set(CMAKE_C_STANDARD_DEFAULT 99)
+endif()
macro(cmake_record_c_compile_features)
macro(_get_clang_features std_version list)
record_compiler_features(C "-std=${std_version}" ${list})
endmacro()
- if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
+ if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
_get_clang_features(c11 CMAKE_C11_COMPILE_FEATURES)
if (_result EQUAL 0)
_get_clang_features(c99 CMAKE_C99_COMPILE_FEATURES)
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 5dd7b4a..9ef1413 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -1,7 +1,7 @@
include(Compiler/Clang)
__compiler_clang(CXX)
-if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index eeba119..701089c 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -18,8 +18,8 @@ if(__COMPILER_CLANG)
endif()
set(__COMPILER_CLANG 1)
-if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC"
- OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
macro(__compiler_clang lang)
endmacro()
else()
diff --git a/Modules/Compiler/GNU-C-FeatureTests.cmake b/Modules/Compiler/GNU-C-FeatureTests.cmake
index dc1695c..dfaeebf 100644
--- a/Modules/Compiler/GNU-C-FeatureTests.cmake
+++ b/Modules/Compiler/GNU-C-FeatureTests.cmake
@@ -1,10 +1,10 @@
set(_cmake_oldestSupported "(__GNUC__ * 100 + __GNUC_MINOR__) >= 407")
-set(GNU46_C11 "${_cmake_oldestSupported} && __STDC_VERSION__ >= 201112L")
+set(GNU46_C11 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L")
set(_cmake_feature_test_c_static_assert "${GNU46_C11}")
# Since 4.4 at least:
-set(GNU44_C99 "${_cmake_oldestSupported} && __STDC_VERSION__ >= 199901L")
+set(GNU44_C99 "${_cmake_oldestSupported} && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L")
set(_cmake_feature_test_c_restrict "${GNU44_C99}")
set(_cmake_feature_test_c_variadic_macros "${GNU44_C99}")
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake
index 35954be..24d439d 100644
--- a/Modules/Compiler/GNU-C.cmake
+++ b/Modules/Compiler/GNU-C.cmake
@@ -12,8 +12,11 @@ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
endif()
-# This may change in a future GNU version.
-set(CMAKE_C_STANDARD_DEFAULT 90)
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
+ set(CMAKE_C_STANDARD_DEFAULT 11)
+else(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
+ set(CMAKE_C_STANDARD_DEFAULT 90)
+endif()
macro(cmake_record_c_compile_features)
macro(_get_gcc_features std_version list)
diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake
index 14dc76a..4129a38 100644
--- a/Modules/Compiler/GNU-CXX.cmake
+++ b/Modules/Compiler/GNU-CXX.cmake
@@ -11,7 +11,8 @@ else()
endif()
endif()
-if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3)
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
+ # Supported since 4.3
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
endif()
@@ -19,9 +20,7 @@ endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
-elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3)
- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x")
- set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
+ # 4.3 supports 0x variants
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 79be34e..bb73853 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -115,7 +115,10 @@ if(Java_JAVA_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if( res )
- if(${Java_FIND_REQUIRED})
+ if(var MATCHES "No Java runtime present, requesting install")
+ set_property(CACHE Java_JAVA_EXECUTABLE
+ PROPERTY VALUE "Java_JAVA_EXECUTABLE-NOTFOUND")
+ elseif(${Java_FIND_REQUIRED})
message( FATAL_ERROR "Error executing java -version" )
else()
message( STATUS "Warning, could not run java -version")
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 2b3bd14..a83a6c3 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -4,16 +4,6 @@
#
# FindModule for OpenGL and GLU.
#
-# IMPORTED Targets
-# ^^^^^^^^^^^^^^^^
-#
-# This module defines the :prop_tgt:`IMPORTED` targets:
-#
-# ``OpenGL::GL``
-# Defined if the system has OpenGL.
-# ``OpenGL::GLU``
-# Defined if the system has GLU.
-#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
@@ -191,36 +181,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS})
unset(_OpenGL_REQUIRED_VARS)
-# OpenGL:: targets
-if(OPENGL_FOUND)
- if(NOT TARGET OpenGL::GL)
- add_library(OpenGL::GL UNKNOWN IMPORTED)
- set_target_properties(OpenGL::GL PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}")
- if(OPENGL_gl_LIBRARY MATCHES "/([^/]+)\\.framework$")
- set_target_properties(OpenGL::GL PROPERTIES
- IMPORTED_LOCATION "${OPENGL_gl_LIBRARY}/${CMAKE_MATCH_1}")
- else()
- set_target_properties(OpenGL::GL PROPERTIES
- IMPORTED_LOCATION "${OPENGL_gl_LIBRARY}")
- endif()
- endif()
-
- if(OPENGL_GLU_FOUND AND NOT TARGET OpenGL::GLU)
- add_library(OpenGL::GLU UNKNOWN IMPORTED)
- set_target_properties(OpenGL::GLU PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES OpenGL::GL)
- if(OPENGL_glu_LIBRARY MATCHES "/([^/]+)\\.framework$")
- set_target_properties(OpenGL::GLU PROPERTIES
- IMPORTED_LOCATION "${OPENGL_glu_LIBRARY}/${CMAKE_MATCH_1}")
- else()
- set_target_properties(OpenGL::GLU PROPERTIES
- IMPORTED_LOCATION "${OPENGL_glu_LIBRARY}")
- endif()
- endif()
-endif()
-
mark_as_advanced(
OPENGL_INCLUDE_DIR
OPENGL_xmesa_INCLUDE_DIR
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 801b4f8..a102c66 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -111,11 +111,11 @@ int main() {
# same in Fortran
set(OpenMP_Fortran_TEST_SOURCE
"
-program test
-use omp_lib
-integer :: n
-n = omp_get_num_threads()
-end program test
+ program test
+ use omp_lib
+ integer :: n
+ n = omp_get_num_threads()
+ end program test
"
)
diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake
index 5e5c7b9..8784e18 100644
--- a/Modules/FindPythonInterp.cmake
+++ b/Modules/FindPythonInterp.cmake
@@ -148,8 +148,8 @@ if(PYTHON_EXECUTABLE)
# this is older.
set(PYTHON_VERSION_STRING "1.4")
set(PYTHON_VERSION_MAJOR "1")
- set(PYTHON_VERSION_MAJOR "4")
- set(PYTHON_VERSION_MAJOR "0")
+ set(PYTHON_VERSION_MINOR "4")
+ set(PYTHON_VERSION_PATCH "0")
endif()
endif()
unset(_PYTHON_VERSION_RESULT)
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 7ef06a8..dec0ddf 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -460,6 +460,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
D:/
ENV ProgramFiles
PATH_SUFFIXES
+ wxWidgets-3.0.2
+ wxWidgets-3.0.1
wxWidgets-3.0.0
wxWidgets-2.9.5
wxWidgets-2.9.4
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake
index 4c936fe..da19a3d 100644
--- a/Modules/Platform/Windows-Clang.cmake
+++ b/Modules/Platform/Windows-Clang.cmake
@@ -18,8 +18,8 @@ if(__WINDOWS_CLANG)
endif()
set(__WINDOWS_CLANG 1)
-if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC"
- OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
+if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
+ OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
include(Platform/Windows-MSVC)
macro(__windows_compiler_clang lang)
__windows_compiler_msvc(${lang})
diff --git a/Modules/WriteCompilerDetectionHeader.cmake b/Modules/WriteCompilerDetectionHeader.cmake
index 86137e2..8d72d0f 100644
--- a/Modules/WriteCompilerDetectionHeader.cmake
+++ b/Modules/WriteCompilerDetectionHeader.cmake
@@ -72,7 +72,7 @@
# write_compiler_detection_header(
# FILE climbingstats_compiler_detection.h
# PREFIX ClimbingStats
-# COMPILERS GNU Clang MSVC
+# COMPILERS GNU Clang
# FEATURES cxx_variadic_templates
# )
#