diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CTestTargets.cmake | 2 | ||||
-rw-r--r-- | Modules/FindGTK2.cmake | 11 | ||||
-rw-r--r-- | Modules/FindPackageHandleStandardArgs.cmake | 172 | ||||
-rw-r--r-- | Modules/Platform/Darwin.cmake | 5 | ||||
-rw-r--r-- | Modules/Platform/HP-UX.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/Windows-wcl386.cmake | 19 |
7 files changed, 145 insertions, 70 deletions
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake index 835328c..e3ef86c 100644 --- a/Modules/CTestTargets.cmake +++ b/Modules/CTestTargets.cmake @@ -65,6 +65,7 @@ IF(NOT _CTEST_TARGETS_ADDED) ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode} ) SET_PROPERTY(TARGET ${mode} PROPERTY RULE_LAUNCH_CUSTOM "") + SET_PROPERTY(TARGET ${mode} PROPERTY FOLDER "CTestDashboardTargets") ENDFOREACH(mode) # For Makefile generators add more granular targets. @@ -79,6 +80,7 @@ IF(NOT _CTEST_TARGETS_ADDED) ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype} ) SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY RULE_LAUNCH_CUSTOM "") + SET_PROPERTY(TARGET ${mode}${testtype} PROPERTY FOLDER "CTestDashboardTargets") ENDFOREACH(testtype) ENDFOREACH(mode) ENDIF("${CMAKE_GENERATOR}" MATCHES Make) diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake index 4f341e7..e437e1c 100644 --- a/Modules/FindGTK2.cmake +++ b/Modules/FindGTK2.cmake @@ -66,6 +66,10 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +# Version 1.2 (8/30/2010) (CMake 2.8.3) +# * Merge patch for detecting gdk-pixbuf library (split off +# from core GTK in 2.21). Thanks to Vincent Untz for the patch +# and Ricardo Cruz for the heads up. # Version 1.1 (8/19/2010) (CMake 2.8.3) # * Add support for detecting GTK2 under macports (thanks to Gary Kramlich) # Version 1.0 (8/12/2010) (CMake 2.8.3) @@ -152,6 +156,7 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr) atkmm-1.6 cairo cairomm-1.0 + gdk-pixbuf-2.0 gdkmm-2.4 giomm-2.4 gtk-2.0 @@ -419,6 +424,9 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h) _GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true) + _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h) + _GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true) + _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h) _GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h) @@ -442,9 +450,6 @@ foreach(_GTK2_component ${GTK2_FIND_COMPONENTS}) _GTK2_FIND_INCLUDE_DIR(GTK2_ATK_INCLUDE_DIR atk/atk.h) _GTK2_FIND_LIBRARY (GTK2_ATK_LIBRARY atk false true) - #elseif(_GTK2_component STREQUAL "gdk_pixbuf") - #_GTK2_FIND_INCLUDE_DIR(GTK2_GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h) - #_GTK2_FIND_LIBRARY (GTK2_GDKPIXBUF_LIBRARY gdk_pixbuf false true) elseif(_GTK2_component STREQUAL "gtkmm") diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake index c698480..cd33aa3 100644 --- a/Modules/FindPackageHandleStandardArgs.cmake +++ b/Modules/FindPackageHandleStandardArgs.cmake @@ -20,18 +20,24 @@ # The second mode is more powerful and also supports version checking: # FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>] # [VERSION_VAR <versionvar> +# [CONFIG_MODE] # [FAIL_MESSAGE "Custom failure message"] ) # # As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND # will be set to TRUE. -# Via FAIL_MESSAGE a custom failure message can be specified, if this is not -# used, the default message will be displayed. +# After REQUIRED_VARS the variables which are required for this package are listed. # Following VERSION_VAR the name of the variable can be specified which holds # the version of the package which has been found. If this is done, this version # will be checked against the (potentially) specified required version used # in the find_package() call. The EXACT keyword is also handled. The default # messages include information about the required version and the version # which has been actually found, both if the version is ok or not. +# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for +# a find_package(... NO_MODULE) call, in this case all the information +# provided by the config-mode of find_package() will be evaluated +# automatically. +# Via FAIL_MESSAGE a custom failure message can be specified, if this is not +# used, the default message will be displayed. # # Example for mode 1: # @@ -53,6 +59,15 @@ # Also the version of BISON will be checked by using the version contained # in BISON_VERSION. # Since no FAIL_MESSAGE is given, the default messages will be printed. +# +# Another example for mode 2: +# +# FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE) +# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE) +# and adds an additional search directory for automoc4. +# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper +# success/error message. #============================================================================= # Copyright 2007-2009 Kitware, Inc. @@ -70,12 +85,50 @@ INCLUDE(FindPackageMessage) INCLUDE(CMakeParseArguments) - -FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1) +# internal helper macro +MACRO(_FPHSA_FAILURE_MESSAGE _msg) + IF (${_NAME}_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${_msg}") + ELSE (${_NAME}_FIND_REQUIRED) + IF (NOT ${_NAME}_FIND_QUIETLY) + MESSAGE(STATUS "${_msg}") + ENDIF (NOT ${_NAME}_FIND_QUIETLY) + ENDIF (${_NAME}_FIND_REQUIRED) +ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg) + + +# internal helper macro to generate the failure message when used in CONFIG_MODE: +MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) + # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: + IF(${_NAME}_CONFIG) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") + ELSE(${_NAME}_CONFIG) + # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. + # List them all in the error message: + IF(${_NAME}_CONSIDERED_CONFIGS) + SET(configsText "") + LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) + MATH(EXPR configsCount "${configsCount} - 1") + FOREACH(currentConfigIndex RANGE ${configsCount}) + LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) + LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) + SET(configsText "${configsText} ${filename} (version ${version})\n") + ENDFOREACH(currentConfigIndex) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}") + + ELSE(${_NAME}_CONSIDERED_CONFIGS) + # Simple case: No Config-file was found at all: + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") + ENDIF(${_NAME}_CONSIDERED_CONFIGS) + ENDIF(${_NAME}_CONFIG) +ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) + + +FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) # set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in # new extended or in the "old" mode: - SET(options) # none + SET(options CONFIG_MODE) SET(oneValueArgs FAIL_MESSAGE VERSION_VAR) SET(multiValueArgs REQUIRED_VARS) SET(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) @@ -83,11 +136,11 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1) IF(${INDEX} EQUAL -1) SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) - SET(FPHSA_REQUIRED_VARS ${_VAR1} ${ARGN}) + SET(FPHSA_REQUIRED_VARS ${ARGN}) SET(FPHSA_VERSION_VAR) ELSE(${INDEX} EQUAL -1) - CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${_VAR1} ${ARGN}) + CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) IF(FPHSA_UNPARSED_ARGUMENTS) MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") @@ -104,6 +157,14 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1) SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG") + # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package() + # when it successfully found the config-file, including version checking: + IF(FPHSA_CONFIG_MODE) + LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) + LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) + SET(FPHSA_VERSION_VAR ${_NAME}_VERSION) + ENDIF(FPHSA_CONFIG_MODE) + IF(NOT FPHSA_REQUIRED_VARS) MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") ENDIF(NOT FPHSA_REQUIRED_VARS) @@ -111,8 +172,9 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1) LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) STRING(TOUPPER ${_NAME} _NAME_UPPER) + STRING(TOLOWER ${_NAME} _NAME_LOWER) - # collect all variables which were not found, so they can be printed, so the + # collect all variables which were not found, so they can be printed, so the # user knows better what went wrong (#6375) SET(MISSING_VARS "") SET(DETAILS "") @@ -131,44 +193,42 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1) # version handling: SET(VERSION_MSG "") SET(VERSION_OK TRUE) + SET(VERSION ${${FPHSA_VERSION_VAR}} ) IF (${_NAME}_FIND_VERSION) - # if the package was found, check for the version using <NAME>_FIND_VERSION - IF (${_NAME_UPPER}_FOUND) - SET(VERSION ${${FPHSA_VERSION_VAR}} ) - - IF(VERSION) - - IF(${_NAME}_FIND_VERSION_EXACT) # exact version required - IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") - SET(VERSION_MSG " Found version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - SET(VERSION_OK FALSE) - ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") - SET(VERSION_MSG " (found exact version \"${VERSION}\")") - ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") - - ELSE(${_NAME}_FIND_VERSION_EXACT) # minimum version specified: - IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") - SET(VERSION_MSG " Found version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") - SET(VERSION_OK FALSE) - ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") - SET(VERSION_MSG " (found version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")") - ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") - ENDIF(${_NAME}_FIND_VERSION_EXACT) - -# Uncomment the following two lines to see to which Find-modules the VERSION_VAR keywords still need to be added: -# ELSE(VERSION) -# SET(VERSION_MSG " (WARNING: Required version is \"${${_NAME}_FIND_VERSION}\", but version of ${_NAME} is unknown)") - ENDIF(VERSION) - - # if the package was not found, but a version was given, add that to the output: - ELSE (${_NAME_UPPER}_FOUND) + IF(VERSION) + + IF(${_NAME}_FIND_VERSION_EXACT) # exact version required + IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") + SET(VERSION_OK FALSE) + ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")") + ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + + ELSE(${_NAME}_FIND_VERSION_EXACT) # minimum version specified: + IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") + SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") + SET(VERSION_OK FALSE) + ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") + SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")") + ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") + ENDIF(${_NAME}_FIND_VERSION_EXACT) + + ELSE(VERSION) + + # if the package was not found, but a version was given, add that to the output: IF(${_NAME}_FIND_VERSION_EXACT) - SET(VERSION_MSG " (Required is exact version \"${${_NAME}_FIND_VERSION}\")") + SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") ELSE(${_NAME}_FIND_VERSION_EXACT) - SET(VERSION_MSG " (Required is at least version \"${${_NAME}_FIND_VERSION}\")") + SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") ENDIF(${_NAME}_FIND_VERSION_EXACT) - ENDIF (${_NAME_UPPER}_FOUND) + + ENDIF(VERSION) + ELSE (${_NAME}_FIND_VERSION) + IF(VERSION) + SET(VERSION_MSG "(found version \"${VERSION}\")") + ENDIF(VERSION) ENDIF (${_NAME}_FIND_VERSION) IF(VERSION_OK) @@ -182,26 +242,16 @@ FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG _VAR1) IF (${_NAME_UPPER}_FOUND) FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}") ELSE (${_NAME_UPPER}_FOUND) - IF(NOT VERSION_OK) - - IF (${_NAME}_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") - ELSE (${_NAME}_FIND_REQUIRED) - IF (NOT ${_NAME}_FIND_QUIETLY) - MESSAGE(STATUS "${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") - ENDIF (NOT ${_NAME}_FIND_QUIETLY) - ENDIF (${_NAME}_FIND_REQUIRED) - - ELSE(NOT VERSION_OK) - - IF (${_NAME}_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") - ELSE (${_NAME}_FIND_REQUIRED) - IF (NOT ${_NAME}_FIND_QUIETLY) - MESSAGE(STATUS "${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") - ENDIF (NOT ${_NAME}_FIND_QUIETLY) - ENDIF (${_NAME}_FIND_REQUIRED) - ENDIF(NOT VERSION_OK) + + IF(FPHSA_CONFIG_MODE) + _FPHSA_HANDLE_FAILURE_CONFIG_MODE() + ELSE(FPHSA_CONFIG_MODE) + IF(NOT VERSION_OK) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") + ELSE(NOT VERSION_OK) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") + ENDIF(NOT VERSION_OK) + ENDIF(FPHSA_CONFIG_MODE) ENDIF (${_NAME_UPPER}_FOUND) diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index c8bcad1..db0642e 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -235,4 +235,7 @@ SET(CMAKE_SYSTEM_APPBUNDLE_PATH /Developer/Applications) INCLUDE(Platform/UnixPaths) -LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /sw) +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH + /sw # Fink + /opt/local # MacPorts + ) diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake index f8893d8..9d357c9 100644 --- a/Modules/Platform/HP-UX.cmake +++ b/Modules/Platform/HP-UX.cmake @@ -1,3 +1,5 @@ +SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib) + SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so SET(CMAKE_DL_LIBS "dld") SET(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a") diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index ae3c187..5ee7ddb 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -51,7 +51,7 @@ LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /usr/X11R6/include /usr/include/X11 # Other - /opt/local/include /usr/pkg/include + /usr/pkg/include /opt/csw/include /opt/include /usr/openwin/include ) @@ -64,7 +64,7 @@ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /usr/X11R6/lib /usr/lib/X11 # Other - /opt/local/lib /usr/pkg/lib + /usr/pkg/lib /opt/csw/lib /opt/lib /usr/openwin/lib ) diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake index 7fc345f..e96ebb5 100644 --- a/Modules/Platform/Windows-wcl386.cmake +++ b/Modules/Platform/Windows-wcl386.cmake @@ -12,17 +12,29 @@ ELSE(CMAKE_VERBOSE_MAKEFILE) SET(CMAKE_LIB_QUIET "-q") ENDIF(CMAKE_VERBOSE_MAKEFILE) +set(CMAKE_CREATE_WIN32_EXE "system nt_win" ) +SET(CMAKE_CREATE_CONSOLE_EXE "system nt" ) + +SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "debug all" ) +SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "debug all" ) +SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" ) +SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" ) + +set (CMAKE_SHARED_LIBRARY_C_FLAGS "-bd" ) + +SET(CMAKE_RC_COMPILER "rc" ) + SET(CMAKE_BUILD_TYPE_INIT Debug) SET (CMAKE_CXX_FLAGS_INIT "-w=3 -xs") -SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-br -bm -d2") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-br -bm -d2") SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG") SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG") SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG") SET (CMAKE_C_FLAGS_INIT "-w=3 ") -SET (CMAKE_C_FLAGS_DEBUG_INIT "-br -bm -od") +SET (CMAKE_C_FLAGS_DEBUG_INIT "-br -bm -d2 -od") SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG") SET (CMAKE_C_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG") -SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-br -bm -ot -dNDEBUG") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG") SET (CMAKE_C_STANDARD_LIBRARIES_INIT "library clbrdll.lib library plbrdll.lib library kernel32.lib library user32.lib library gdi32.lib library winspool.lib library comdlg32.lib library advapi32.lib library shell32.lib library ole32.lib library oleaut32.lib library uuid.lib library odbc32.lib library odbccp32.lib") SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}") @@ -33,6 +45,7 @@ SET(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY}) SET(CMAKE_C_LINK_EXECUTABLE "wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name '<TARGET_UNQUOTED>' <LINK_FLAGS> option caseexact file {<OBJECTS>} <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") + SET(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE}) # compile a C++ file into an object file |