summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake4
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake4
-rw-r--r--Modules/CMakeFindBinUtils.cmake8
-rw-r--r--Modules/CheckTypeSize.cmake5
-rw-r--r--Modules/Compiler/Clang-ASM.cmake1
-rw-r--r--Modules/Compiler/GNU.cmake2
-rw-r--r--Modules/Compiler/Intel-ASM.cmake2
-rw-r--r--Modules/Compiler/Intel-C.cmake2
-rw-r--r--Modules/Compiler/Intel-CXX.cmake2
-rw-r--r--Modules/Compiler/SunPro-ASM.cmake2
-rw-r--r--Modules/Compiler/SunPro-C.cmake2
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake2
-rw-r--r--Modules/Compiler/SunPro-Fortran.cmake2
-rw-r--r--Modules/Compiler/TinyCC-C.cmake2
-rw-r--r--Modules/Compiler/XL-ASM.cmake2
-rw-r--r--Modules/DeployQt4.cmake4
-rw-r--r--Modules/FindGTK.cmake6
-rw-r--r--Modules/FindPackageHandleStandardArgs.cmake2
-rw-r--r--Modules/FindX11.cmake5
-rw-r--r--Modules/GetPrerequisites.cmake1
20 files changed, 30 insertions, 30 deletions
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 171eadd..16e2f53 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -160,9 +160,7 @@ if (CMAKE_CROSSCOMPILING
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif ()
-endif (CMAKE_CROSSCOMPILING
- AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
- AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+endif ()
include(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
include(CMakeFindBinUtils)
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 898947a..8e4d59f 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -167,9 +167,7 @@ if (CMAKE_CROSSCOMPILING
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
endif ()
-endif (CMAKE_CROSSCOMPILING
- AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
- AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+endif ()
include(${CMAKE_ROOT}/Modules/CMakeClDeps.cmake)
include(CMakeFindBinUtils)
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index 362052f..e08c1c6 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -39,9 +39,7 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
mark_as_advanced(CMAKE_LINKER)
# in all other cases search for ar, ranlib, etc.
-else("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
- OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
- OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+else()
find_program(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
@@ -58,9 +56,7 @@ else("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
mark_as_advanced(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY)
-endif("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
- OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
- OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+endif()
# on Apple there really should be install_name_tool
diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake
index 1b9dc9f..7285b8a 100644
--- a/Modules/CheckTypeSize.cmake
+++ b/Modules/CheckTypeSize.cmake
@@ -24,6 +24,11 @@
# size check automatically includes the available headers, thus
# supporting checks of types defined in the headers.
#
+# Despite the name of the macro you may use it to check the size of
+# more complex expressions, too. To check e.g. for the size of a struct
+# member you can do something like this:
+# check_type_size("((struct something*)0)->member" SIZEOF_MEMBER)
+#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
diff --git a/Modules/Compiler/Clang-ASM.cmake b/Modules/Compiler/Clang-ASM.cmake
new file mode 100644
index 0000000..a908b60
--- /dev/null
+++ b/Modules/Compiler/Clang-ASM.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-ASM)
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index 0827e43..faad416 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -45,7 +45,7 @@ macro(__compiler_gnu lang)
set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-g")
set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_${lang}_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
- set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+ set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
if(NOT APPLE)
diff --git a/Modules/Compiler/Intel-ASM.cmake b/Modules/Compiler/Intel-ASM.cmake
index 1f064c9..74ceb0a 100644
--- a/Modules/Compiler/Intel-ASM.cmake
+++ b/Modules/Compiler/Intel-ASM.cmake
@@ -4,7 +4,7 @@ set(CMAKE_ASM_FLAGS_INIT "")
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
-set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
if(UNIX)
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index bca86a0..e23317c 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -4,7 +4,7 @@ set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 354bb17..ae6021a 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -4,7 +4,7 @@ set(CMAKE_CXX_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG")
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
diff --git a/Modules/Compiler/SunPro-ASM.cmake b/Modules/Compiler/SunPro-ASM.cmake
index 97776da..2fa8b99 100644
--- a/Modules/Compiler/SunPro-ASM.cmake
+++ b/Modules/Compiler/SunPro-ASM.cmake
@@ -12,7 +12,7 @@ set(CMAKE_ASM_FLAGS_INIT "")
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
# Initialize ASM link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake
index 9e36051..c5b5203 100644
--- a/Modules/Compiler/SunPro-C.cmake
+++ b/Modules/Compiler/SunPro-C.cmake
@@ -12,7 +12,7 @@ set(CMAKE_C_FLAGS_INIT "")
set(CMAKE_C_FLAGS_DEBUG_INIT "-g")
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
set(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index af31c7b..5968712 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -12,7 +12,7 @@ set(CMAKE_CXX_FLAGS_INIT "")
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
set(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
# Initialize C link type selection flags. These flags are used when
# building a shared library, shared module, or executable that links
diff --git a/Modules/Compiler/SunPro-Fortran.cmake b/Modules/Compiler/SunPro-Fortran.cmake
index 223a6c6..18e75b9 100644
--- a/Modules/Compiler/SunPro-Fortran.cmake
+++ b/Modules/Compiler/SunPro-Fortran.cmake
@@ -13,6 +13,6 @@ set(CMAKE_Fortran_FLAGS_INIT "")
set(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g")
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG")
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG")
-set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2")
+set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2 -DNDEBUG")
set(CMAKE_Fortran_MODDIR_FLAG "-moddir=")
set(CMAKE_Fortran_MODPATH_FLAG "-M")
diff --git a/Modules/Compiler/TinyCC-C.cmake b/Modules/Compiler/TinyCC-C.cmake
index 178dd0c..f7937ac 100644
--- a/Modules/Compiler/TinyCC-C.cmake
+++ b/Modules/Compiler/TinyCC-C.cmake
@@ -5,4 +5,4 @@ set (CMAKE_C_FLAGS_INIT "")
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")
+set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
diff --git a/Modules/Compiler/XL-ASM.cmake b/Modules/Compiler/XL-ASM.cmake
index 95af2ea..07507f9 100644
--- a/Modules/Compiler/XL-ASM.cmake
+++ b/Modules/Compiler/XL-ASM.cmake
@@ -8,6 +8,6 @@ set(CMAKE_ASM_FLAGS_INIT "-qthreaded -qalias=noansi -qhalt=e -qsourcetype=assemb
set(CMAKE_ASM_FLAGS_DEBUG_INIT "-g")
set(CMAKE_ASM_FLAGS_RELEASE_INIT "-O -DNDEBUG")
set(CMAKE_ASM_FLAGS_MINSIZEREL_INIT "-O -DNDEBUG")
-set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g")
+set(CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT "-g -DNDEBUG")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s )
diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake
index 6190abe..309fce3 100644
--- a/Modules/DeployQt4.cmake
+++ b/Modules/DeployQt4.cmake
@@ -101,7 +101,7 @@ function(resolve_qt4_paths paths_var)
if(${executable_path})
list(APPEND paths_resolved "${executable_path}/${path}")
else()
- list(APPEND paths_resolved "\${CMAKE_INSTALL_PREFIX}/${path}")
+ list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}")
endif()
endif()
endforeach()
@@ -295,7 +295,7 @@ function(install_qt4_executable executable)
install(CODE
"include(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\")
set(BU_CHMOD_BUNDLE_ITEMS TRUE)
- FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
+ FIXUP_QT4_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
${component}
)
endfunction()
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake
index 505a051..8a44ade 100644
--- a/Modules/FindGTK.cmake
+++ b/Modules/FindGTK.cmake
@@ -139,11 +139,7 @@ if(UNIX)
)
endif()
- endif(GTK_gtk_INCLUDE_PATH
- AND GTK_glibconfig_INCLUDE_PATH
- AND GTK_glib_INCLUDE_PATH
- AND GTK_gtk_LIBRARY
- AND GTK_glib_LIBRARY)
+ endif()
mark_as_advanced(
GTK_gdk_LIBRARY
diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake
index 449fd9f..888e109 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -247,7 +247,7 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
set(VERSION_OK FALSE)
else ()
- set(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+ set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")")
endif ()
endif()
diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake
index 0b63bc9..e12dc0a 100644
--- a/Modules/FindX11.cmake
+++ b/Modules/FindX11.cmake
@@ -324,6 +324,11 @@ if (UNIX)
set(X11_SM_FOUND TRUE)
endif()
+ # Most of the X11 headers will be in the same directories, avoid
+ # creating a huge list of duplicates.
+ if (X11_INCLUDE_DIR)
+ list(REMOVE_DUPLICATES X11_INCLUDE_DIR)
+ endif ()
# Deprecated variable for backwards compatibility with CMake 1.4
if (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index e51055f..8f2754e 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -168,6 +168,7 @@ function(is_file_executable file result_var)
if(UNIX)
if(NOT file_cmd)
find_program(file_cmd "file")
+ mark_as_advanced(file_cmd)
endif()
if(file_cmd)