diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeSwiftInformation.cmake | 4 | ||||
-rw-r--r-- | Modules/CPack.cmake | 4 | ||||
-rw-r--r-- | Modules/FindBLAS.cmake | 18 | ||||
-rw-r--r-- | Modules/FindCUDAToolkit.cmake | 25 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 17 | ||||
-rw-r--r-- | Modules/Platform/AIX-GNU.cmake | 6 | ||||
-rw-r--r-- | Modules/Platform/AIX-XL.cmake | 6 | ||||
-rwxr-xr-x | Modules/Platform/AIX/ExportImportList | 37 | ||||
-rw-r--r-- | Modules/Platform/Android/Determine-Compiler-NDK.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/Windows-Clang-ASM.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 36 | ||||
-rw-r--r-- | Modules/Platform/Windows-GNU-ASM.cmake | 2 | ||||
-rw-r--r-- | Modules/Platform/WindowsPhone-Clang-ASM.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsPhone-GNU-ASM.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsStore-Clang-ASM.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsStore-GNU-ASM.cmake | 1 |
16 files changed, 112 insertions, 50 deletions
diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 672d3f8..848934c 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -17,6 +17,8 @@ if(CMAKE_Swift_COMPILER_ID) include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL) endif() +set(CMAKE_EXE_EXPORTS_Swift_FLAG "-emit-module -emit-module-path <SWIFT_MODULE> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS}") + set(CMAKE_INCLUDE_FLAG_Swift "-I ") if(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(CMAKE_SHARED_LIBRARY_SONAME_Swift_FLAG "-Xlinker -install_name -Xlinker ") @@ -81,7 +83,7 @@ if(NOT CMAKE_Swift_CREATE_SHARED_MODULE) endif() if(NOT CMAKE_Swift_LINK_EXECUTABLE) - set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -output-file-map <SWIFT_OUTPUT_FILE_MAP> -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-executable -o <TARGET> -emit-module -emit-module-path <SWIFT_MODULE> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} <LINK_LIBRARIES>") + set(CMAKE_Swift_LINK_EXECUTABLE "<CMAKE_Swift_COMPILER> -output-file-map <SWIFT_OUTPUT_FILE_MAP> -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-executable -o <TARGET> -emit-dependencies <DEFINES> <FLAGS> <INCLUDES> <SWIFT_SOURCES> <LINK_FLAGS> <LINK_LIBRARIES>") endif() if(NOT CMAKE_Swift_CREATE_STATIC_LIBRARY) diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index f6f6320..684edae 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -563,8 +563,8 @@ if(NOT CPACK_GENERATOR) if(APPLE) option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF) option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF) - option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF) - option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" OFF) + option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages (deprecated)" OFF) + option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages (deprecated)" OFF) option(CPACK_BINARY_PRODUCTBUILD "Enable to build productbuild packages" OFF) mark_as_advanced( CPACK_BINARY_BUNDLE diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index ed11364..9b6d09c 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -161,14 +161,15 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add set(${LIBRARIES}) set(_combined_name) + set(_extaddlibdir "${_addlibdir}") if(WIN32) - list(APPEND _addlibdir ENV LIB) + list(APPEND _extaddlibdir ENV LIB) elseif(APPLE) - list(APPEND _addlibdir ENV DYLD_LIBRARY_PATH) + list(APPEND _extaddlibdir ENV DYLD_LIBRARY_PATH) else() - list(APPEND _addlibdir ENV LD_LIBRARY_PATH) + list(APPEND _extaddlibdir ENV LD_LIBRARY_PATH) endif() - list(APPEND _addlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") foreach(_library ${_list}) if(_library MATCHES "^-Wl,--(start|end)-group$") @@ -182,7 +183,7 @@ macro(CHECK_BLAS_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _add if(_libraries_work) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS ${_addlibdir} + PATHS ${_extaddlibdir} PATH_SUFFIXES ${_subdirs} ) #message("DEBUG: find_library(${_library}) got ${${_prefix}_${_library}_LIBRARY}") @@ -448,6 +449,12 @@ if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") endif() if(DEFINED ENV{MKLROOT}) set(BLAS_mkl_MKLROOT "$ENV{MKLROOT}") + # If MKLROOT points to the subdirectory 'mkl', use the parent directory instead + # so we can better detect other relevant libraries in 'compiler' or 'tbb': + get_filename_component(BLAS_mkl_MKLROOT_LAST_DIR "${BLAS_mkl_MKLROOT}" NAME) + if(BLAS_mkl_MKLROOT_LAST_DIR STREQUAL "mkl") + get_filename_component(BLAS_mkl_MKLROOT "${BLAS_mkl_MKLROOT}" DIRECTORY) + endif() endif() set(BLAS_mkl_LIB_PATH_SUFFIXES "compiler/lib" "compiler/lib/${BLAS_mkl_ARCH_NAME}_${BLAS_mkl_OS_NAME}" @@ -478,6 +485,7 @@ if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") unset(BLAS_mkl_LM) unset(BLAS_mkl_LDL) unset(BLAS_mkl_MKLROOT) + unset(BLAS_mkl_MKLROOT_LAST_DIR) unset(BLAS_mkl_ARCH_NAME) unset(BLAS_mkl_OS_NAME) unset(BLAS_mkl_LIB_PATH_SUFFIXES) diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index 3edea05..62749ed 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -766,6 +766,31 @@ if(CUDAToolkit_FOUND) _CUDAToolkit_find_and_add_import_lib(cudart) _CUDAToolkit_find_and_add_import_lib(cudart_static) + # setup dependencies that are required for cudart_static when building + # on linux. These are generally only required when using the CUDA toolkit + # when CUDA language is disabled + if(NOT TARGET CUDA::cudart_static_deps + AND TARGET CUDA::cudart_static) + + add_library(CUDA::cudart_static_deps IMPORTED INTERFACE) + target_link_libraries(CUDA::cudart_static INTERFACE CUDA::cudart_static_deps) + + if(UNIX AND (CMAKE_C_COMPILER OR CMAKE_CXX_COMPILER)) + find_package(Threads REQUIRED) + target_link_libraries(CUDA::cudart_static_deps INTERFACE Threads::Threads ${CMAKE_DL_LIBS}) + endif() + + if(UNIX AND NOT APPLE) + # On Linux, you must link against librt when using the static cuda runtime. + find_library(CUDAToolkit_rt_LIBRARY rt) + if(NOT CUDAToolkit_rt_LIBRARY) + message(WARNING "Could not find librt library, needed by CUDA::cudart_static") + else() + target_link_libraries(CUDA::cudart_static_deps INTERFACE ${CUDAToolkit_rt_LIBRARY}) + endif() + endif() + endif() + _CUDAToolkit_find_and_add_import_lib(culibos) # it's a static library foreach (cuda_lib cublas cufft curand cusparse nppc nvjpeg) _CUDAToolkit_find_and_add_import_lib(${cuda_lib}) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 8ade0b1..c962976 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -131,14 +131,15 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a set(${LIBRARIES}) set(_combined_name) + set(_extaddlibdir "${_addlibdir}") if(WIN32) - list(APPEND _addlibdir ENV LIB) + list(APPEND _extaddlibdir ENV LIB) elseif(APPLE) - list(APPEND _addlibdir ENV DYLD_LIBRARY_PATH) + list(APPEND _extaddlibdir ENV DYLD_LIBRARY_PATH) else() - list(APPEND _addlibdir ENV LD_LIBRARY_PATH) + list(APPEND _extaddlibdir ENV LD_LIBRARY_PATH) endif() - list(APPEND _addlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") foreach(_library ${_list}) if(_library MATCHES "^-Wl,--(start|end)-group$") @@ -149,7 +150,7 @@ macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _a if(_libraries_work) find_library(${_prefix}_${_library}_LIBRARY NAMES ${_library} - PATHS ${_addlibdir} + PATHS ${_extaddlibdir} PATH_SUFFIXES ${_subdirs} ) #message("DEBUG: find_library(${_library}) got ${${_prefix}_${_library}_LIBRARY}") @@ -267,6 +268,12 @@ if(BLAS_FOUND) endif() if(DEFINED ENV{MKLROOT}) set(LAPACK_mkl_MKLROOT "$ENV{MKLROOT}") + # If MKLROOT points to the subdirectory 'mkl', use the parent directory instead + # so we can better detect other relevant libraries in 'compiler' or 'tbb': + get_filename_component(LAPACK_mkl_MKLROOT_LAST_DIR "${LAPACK_mkl_MKLROOT}" NAME) + if(LAPACK_mkl_MKLROOT_LAST_DIR STREQUAL "mkl") + get_filename_component(LAPACK_mkl_MKLROOT "${LAPACK_mkl_MKLROOT}" DIRECTORY) + endif() endif() set(LAPACK_mkl_LIB_PATH_SUFFIXES "compiler/lib" "compiler/lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}" diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index 61d213a..5a532c7 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -23,11 +23,11 @@ macro(__aix_compiler_gnu lang) # Construct the export list ourselves to pass only the object files so # that we export only the symbols actually provided by the sources. set(CMAKE_${lang}_CREATE_SHARED_LIBRARY - "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <OBJECT_DIR>/objects.exp <OBJECTS>" - "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" + "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <OBJECT_DIR>/exports.exp <AIX_EXPORTS> <OBJECTS>" + "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/exports.exp <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" ) set(CMAKE_${lang}_LINK_EXECUTABLE_WITH_EXPORTS - "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <TARGET_IMPLIB> -l . <OBJECTS>" + "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <TARGET_IMPLIB> -l . <AIX_EXPORTS> <OBJECTS>" "<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> -Wl,-bE:<TARGET_IMPLIB> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") endmacro() diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake index 2a67c4f..2a8c159 100644 --- a/Modules/Platform/AIX-XL.cmake +++ b/Modules/Platform/AIX-XL.cmake @@ -29,12 +29,12 @@ macro(__aix_compiler_xl lang) # Construct the export list ourselves to pass only the object files so # that we export only the symbols actually provided by the sources. set(CMAKE_${lang}_CREATE_SHARED_LIBRARY - "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <OBJECT_DIR>/objects.exp${_OBJECTS}" - "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" + "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <OBJECT_DIR>/exports.exp <AIX_EXPORTS>${_OBJECTS}" + "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/exports.exp <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" ) set(CMAKE_${lang}_LINK_EXECUTABLE_WITH_EXPORTS - "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <TARGET_IMPLIB> -l . <OBJECTS>" + "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o <TARGET_IMPLIB> -l . <AIX_EXPORTS> <OBJECTS>" "<CMAKE_${lang}_COMPILER> <FLAGS> <CMAKE_${lang}_LINK_FLAGS> -Wl,-bE:<TARGET_IMPLIB> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") unset(_OBJECTS) diff --git a/Modules/Platform/AIX/ExportImportList b/Modules/Platform/AIX/ExportImportList index 4f67ef5..891bce7 100755 --- a/Modules/Platform/AIX/ExportImportList +++ b/Modules/Platform/AIX/ExportImportList @@ -5,7 +5,7 @@ # This script is internal to CMake and meant only to be # invoked by CMake-generated build systems on AIX. -usage='usage: ExportImportList -o <out-file> [-l <lib>] [--] <objects>...' +usage='usage: ExportImportList -o <out-file> [-l <lib>] [-n] [--] <objects>...' die() { echo "$@" 1>&2; exit 1 @@ -14,10 +14,12 @@ die() { # Process command-line arguments. out='' lib='' +no_objects='' while test "$#" != 0; do case "$1" in -l) shift; lib="$1" ;; -o) shift; out="$1" ;; + -n) no_objects='1' ;; --) shift; break ;; -*) die "$usage" ;; *) break ;; @@ -26,23 +28,28 @@ while test "$#" != 0; do done test -n "$out" || die "$usage" -# Collect symbols exported from all object files. +# Build a temporary file that atomically replaces the output later. out_tmp="$out.tmp$$" trap 'rm -f "$out_tmp"' EXIT INT TERM -for f in "$@"; do - dump -tov -X 32_64 "$f" | - awk ' - BEGIN { - V["EXPORTED"]=" export" - V["PROTECTED"]=" protected" - } - /^\[[0-9]+\]\tm +[^ ]+ +\.(text|data|bss) +[^ ]+ +(extern|weak) +(EXPORTED|PROTECTED| ) / { - if (!match($NF,/^(\.|__sinit|__sterm|__[0-9]+__)/)) { - print $NF V[$(NF-1)] +> "$out_tmp" + +# Collect symbols exported from all object files. +if test -z "$no_objects"; then + for f in "$@"; do + dump -tov -X 32_64 "$f" | + awk ' + BEGIN { + V["EXPORTED"]=" export" + V["PROTECTED"]=" protected" + } + /^\[[0-9]+\]\tm +[^ ]+ +\.(text|data|bss) +[^ ]+ +(extern|weak) +(EXPORTED|PROTECTED| ) / { + if (!match($NF,/^(\.|__sinit|__sterm|__[0-9]+__)/)) { + print $NF V[$(NF-1)] + } } - } - ' -done > "$out_tmp" + ' + done >> "$out_tmp" +fi # Generate the export/import file. { diff --git a/Modules/Platform/Android/Determine-Compiler-NDK.cmake b/Modules/Platform/Android/Determine-Compiler-NDK.cmake index e009c10..f56e1d5 100644 --- a/Modules/Platform/Android/Determine-Compiler-NDK.cmake +++ b/Modules/Platform/Android/Determine-Compiler-NDK.cmake @@ -23,6 +23,7 @@ if(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED) set(_ANDROID_TOOL_CXX_COMPILER_EXTERNAL_TOOLCHAIN "") set(_ANDROID_TOOL_CXX_TOOLCHAIN_PREFIX "${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}/bin/${CMAKE_ANDROID_ARCH_TRIPLE}-") set(_ANDROID_TOOL_CXX_TOOLCHAIN_SUFFIX "${_ANDROID_HOST_EXT}") + set(_CMAKE_TOOLCHAIN_PREFIX "${CMAKE_ANDROID_ARCH_TRIPLE}-") return() endif() diff --git a/Modules/Platform/Windows-Clang-ASM.cmake b/Modules/Platform/Windows-Clang-ASM.cmake new file mode 100644 index 0000000..345d77d --- /dev/null +++ b/Modules/Platform/Windows-Clang-ASM.cmake @@ -0,0 +1,2 @@ +include(Platform/Windows-Clang) +__windows_compiler_clang(ASM) diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index c17cf6d..5eddd04 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -21,7 +21,9 @@ macro(__windows_compiler_clang_gnu lang) set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") set(CMAKE_SHARED_MODULE_SUFFIX ".dll") set(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") - set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <OBJECT> -MF <DEPFILE>") + if(NOT "${lang}" STREQUAL "ASM") + set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <OBJECT> -MF <DEPFILE>") + endif() set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a" ".lib") @@ -61,23 +63,25 @@ macro(__windows_compiler_clang_gnu lang) set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_${lang}_COMPILER> -fuse-ld=lld-link -nostartfiles -nostdlib <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Xlinker /implib:<TARGET_IMPLIB> -Xlinker /pdb:<TARGET_PDB> -Xlinker /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>") - set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmt) - set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL -D_DLL -D_MT -Xclang --dependent-lib=msvcrt) - set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug -D_DEBUG -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmtd) - set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd) + if(NOT "${lang}" STREQUAL "ASM") + set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmt) + set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL -D_DLL -D_MT -Xclang --dependent-lib=msvcrt) + set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug -D_DEBUG -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmtd) + set(CMAKE_${lang}_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd) - if(CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT) - set(__ADDED_FLAGS "") - set(__ADDED_FLAGS_DEBUG "") - else() - set(__ADDED_FLAGS_DEBUG "-D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd") - set(__ADDED_FLAGS "-D_DLL -D_MT -Xclang --dependent-lib=msvcrt") - endif() + if(CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT) + set(__ADDED_FLAGS "") + set(__ADDED_FLAGS_DEBUG "") + else() + set(__ADDED_FLAGS_DEBUG "-D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd") + set(__ADDED_FLAGS "-D_DLL -D_MT -Xclang --dependent-lib=msvcrt") + endif() - string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -Xclang -gcodeview -O0 ${__ADDED_FLAGS_DEBUG}") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG ${__ADDED_FLAGS}") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG ${__ADDED_FLAGS}") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG -Xclang -gcodeview ${__ADDED_FLAGS}") + string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g -Xclang -gcodeview -O0 ${__ADDED_FLAGS_DEBUG}") + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG ${__ADDED_FLAGS}") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG ${__ADDED_FLAGS}") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG -Xclang -gcodeview ${__ADDED_FLAGS}") + endif() set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") set(CMAKE_PCH_EXTENSION .pch) diff --git a/Modules/Platform/Windows-GNU-ASM.cmake b/Modules/Platform/Windows-GNU-ASM.cmake new file mode 100644 index 0000000..8600892 --- /dev/null +++ b/Modules/Platform/Windows-GNU-ASM.cmake @@ -0,0 +1,2 @@ +include(Platform/Windows-GNU) +__windows_compiler_gnu(ASM) diff --git a/Modules/Platform/WindowsPhone-Clang-ASM.cmake b/Modules/Platform/WindowsPhone-Clang-ASM.cmake new file mode 100644 index 0000000..94f4ca7 --- /dev/null +++ b/Modules/Platform/WindowsPhone-Clang-ASM.cmake @@ -0,0 +1 @@ +include(Platform/Windows-Clang-ASM) diff --git a/Modules/Platform/WindowsPhone-GNU-ASM.cmake b/Modules/Platform/WindowsPhone-GNU-ASM.cmake new file mode 100644 index 0000000..140eea7 --- /dev/null +++ b/Modules/Platform/WindowsPhone-GNU-ASM.cmake @@ -0,0 +1 @@ +include(Platform/Windows-GNU-ASM) diff --git a/Modules/Platform/WindowsStore-Clang-ASM.cmake b/Modules/Platform/WindowsStore-Clang-ASM.cmake new file mode 100644 index 0000000..94f4ca7 --- /dev/null +++ b/Modules/Platform/WindowsStore-Clang-ASM.cmake @@ -0,0 +1 @@ +include(Platform/Windows-Clang-ASM) diff --git a/Modules/Platform/WindowsStore-GNU-ASM.cmake b/Modules/Platform/WindowsStore-GNU-ASM.cmake new file mode 100644 index 0000000..140eea7 --- /dev/null +++ b/Modules/Platform/WindowsStore-GNU-ASM.cmake @@ -0,0 +1 @@ +include(Platform/Windows-GNU-ASM) |