Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 1 | include(AddLLVM) |
Alexey Samsonov | 2e8e441 | 2014-05-09 22:11:03 +0000 | [diff] [blame] | 2 | include(ExternalProject) |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 3 | include(LLVMParseArguments) |
Alexey Samsonov | 392c50d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 4 | include(CompilerRTUtils) |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 5 | |
Alexey Samsonov | 392c50d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 6 | # Tries to add "object library" target for a given architecture |
| 7 | # with name "<name>.<arch>" if architecture can be targeted. |
| 8 | # add_compiler_rt_object_library(<name> <arch> |
| 9 | # SOURCES <source files> |
Alexey Samsonov | 05fa380 | 2013-09-16 15:50:53 +0000 | [diff] [blame] | 10 | # CFLAGS <compile flags> |
| 11 | # DEFS <compile definitions>) |
Alexey Samsonov | 392c50d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 12 | macro(add_compiler_rt_object_library name arch) |
| 13 | if(CAN_TARGET_${arch}) |
Alexey Samsonov | 05fa380 | 2013-09-16 15:50:53 +0000 | [diff] [blame] | 14 | parse_arguments(LIB "SOURCES;CFLAGS;DEFS" "" ${ARGN}) |
Alexey Samsonov | 392c50d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 15 | add_library(${name}.${arch} OBJECT ${LIB_SOURCES}) |
| 16 | set_target_compile_flags(${name}.${arch} |
Chandler Carruth | e7ad96d | 2014-05-15 15:21:11 +0000 | [diff] [blame] | 17 | ${CMAKE_CXX_FLAGS} ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) |
Alexey Samsonov | 05fa380 | 2013-09-16 15:50:53 +0000 | [diff] [blame] | 18 | set_property(TARGET ${name}.${arch} APPEND PROPERTY |
| 19 | COMPILE_DEFINITIONS ${LIB_DEFS}) |
Alexey Samsonov | 392c50d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 20 | else() |
| 21 | message(FATAL_ERROR "Archtecture ${arch} can't be targeted") |
| 22 | endif() |
| 23 | endmacro() |
| 24 | |
Alexander Potapenko | 4949674 | 2013-11-07 10:08:19 +0000 | [diff] [blame] | 25 | # Same as above, but adds universal osx library for either OSX or iOS simulator |
| 26 | # with name "<name>.<os>" targeting multiple architectures. |
| 27 | # add_compiler_rt_darwin_object_library(<name> <os> ARCH <architectures> |
| 28 | # SOURCES <source files> |
| 29 | # CFLAGS <compile flags> |
| 30 | # DEFS <compile definitions>) |
| 31 | macro(add_compiler_rt_darwin_object_library name os) |
Alexey Samsonov | 05fa380 | 2013-09-16 15:50:53 +0000 | [diff] [blame] | 32 | parse_arguments(LIB "ARCH;SOURCES;CFLAGS;DEFS" "" ${ARGN}) |
Alexander Potapenko | 4949674 | 2013-11-07 10:08:19 +0000 | [diff] [blame] | 33 | set(libname "${name}.${os}") |
Alexey Samsonov | 5162314 | 2013-01-20 14:36:12 +0000 | [diff] [blame] | 34 | add_library(${libname} OBJECT ${LIB_SOURCES}) |
Alexander Potapenko | 4949674 | 2013-11-07 10:08:19 +0000 | [diff] [blame] | 35 | set_target_compile_flags(${libname} ${LIB_CFLAGS} ${DARWIN_${os}_CFLAGS}) |
Alexey Samsonov | 2aad7c1 | 2013-01-21 08:12:20 +0000 | [diff] [blame] | 36 | set_target_properties(${libname} PROPERTIES OSX_ARCHITECTURES "${LIB_ARCH}") |
Alexey Samsonov | 05fa380 | 2013-09-16 15:50:53 +0000 | [diff] [blame] | 37 | set_property(TARGET ${libname} APPEND PROPERTY |
| 38 | COMPILE_DEFINITIONS ${LIB_DEFS}) |
Alexey Samsonov | 5162314 | 2013-01-20 14:36:12 +0000 | [diff] [blame] | 39 | endmacro() |
| 40 | |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 41 | # Adds static or shared runtime for a given architecture and puts it in the |
| 42 | # proper directory in the build and install trees. |
| 43 | # add_compiler_rt_runtime(<name> <arch> {STATIC,SHARED} |
| 44 | # SOURCES <source files> |
| 45 | # CFLAGS <compile flags> |
Evgeniy Stepanov | 4401473 | 2014-09-29 13:18:55 +0000 | [diff] [blame^] | 46 | # DEFS <compile definitions> |
| 47 | # OUTPUT_NAME <output library name>) |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 48 | macro(add_compiler_rt_runtime name arch type) |
Alexey Samsonov | e16af95 | 2013-01-20 13:58:10 +0000 | [diff] [blame] | 49 | if(CAN_TARGET_${arch}) |
Alexey Samsonov | d6535ea | 2014-04-01 13:16:30 +0000 | [diff] [blame] | 50 | parse_arguments(LIB "SOURCES;CFLAGS;DEFS;OUTPUT_NAME" "" ${ARGN}) |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 51 | add_library(${name} ${type} ${LIB_SOURCES}) |
Alexey Samsonov | e16af95 | 2013-01-20 13:58:10 +0000 | [diff] [blame] | 52 | # Setup compile flags and definitions. |
| 53 | set_target_compile_flags(${name} |
| 54 | ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 55 | set_target_link_flags(${name} |
| 56 | ${TARGET_${arch}_CFLAGS} ${LIB_CFLAGS}) |
Alexey Samsonov | e16af95 | 2013-01-20 13:58:10 +0000 | [diff] [blame] | 57 | set_property(TARGET ${name} APPEND PROPERTY |
| 58 | COMPILE_DEFINITIONS ${LIB_DEFS}) |
| 59 | # Setup correct output directory in the build tree. |
| 60 | set_target_properties(${name} PROPERTIES |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 61 | ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} |
| 62 | LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) |
Evgeniy Stepanov | 4401473 | 2014-09-29 13:18:55 +0000 | [diff] [blame^] | 63 | if ("${LIB_OUTPUT_NAME}" STREQUAL "") |
| 64 | set_target_properties(${name} PROPERTIES |
| 65 | OUTPUT_NAME ${name}${COMPILER_RT_OS_SUFFIX}) |
| 66 | else() |
Alexey Samsonov | d6535ea | 2014-04-01 13:16:30 +0000 | [diff] [blame] | 67 | set_target_properties(${name} PROPERTIES |
| 68 | OUTPUT_NAME ${LIB_OUTPUT_NAME}) |
| 69 | endif() |
Alexey Samsonov | e16af95 | 2013-01-20 13:58:10 +0000 | [diff] [blame] | 70 | # Add installation command. |
| 71 | install(TARGETS ${name} |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 72 | ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} |
| 73 | LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) |
Alexey Samsonov | e16af95 | 2013-01-20 13:58:10 +0000 | [diff] [blame] | 74 | else() |
| 75 | message(FATAL_ERROR "Archtecture ${arch} can't be targeted") |
| 76 | endif() |
| 77 | endmacro() |
| 78 | |
Alexey Samsonov | e18b785 | 2014-03-31 13:45:36 +0000 | [diff] [blame] | 79 | # Same as add_compiler_rt_runtime(... STATIC), but creates a universal library |
Alexey Samsonov | 2aad7c1 | 2013-01-21 08:12:20 +0000 | [diff] [blame] | 80 | # for several architectures. |
| 81 | # add_compiler_rt_osx_static_runtime(<name> ARCH <architectures> |
| 82 | # SOURCES <source files> |
| 83 | # CFLAGS <compile flags> |
| 84 | # DEFS <compile definitions>) |
| 85 | macro(add_compiler_rt_osx_static_runtime name) |
| 86 | parse_arguments(LIB "ARCH;SOURCES;CFLAGS;DEFS" "" ${ARGN}) |
| 87 | add_library(${name} STATIC ${LIB_SOURCES}) |
| 88 | set_target_compile_flags(${name} ${LIB_CFLAGS}) |
| 89 | set_property(TARGET ${name} APPEND PROPERTY |
| 90 | COMPILE_DEFINITIONS ${LIB_DEFS}) |
| 91 | set_target_properties(${name} PROPERTIES |
| 92 | OSX_ARCHITECTURES "${LIB_ARCH}" |
| 93 | ARCHIVE_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) |
| 94 | install(TARGETS ${name} |
| 95 | ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) |
| 96 | endmacro() |
| 97 | |
Alexander Potapenko | 4949674 | 2013-11-07 10:08:19 +0000 | [diff] [blame] | 98 | # Adds dynamic runtime library on osx/iossim, which supports multiple |
| 99 | # architectures. |
| 100 | # add_compiler_rt_darwin_dynamic_runtime(<name> <os> |
| 101 | # ARCH <architectures> |
| 102 | # SOURCES <source files> |
| 103 | # CFLAGS <compile flags> |
| 104 | # DEFS <compile definitions> |
| 105 | # LINKFLAGS <link flags>) |
| 106 | macro(add_compiler_rt_darwin_dynamic_runtime name os) |
Alexey Samsonov | 2aad7c1 | 2013-01-21 08:12:20 +0000 | [diff] [blame] | 107 | parse_arguments(LIB "ARCH;SOURCES;CFLAGS;DEFS;LINKFLAGS" "" ${ARGN}) |
| 108 | add_library(${name} SHARED ${LIB_SOURCES}) |
Alexander Potapenko | 4949674 | 2013-11-07 10:08:19 +0000 | [diff] [blame] | 109 | set_target_compile_flags(${name} ${LIB_CFLAGS} ${DARWIN_${os}_CFLAGS}) |
| 110 | set_target_link_flags(${name} ${LIB_LINKFLAGS} ${DARWIN_${os}_LINKFLAGS}) |
Alexey Samsonov | 2aad7c1 | 2013-01-21 08:12:20 +0000 | [diff] [blame] | 111 | set_property(TARGET ${name} APPEND PROPERTY |
| 112 | COMPILE_DEFINITIONS ${LIB_DEFS}) |
| 113 | set_target_properties(${name} PROPERTIES |
| 114 | OSX_ARCHITECTURES "${LIB_ARCH}" |
| 115 | LIBRARY_OUTPUT_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}) |
| 116 | install(TARGETS ${name} |
| 117 | LIBRARY DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) |
| 118 | endmacro() |
| 119 | |
Timur Iskhodzhanov | a73e9db | 2014-05-30 12:42:57 +0000 | [diff] [blame] | 120 | set(COMPILER_RT_TEST_CFLAGS) |
| 121 | |
Alexey Samsonov | 392c50d | 2013-01-18 16:05:21 +0000 | [diff] [blame] | 122 | # Unittests support. |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 123 | set(COMPILER_RT_GTEST_PATH ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest) |
Chandler Carruth | ace5350 | 2013-11-15 10:21:15 +0000 | [diff] [blame] | 124 | set(COMPILER_RT_GTEST_SOURCE ${COMPILER_RT_GTEST_PATH}/src/gtest-all.cc) |
Alexey Samsonov | 1e5d8be | 2014-03-24 13:29:20 +0000 | [diff] [blame] | 125 | set(COMPILER_RT_GTEST_CFLAGS |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 126 | -DGTEST_NO_LLVM_RAW_OSTREAM=1 |
Timur Iskhodzhanov | 402bcb5 | 2014-05-28 08:38:13 +0000 | [diff] [blame] | 127 | -DGTEST_HAS_RTTI=0 |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 128 | -I${COMPILER_RT_GTEST_PATH}/include |
Chandler Carruth | ace5350 | 2013-11-15 10:21:15 +0000 | [diff] [blame] | 129 | -I${COMPILER_RT_GTEST_PATH} |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 130 | ) |
| 131 | |
Timur Iskhodzhanov | 402bcb5 | 2014-05-28 08:38:13 +0000 | [diff] [blame] | 132 | if(MSVC) |
Timur Iskhodzhanov | a73e9db | 2014-05-30 12:42:57 +0000 | [diff] [blame] | 133 | # clang doesn't support exceptions on Windows yet. |
| 134 | list(APPEND COMPILER_RT_TEST_CFLAGS |
| 135 | -D_HAS_EXCEPTIONS=0) |
| 136 | |
| 137 | # We should teach clang to understand "#pragma intrinsic", see PR19898. |
| 138 | list(APPEND COMPILER_RT_TEST_CFLAGS -Wno-undefined-inline) |
| 139 | |
Timur Iskhodzhanov | 402bcb5 | 2014-05-28 08:38:13 +0000 | [diff] [blame] | 140 | # Clang doesn't support SEH on Windows yet. |
| 141 | list(APPEND COMPILER_RT_GTEST_CFLAGS -DGTEST_HAS_SEH=0) |
Timur Iskhodzhanov | a73e9db | 2014-05-30 12:42:57 +0000 | [diff] [blame] | 142 | |
| 143 | # gtest use a lot of stuff marked as deprecated on Windows. |
| 144 | list(APPEND COMPILER_RT_GTEST_CFLAGS -Wno-deprecated-declarations) |
Ehsan Akhgari | 1c4db80 | 2014-09-15 11:33:50 +0000 | [diff] [blame] | 145 | |
| 146 | # Visual Studio 2012 only supports up to 8 template parameters in |
| 147 | # std::tr1::tuple by default, but gtest requires 10 |
| 148 | if(MSVC_VERSION EQUAL 1700) |
Ehsan Akhgari | 494410f | 2014-09-25 20:42:49 +0000 | [diff] [blame] | 149 | list(APPEND COMPILER_RT_GTEST_CFLAGS -D_VARIADIC_MAX=10) |
Ehsan Akhgari | 1c4db80 | 2014-09-15 11:33:50 +0000 | [diff] [blame] | 150 | endif() |
Timur Iskhodzhanov | 402bcb5 | 2014-05-28 08:38:13 +0000 | [diff] [blame] | 151 | endif() |
| 152 | |
Alexey Samsonov | 17cf7c5 | 2014-02-19 13:01:03 +0000 | [diff] [blame] | 153 | # Link objects into a single executable with COMPILER_RT_TEST_COMPILER, |
| 154 | # using specified link flags. Make executable a part of provided |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 155 | # test_suite. |
| 156 | # add_compiler_rt_test(<test_suite> <test_name> |
| 157 | # OBJECTS <object files> |
| 158 | # DEPS <deps (e.g. runtime libs)> |
| 159 | # LINK_FLAGS <link flags>) |
| 160 | macro(add_compiler_rt_test test_suite test_name) |
| 161 | parse_arguments(TEST "OBJECTS;DEPS;LINK_FLAGS" "" ${ARGN}) |
Alexey Samsonov | f6acafc | 2013-01-28 07:16:22 +0000 | [diff] [blame] | 162 | set(output_bin "${CMAKE_CURRENT_BINARY_DIR}/${test_name}") |
Alexey Samsonov | 17cf7c5 | 2014-02-19 13:01:03 +0000 | [diff] [blame] | 163 | # Use host compiler in a standalone build, and just-built Clang otherwise. |
| 164 | if(NOT COMPILER_RT_STANDALONE_BUILD) |
| 165 | list(APPEND TEST_DEPS clang) |
| 166 | endif() |
Chandler Carruth | 272eef9 | 2014-05-15 16:33:58 +0000 | [diff] [blame] | 167 | # If we're not on MSVC, include the linker flags from CMAKE but override them |
| 168 | # with the provided link flags. This ensures that flags which are required to |
| 169 | # link programs at all are included, but the changes needed for the test |
| 170 | # trump. With MSVC we can't do that because CMake is set up to run link.exe |
| 171 | # when linking, not the compiler. Here, we hack it to use the compiler |
| 172 | # because we want to use -fsanitize flags. |
| 173 | if(NOT MSVC) |
| 174 | set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}") |
| 175 | separate_arguments(TEST_LINK_FLAGS) |
| 176 | endif() |
Alexey Samsonov | a74424e | 2013-01-28 09:07:30 +0000 | [diff] [blame] | 177 | add_custom_target(${test_name} |
Timur Iskhodzhanov | 7c70734 | 2014-05-12 08:55:20 +0000 | [diff] [blame] | 178 | COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} |
Timur Iskhodzhanov | 402bcb5 | 2014-05-28 08:38:13 +0000 | [diff] [blame] | 179 | -o "${output_bin}" |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 180 | ${TEST_LINK_FLAGS} |
Alexey Samsonov | 17cf7c5 | 2014-02-19 13:01:03 +0000 | [diff] [blame] | 181 | DEPENDS ${TEST_DEPS}) |
Alexey Samsonov | 02dcc63 | 2012-12-19 12:33:39 +0000 | [diff] [blame] | 182 | # Make the test suite depend on the binary. |
| 183 | add_dependencies(${test_suite} ${test_name}) |
| 184 | endmacro() |
Alexey Samsonov | c1caace | 2013-05-21 13:48:27 +0000 | [diff] [blame] | 185 | |
| 186 | macro(add_compiler_rt_resource_file target_name file_name) |
| 187 | set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}") |
Alexey Samsonov | a52e2dc | 2014-02-18 14:28:53 +0000 | [diff] [blame] | 188 | set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}") |
Alexey Samsonov | 41bf0bc | 2014-02-27 07:22:59 +0000 | [diff] [blame] | 189 | add_custom_command(OUTPUT ${dst_file} |
| 190 | DEPENDS ${src_file} |
Alexey Samsonov | c1caace | 2013-05-21 13:48:27 +0000 | [diff] [blame] | 191 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file} |
Alexey Samsonov | 41bf0bc | 2014-02-27 07:22:59 +0000 | [diff] [blame] | 192 | COMMENT "Copying ${file_name}...") |
| 193 | add_custom_target(${target_name} DEPENDS ${dst_file}) |
Alexey Samsonov | c1caace | 2013-05-21 13:48:27 +0000 | [diff] [blame] | 194 | # Install in Clang resource directory. |
Alexey Samsonov | a52e2dc | 2014-02-18 14:28:53 +0000 | [diff] [blame] | 195 | install(FILES ${file_name} DESTINATION ${COMPILER_RT_INSTALL_PATH}) |
Alexey Samsonov | c1caace | 2013-05-21 13:48:27 +0000 | [diff] [blame] | 196 | endmacro() |
Evgeniy Stepanov | 9514ed1 | 2014-02-27 08:41:40 +0000 | [diff] [blame] | 197 | |
| 198 | macro(add_compiler_rt_script name) |
| 199 | set(dst ${COMPILER_RT_EXEC_OUTPUT_DIR}/${name}) |
| 200 | set(src ${CMAKE_CURRENT_SOURCE_DIR}/${name}) |
| 201 | add_custom_command(OUTPUT ${dst} |
| 202 | DEPENDS ${src} |
| 203 | COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} |
| 204 | COMMENT "Copying ${name}...") |
| 205 | add_custom_target(${name} DEPENDS ${dst}) |
| 206 | install(FILES ${dst} |
| 207 | PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE |
| 208 | DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin) |
| 209 | endmacro(add_compiler_rt_script src name) |
Alexey Samsonov | 2e8e441 | 2014-05-09 22:11:03 +0000 | [diff] [blame] | 210 | |
| 211 | # Builds custom version of libc++ and installs it in <prefix>. |
| 212 | # Can be used to build sanitized versions of libc++ for running unit tests. |
| 213 | # add_custom_libcxx(<name> <prefix> |
| 214 | # DEPS <list of build deps> |
| 215 | # CFLAGS <list of compile flags>) |
| 216 | macro(add_custom_libcxx name prefix) |
| 217 | if(NOT COMPILER_RT_HAS_LIBCXX_SOURCES) |
| 218 | message(FATAL_ERROR "libcxx not found!") |
| 219 | endif() |
| 220 | |
| 221 | parse_arguments(LIBCXX "DEPS;CFLAGS" "" ${ARGN}) |
| 222 | foreach(flag ${LIBCXX_CFLAGS}) |
| 223 | set(flagstr "${flagstr} ${flag}") |
| 224 | endforeach() |
| 225 | set(LIBCXX_CFLAGS ${flagstr}) |
| 226 | |
| 227 | if(NOT COMPILER_RT_STANDALONE_BUILD) |
| 228 | list(APPEND LIBCXX_DEPS clang) |
| 229 | endif() |
| 230 | |
| 231 | ExternalProject_Add(${name} |
| 232 | PREFIX ${prefix} |
| 233 | SOURCE_DIR ${COMPILER_RT_LIBCXX_PATH} |
| 234 | CMAKE_ARGS -DCMAKE_C_COMPILER=${COMPILER_RT_TEST_COMPILER} |
| 235 | -DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_COMPILER} |
| 236 | -DCMAKE_C_FLAGS=${LIBCXX_CFLAGS} |
| 237 | -DCMAKE_CXX_FLAGS=${LIBCXX_CFLAGS} |
| 238 | -DCMAKE_BUILD_TYPE=Release |
| 239 | -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> |
Alexey Samsonov | 19de1ba | 2014-05-12 21:07:28 +0000 | [diff] [blame] | 240 | LOG_BUILD 1 |
| 241 | LOG_CONFIGURE 1 |
| 242 | LOG_INSTALL 1 |
Alexey Samsonov | 2e8e441 | 2014-05-09 22:11:03 +0000 | [diff] [blame] | 243 | ) |
| 244 | |
| 245 | ExternalProject_Add_Step(${name} force-reconfigure |
| 246 | DEPENDERS configure |
| 247 | ALWAYS 1 |
| 248 | ) |
| 249 | |
| 250 | ExternalProject_Add_Step(${name} clobber |
| 251 | COMMAND ${CMAKE_COMMAND} -E remove_directory <BINARY_DIR> |
| 252 | COMMAND ${CMAKE_COMMAND} -E make_directory <BINARY_DIR> |
| 253 | COMMENT "Clobberring ${name} build directory..." |
| 254 | DEPENDERS configure |
| 255 | DEPENDS ${LIBCXX_DEPS} |
| 256 | ) |
| 257 | endmacro() |