diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CTest.cmake | 9 | ||||
-rw-r--r-- | Modules/CheckLanguage.cmake | 6 | ||||
-rw-r--r-- | Modules/ExternalData.cmake | 40 | ||||
-rw-r--r-- | Modules/FindBoost.cmake | 10 | ||||
-rw-r--r-- | Modules/FindGTest.cmake | 93 | ||||
-rw-r--r-- | Modules/FindIntl.cmake | 44 | ||||
-rw-r--r-- | Modules/Internal/CPack/NSIS.template.in | 2 | ||||
-rw-r--r-- | Modules/Platform/Android.cmake | 74 | ||||
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 4 |
9 files changed, 235 insertions, 47 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 8109108..ca9fcf5 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -194,7 +194,14 @@ if(BUILD_TESTING) "Extra command line flags to pass to the coverage tool") # set the site name - site_name(SITE) + if(COMMAND cmake_host_system_information) + cmake_host_system_information(RESULT _ctest_hostname QUERY HOSTNAME) + set(SITE "${_ctest_hostname}" CACHE STRING "Name of the computer/site where compile is being run") + unset(_ctest_hostname) + else() + # This code path is needed for CMake itself during bootstrap. + site_name(SITE) + endif() # set the build name if(NOT BUILDNAME) set(DART_COMPILER "${CMAKE_CXX_COMPILER}") diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake index 44387d4..928881c 100644 --- a/Modules/CheckLanguage.cmake +++ b/Modules/CheckLanguage.cmake @@ -68,6 +68,11 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" else() set(_D_CMAKE_MAKE_PROGRAM "-DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_MAKE_PROGRAM}") endif() + if(CMAKE_TOOLCHAIN_FILE) + set(_D_CMAKE_TOOLCHAIN_FILE "-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE}") + else() + set(_D_CMAKE_TOOLCHAIN_FILE "") + endif() execute_process( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang} COMMAND ${CMAKE_COMMAND} . -G ${CMAKE_GENERATOR} @@ -75,6 +80,7 @@ file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\" -T "${CMAKE_GENERATOR_TOOLSET}" ${_D_CMAKE_GENERATOR_INSTANCE} ${_D_CMAKE_MAKE_PROGRAM} + ${_D_CMAKE_TOOLCHAIN_FILE} OUTPUT_VARIABLE _cl_output ERROR_VARIABLE _cl_output RESULT_VARIABLE _cl_result diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake index 6fe8685..294167c 100644 --- a/Modules/ExternalData.cmake +++ b/Modules/ExternalData.cmake @@ -78,7 +78,8 @@ Module Functions manage local instances of data files stored externally:: ExternalData_Add_Target( - <target> # Name of data management target + <target> # Name of data management target + [SHOW_PROGRESS <ON|OFF>] # Show progress during the download ) It creates custom commands in the target as necessary to make data @@ -89,6 +90,11 @@ Module Functions in one of the paths specified in the ``ExternalData_OBJECT_STORES`` variable. + The ``SHOW_PROGRESS`` argument may be passed to suppress progress information + during the download of objects. If not provided, it defaults to ``OFF`` for + :generator:`Ninja` and :generator:`Ninja Multi-Config` generators and ``ON`` + otherwise. + Typically only one target is needed to manage all external data within a project. Call this function once at the end of configuration after all data references have been processed. @@ -344,6 +350,30 @@ function(ExternalData_add_target target) endif() set(_ExternalData_CONFIG_CODE "") + cmake_parse_arguments(PARSE_ARGV 1 _ExternalData_add_target + "" + "SHOW_PROGRESS" + "") + if (_ExternalData_add_target_UNPARSED_ARGUMENTS) + message(AUTHOR_WARNING + "Ignoring unrecognized arguments passed to ExternalData_add_target: " + "`${_ExternalData_add_target_UNPARSED_ARGUMENTS}`") + endif () + + # Turn `SHOW_PROGRESS` into a boolean + if (NOT DEFINED _ExternalData_add_target_SHOW_PROGRESS) + # The default setting + if (CMAKE_GENERATOR MATCHES "Ninja") + set(_ExternalData_add_target_SHOW_PROGRESS OFF) + else () + set(_ExternalData_add_target_SHOW_PROGRESS ON) + endif () + elseif (_ExternalData_add_target_SHOW_PROGRESS) + set(_ExternalData_add_target_SHOW_PROGRESS ON) + else () + set(_ExternalData_add_target_SHOW_PROGRESS OFF) + endif () + # Store custom script configuration. foreach(url_template IN LISTS ExternalData_URL_TEMPLATES) if("${url_template}" MATCHES "^ExternalDataCustomScript://([^/]*)/(.*)$") @@ -423,6 +453,7 @@ function(ExternalData_add_target target) COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} -Dfile=${file} -Dname=${name} -DExternalData_ACTION=local + -DExternalData_SHOW_PROGRESS=${_ExternalData_add_target_SHOW_PROGRESS} -DExternalData_CONFIG=${config} -P ${_ExternalData_SELF} MAIN_DEPENDENCY "${name}" @@ -459,6 +490,7 @@ function(ExternalData_add_target target) COMMAND ${CMAKE_COMMAND} -Drelative_top=${CMAKE_BINARY_DIR} -Dfile=${file} -Dname=${name} -Dexts=${exts} -DExternalData_ACTION=fetch + -DExternalData_SHOW_PROGRESS=${_ExternalData_add_target_SHOW_PROGRESS} -DExternalData_CONFIG=${config} -P ${_ExternalData_SELF} # Update whenever the object hash changes. @@ -925,7 +957,11 @@ function(_ExternalData_download_file url file err_var msg_var) else() set(absolute_timeout "") endif() - file(DOWNLOAD "${url}" "${file}" STATUS status LOG log ${inactivity_timeout} ${absolute_timeout} SHOW_PROGRESS) + set(show_progress_args) + if (ExternalData_SHOW_PROGRESS) + list(APPEND show_progress_args SHOW_PROGRESS) + endif () + file(DOWNLOAD "${url}" "${file}" STATUS status LOG log ${inactivity_timeout} ${absolute_timeout} ${show_progress_args}) list(GET status 0 err) list(GET status 1 msg) if(err) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 77868f4..00e4ff1 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -450,13 +450,19 @@ if (NOT Boost_NO_BOOST_CMAKE) # Do the same find_package call but look specifically for the CMake version. # Note that args are passed in the Boost_FIND_xxxxx variables, so there is no # need to delegate them to this find_package call. - cmake_policy(PUSH) if(BOOST_ROOT AND NOT Boost_ROOT) + # Honor BOOST_ROOT by setting Boost_ROOT with CMP0074 NEW behavior. + cmake_policy(PUSH) cmake_policy(SET CMP0074 NEW) set(Boost_ROOT "${BOOST_ROOT}") + set(_Boost_ROOT_FOR_CONFIG 1) endif() find_package(Boost QUIET NO_MODULE ${_boost_FIND_PACKAGE_ARGS}) - cmake_policy(POP) + if(_Boost_ROOT_FOR_CONFIG) + unset(_Boost_ROOT_FOR_CONFIG) + unset(Boost_ROOT) + cmake_policy(POP) + endif() if (DEFINED Boost_DIR) mark_as_advanced(Boost_DIR) endif () diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index 10e31b2..ff50869 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -12,6 +12,15 @@ Imported targets This module defines the following :prop_tgt:`IMPORTED` targets: +``GTest::gtest`` + The Google Test ``gtest`` library, if found; adds Thread::Thread + automatically +``GTest::gtest_main`` + The Google Test ``gtest_main`` library, if found + +For backwards compatibility, this module defines additionally the +following deprecated :prop_tgt:`IMPORTED` targets: + ``GTest::GTest`` The Google Test ``gtest`` library, if found; adds Thread::Thread automatically @@ -24,7 +33,7 @@ Result variables This module will set the following variables in your project: -``GTEST_FOUND`` +``GTest_FOUND`` Found the Google Testing framework ``GTEST_INCLUDE_DIRS`` the directory containing the Google Test headers @@ -62,7 +71,7 @@ Example usage find_package(GTest REQUIRED) add_executable(foo foo.cc) - target_link_libraries(foo GTest::GTest GTest::Main) + target_link_libraries(foo GTest::gtest GTest::gtest_main) add_test(AllTestsInFoo foo) @@ -167,8 +176,41 @@ function(__gtest_import_library _target _var _config) endif() endfunction() +function(__gtest_define_backwards_compatible_library_targets) + set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} PARENT_SCOPE) + + # Add targets mapping the same library names as defined in + # older versions of CMake's FindGTest + if(NOT TARGET GTest::GTest) + add_library(GTest::GTest INTERFACE IMPORTED) + target_link_libraries(GTest::GTest INTERFACE GTest::gtest) + endif() + if(NOT TARGET GTest::Main) + add_library(GTest::Main INTERFACE IMPORTED) + target_link_libraries(GTest::Main INTERFACE GTest::gtest_main) + endif() +endfunction() + # +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + +# first specifically look for the CMake version of GTest +find_package(GTest QUIET NO_MODULE) + +# if we found the GTest cmake package then we are done, and +# can print what we found and return. +if(GTest_FOUND) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest HANDLE_COMPONENTS CONFIG_MODE) + + set(GTEST_LIBRARIES GTest::gtest) + set(GTEST_MAIN_LIBRARIES GTest::gtest_main) + + __gtest_define_backwards_compatible_library_targets() + + return() +endif() + if(NOT DEFINED GTEST_MSVC_SEARCH) set(GTEST_MSVC_SEARCH MD) endif() @@ -208,8 +250,6 @@ find_path(GTEST_INCLUDE_DIR gtest/gtest.h ) mark_as_advanced(GTEST_INCLUDE_DIR) -# Allow GTEST_LIBRARY and GTEST_MAIN_LIBRARY to be set manually, as the -# locations of the gtest and gtest_main libraries, respectively. if(NOT GTEST_LIBRARY) __gtest_find_and_select_library_configurations(GTEST gtest) endif() @@ -217,54 +257,43 @@ if(NOT GTEST_MAIN_LIBRARY) __gtest_find_and_select_library_configurations(GTEST_MAIN gtest_main) endif() -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTest DEFAULT_MSG GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) -if(GTEST_FOUND) +if(GTest_FOUND) set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR}) __gtest_append_debugs(GTEST_LIBRARIES GTEST_LIBRARY) __gtest_append_debugs(GTEST_MAIN_LIBRARIES GTEST_MAIN_LIBRARY) - set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES}) find_package(Threads QUIET) - if(NOT TARGET GTest::GTest) + if(NOT TARGET GTest::gtest) __gtest_determine_library_type(GTEST_LIBRARY) - add_library(GTest::GTest ${GTEST_LIBRARY_TYPE} IMPORTED) + add_library(GTest::gtest ${GTEST_LIBRARY_TYPE} IMPORTED) if(TARGET Threads::Threads) - set_target_properties(GTest::GTest PROPERTIES + set_target_properties(GTest::gtest PROPERTIES INTERFACE_LINK_LIBRARIES Threads::Threads) endif() if(GTEST_LIBRARY_TYPE STREQUAL "SHARED") - set_target_properties(GTest::GTest PROPERTIES + set_target_properties(GTest::gtest PROPERTIES INTERFACE_COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1") endif() if(GTEST_INCLUDE_DIRS) - set_target_properties(GTest::GTest PROPERTIES + set_target_properties(GTest::gtest PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIRS}") endif() - __gtest_import_library(GTest::GTest GTEST_LIBRARY "") - __gtest_import_library(GTest::GTest GTEST_LIBRARY "RELEASE") - __gtest_import_library(GTest::GTest GTEST_LIBRARY "DEBUG") + __gtest_import_library(GTest::gtest GTEST_LIBRARY "") + __gtest_import_library(GTest::gtest GTEST_LIBRARY "RELEASE") + __gtest_import_library(GTest::gtest GTEST_LIBRARY "DEBUG") endif() - if(NOT TARGET GTest::Main) + if(NOT TARGET GTest::gtest_main) __gtest_determine_library_type(GTEST_MAIN_LIBRARY) - add_library(GTest::Main ${GTEST_MAIN_LIBRARY_TYPE} IMPORTED) - set_target_properties(GTest::Main PROPERTIES - INTERFACE_LINK_LIBRARIES "GTest::GTest") - __gtest_import_library(GTest::Main GTEST_MAIN_LIBRARY "") - __gtest_import_library(GTest::Main GTEST_MAIN_LIBRARY "RELEASE") - __gtest_import_library(GTest::Main GTEST_MAIN_LIBRARY "DEBUG") + add_library(GTest::gtest_main ${GTEST_MAIN_LIBRARY_TYPE} IMPORTED) + set_target_properties(GTest::gtest_main PROPERTIES + INTERFACE_LINK_LIBRARIES "GTest::gtest") + __gtest_import_library(GTest::gtest_main GTEST_MAIN_LIBRARY "") + __gtest_import_library(GTest::gtest_main GTEST_MAIN_LIBRARY "RELEASE") + __gtest_import_library(GTest::gtest_main GTEST_MAIN_LIBRARY "DEBUG") endif() - # Add targets mapping the same library names as defined in - # GTest's CMake package config. - if(NOT TARGET GTest::gtest) - add_library(GTest::gtest INTERFACE IMPORTED) - target_link_libraries(GTest::gtest INTERFACE GTest::GTest) - endif() - if(NOT TARGET GTest::gtest_main) - add_library(GTest::gtest_main INTERFACE IMPORTED) - target_link_libraries(GTest::gtest_main INTERFACE GTest::Main) - endif() + __gtest_define_backwards_compatible_library_targets() endif() diff --git a/Modules/FindIntl.cmake b/Modules/FindIntl.cmake index 1a09a60..d29f554 100644 --- a/Modules/FindIntl.cmake +++ b/Modules/FindIntl.cmake @@ -15,11 +15,16 @@ installation in several variables. General variables:: Intl_FOUND - true if the libintl headers and libraries were found Intl_INCLUDE_DIRS - the directory containing the libintl headers Intl_LIBRARIES - libintl libraries to be linked + Intl::Intl - imported target for Intl The following cache variables may also be set:: Intl_INCLUDE_DIR - the directory containing the libintl headers Intl_LIBRARY - the libintl library (if any) + Intl_HAVE_GETTEXT_BUILTIN - check if gettext is in the C library + Intl_HAVE_DCGETTEXT_BUILTIN - check if dcgettext is in the C library + Intl_IS_BUILTIN - whether intl is a part of the C library determined + from the result of Intl_HAVE_GETTEXT_BUILTIN and Intl_HAVE_DCGETTEXT_BUILTIN .. note:: On some platforms, such as Linux with GNU libc, the gettext @@ -35,6 +40,22 @@ The following cache variables may also be set:: # Written by Roger Leigh <rleigh@codelibre.net> +include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/CheckSymbolExists.cmake) + +# Check if we have libintl is a part of libc +cmake_push_check_state(RESET) +set(CMAKE_REQUIRED_QUIET TRUE) +check_symbol_exists(gettext libintl.h Intl_HAVE_GETTEXT_BUILTIN) +check_symbol_exists(dcgettext libintl.h Intl_HAVE_DCGETTEXT_BUILTIN) # redundant check +cmake_pop_check_state() + +if(Intl_HAVE_GETTEXT_BUILTIN AND Intl_HAVE_DCGETTEXT_BUILTIN) + set(Intl_IS_BUILTIN TRUE) +else() + set(Intl_IS_BUILTIN FALSE) +endif() + # Find include directory find_path(Intl_INCLUDE_DIR NAMES "libintl.h" @@ -42,21 +63,28 @@ find_path(Intl_INCLUDE_DIR mark_as_advanced(Intl_INCLUDE_DIR) # Find all Intl libraries -find_library(Intl_LIBRARY "intl" NAMES_PER_DIR - DOC "libintl libraries (if not in the C library)") -mark_as_advanced(Intl_LIBRARY) +set(Intl_REQUIRED_VARS) +if(NOT Intl_IS_BUILTIN) + find_library(Intl_LIBRARY "intl" "libintl" NAMES_PER_DIR + DOC "libintl libraries (if not in the C library)") + mark_as_advanced(Intl_LIBRARY) + list(APPEND Intl_REQUIRED_VARS Intl_LIBRARY) +endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Intl FOUND_VAR Intl_FOUND - REQUIRED_VARS Intl_INCLUDE_DIR + REQUIRED_VARS Intl_INCLUDE_DIR ${Intl_REQUIRED_VARS} FAIL_MESSAGE "Failed to find Gettext libintl") +unset(Intl_REQUIRED_VARS) if(Intl_FOUND) set(Intl_INCLUDE_DIRS "${Intl_INCLUDE_DIR}") - if(Intl_LIBRARY) - set(Intl_LIBRARIES "${Intl_LIBRARY}") - else() - unset(Intl_LIBRARIES) + set(Intl_LIBRARIES "${Intl_LIBRARY}") + if(NOT TARGET Intl::Intl) + add_library(Intl::Intl INTERFACE IMPORTED) + set_target_properties(Intl::Intl PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${Intl_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${Intl_LIBRARIES}") endif() endif() diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in index 6009ce0..b448c76 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -1,4 +1,4 @@ -; CPack install script designed for a nmake build +; CPack install script designed for a nmake build ;-------------------------------- ; You must define these values diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake index 8ffa1b2..80d81aa 100644 --- a/Modules/Platform/Android.cmake +++ b/Modules/Platform/Android.cmake @@ -22,3 +22,77 @@ set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") set(CMAKE_LINK_LIBRARY_FLAG "") endif() + +# Commonly used Android toolchain files that pre-date CMake upstream support +# set CMAKE_SYSTEM_VERSION to 1. Avoid interfering with them. +if(CMAKE_SYSTEM_VERSION EQUAL 1) + return() +endif() + +if(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED) + # Tell CMake not to search host sysroots for headers/libraries. + # CMAKE_FIND_ROOT_PATH must be non-empty for CMAKE_FIND_ROOT_PATH_MODE_* == ONLY + # to be meaningful. The actual path used here is fairly meaningless since CMake + # doesn't handle the NDK sysroot layout (per-arch and per-verion subdirectories for + # libraries), so find_library is handled separately by CMAKE_SYSTEM_LIBRARY_PATH. + # https://github.com/android-ndk/ndk/issues/890 + if(NOT CMAKE_FIND_ROOT_PATH) + list(APPEND CMAKE_FIND_ROOT_PATH "${CMAKE_ANDROID_NDK}") + endif() + + # Allow users to override these values in case they want more strict behaviors. + # For example, they may want to prevent the NDK's libz from being picked up so + # they can use their own. + # https://github.com/android-ndk/ndk/issues/517 + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + endif() + + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + endif() + + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + endif() + + if(NOT DEFINED CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + endif() + + # find_library's default search paths below a prefix do not match the Android + # sysroot layout, so we need to give the direct path to the libraries + # via CMAKE_SYSTEM_*_PATH. + # + # Ideally we'd set CMAKE_SYSTEM_PREFIX_PATH. But that causes the + # non-api-level-specific path to be searched first for find_library, which will + # cause libdl.a to be found before libdl.so. + # https://github.com/android/ndk/issues/929 + + # Clears the paths set by UnixPaths.cmake. + set(CMAKE_SYSTEM_PREFIX_PATH) + set(CMAKE_SYSTEM_INCLUDE_PATH) + set(CMAKE_SYSTEM_LIBRARY_PATH) + + # Don't search paths in PATH environment variable. + if(NOT DEFINED CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH) + set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF) + endif() + + # Allows CMake to find headers in the architecture-specific include directories. + set(CMAKE_LIBRARY_ARCHITECTURE "${CMAKE_ANDROID_ARCH_TRIPLE}") + + set(_ANDROID_SYSROOT_PREFIX "${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}/sysroot/usr") + + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH + "${_ANDROID_SYSROOT_PREFIX}/include/${CMAKE_LIBRARY_ARCHITECTURE}") + list(APPEND CMAKE_SYSTEM_INCLUDE_PATH "${_ANDROID_SYSROOT_PREFIX}/include") + + # Instructs CMake to search the correct API level for libraries. + list(APPEND CMAKE_SYSTEM_LIBRARY_PATH + "${_ANDROID_SYSROOT_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_SYSTEM_VERSION}") + list(APPEND CMAKE_SYSTEM_LIBRARY_PATH + "${_ANDROID_SYSROOT_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}") + + list(APPEND CMAKE_SYSTEM_PROGRAM_PATH "${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}/bin") +endif() diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index 2261c90..6275043 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -112,7 +112,9 @@ macro(__enable_llvm_rc_preprocessing clang_option_prefix) endif() if(DEFINED CMAKE_RC_PREPROCESSOR) set(CMAKE_DEPFILE_FLAGS_RC "${clang_option_prefix}-MD ${clang_option_prefix}-MF ${clang_option_prefix}<DEPFILE>") - set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_COMMAND> -E cmake_llvm_rc <SOURCE> <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -E -- <SOURCE> ++ <CMAKE_RC_COMPILER> <DEFINES> -I <SOURCE_DIR> <INCLUDES> /fo <OBJECT> <OBJECT>.pp") + # The <FLAGS> are passed to the preprocess and the resource compiler to pick + # up the eventual -D / -C options passed through the CMAKE_RC_FLAGS. + set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_COMMAND> -E cmake_llvm_rc <SOURCE> <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -E -- <SOURCE> ++ <CMAKE_RC_COMPILER> <DEFINES> -I <SOURCE_DIR> <INCLUDES> <FLAGS> /fo <OBJECT> <OBJECT>.pp") if(CMAKE_GENERATOR MATCHES "Ninja") set(CMAKE_NINJA_CMCLDEPS_RC 0) set(CMAKE_NINJA_DEP_TYPE_RC gcc) |