Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/intgemm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Chudyk <mateuszchudyk@gmail.com>2019-07-15 21:30:29 +0300
committerGitHub <noreply@github.com>2019-07-15 21:30:29 +0300
commitd02f3ce07214122f1f36f2fdd0379db8a9abd409 (patch)
treeb982f29bda9261fa02c67bb23e644633ce89dceb
parentfd8594e8be250d4b427d8c138a5c17d6f2991767 (diff)
parent8b9b24cb4c637d3cda32f73254640d164781029f (diff)
Merge pull request #26 from kpu/cmake
Use CMAKE_CURRENT_XXX_DIR instead of CMAKE_XXX_DIR
-rw-r--r--CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 099b182..ff4048e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,9 @@ endif()
set(CMAKE_CXX_STANDARD 11)
# Check if compiler supports AVX512
-try_compile(INTGEMM_COMPILER_SUPPORTS_AVX512 "${CMAKE_BINARY_DIR}/compile_tests" "${CMAKE_SOURCE_DIR}/compile_test_avx512.cc"
+try_compile(INTGEMM_COMPILER_SUPPORTS_AVX512
+ ${CMAKE_CURRENT_BINARY_DIR}/compile_tests
+ ${CMAKE_CURRENT_SOURCE_DIR}/compile_test_avx512.cc
#Hack: pass compiler arguments as definitions because the test code overrides CXX_FLAGS :'(
COMPILE_DEFINITIONS -mavx512f -mavx512bw -mavx512dq)
@@ -27,10 +29,10 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
endif()
# Generate configure file
-configure_file(config.h.in config.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-include_directories(${CMAKE_SOURCE_DIR})
-include_directories(${CMAKE_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
foreach(exe example benchmark)
add_executable(${exe} ${exe}.cc intgemm.cc)
@@ -60,6 +62,6 @@ add_executable(tests
)
#CTest integration with Catch2
-include(CMake/Catch.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Catch.cmake)
include(CTest)
catch_discover_tests(tests)