Permalink
Browse files

CMake 2.8.0 compatibility.

  • Loading branch information...
1 parent d6c2c83 commit 3fc9a0faa39eea07e1c2a53d8376b52ed47ea946 @klickverbot klickverbot committed Dec 11, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −0 cmake/Modules/FindLLVM.cmake
  2. +1 −2 tests/d2/CMakeLists.txt
@@ -110,6 +110,12 @@ string(REGEX REPLACE "[0-9]+\\.([0-9]+).*[A-Za-z]*" "\\1" LLVM_VERSION_MINOR "${
# Use the default CMake facilities for handling QUIET/REQUIRED.
include(FindPackageHandleStandardArgs)
+
+if(${CMAKE_VERSION} VERSION_LESS "2.8.4")
+ # The VERSION_VAR argument is not supported on pre-2.8.4, work around this.
+ set(VERSION_VAR dummy)
+endif()
+
find_package_handle_standard_args(LLVM
REQUIRED_VARS LLVM_ROOT_DIR LLVM_HOST_TARGET
VERSION_VAR LLVM_VERSION_STRING)
View
@@ -19,8 +19,7 @@ function(add_testsuite config_name dflags)
# testsuite build system provides no way to run the test cases with a
# given set of flags without trying all combinations of them.
add_test(NAME ${name}
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite
- COMMAND ${CMAKE_MAKE_PROGRAM} RESULTS_DIR=${outdir} DMD=${ldmd_path} DFLAGS=${dflags} MODEL=${model} quick
+ COMMAND ${CMAKE_MAKE_PROGRAM} -C ${PROJECT_SOURCE_DIR}/tests/d2/dmd-testsuite RESULTS_DIR=${outdir} DMD=${ldmd_path} DFLAGS=${dflags} MODEL=${model} quick
)
set_tests_properties(${name} PROPERTIES DEPENDS ${name}_clean)
endfunction()

0 comments on commit 3fc9a0f

Please sign in to comment.