summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenACC.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindOpenACC.cmake')
-rw-r--r--Modules/FindOpenACC.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindOpenACC.cmake b/Modules/FindOpenACC.cmake
index 71bd84f..e05d0c6 100644
--- a/Modules/FindOpenACC.cmake
+++ b/Modules/FindOpenACC.cmake
@@ -187,7 +187,7 @@ function(_OPENACC_GET_FLAGS LANG FLAG_VAR)
_OPENACC_WRITE_SOURCE_FILE("${LANG}" "TEST_SOURCE" OpenACCTryFlag _OPENACC_TEST_SRC)
foreach(FLAG IN LISTS FLAG_CANDIDATES)
- try_compile(OpenACC_FLAG_TEST_RESULT ${CMAKE_BINARY_DIR} ${_OPENACC_TEST_SRC}
+ try_compile(OpenACC_FLAG_TEST_RESULT SOURCES ${_OPENACC_TEST_SRC}
CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${FLAG}"
OUTPUT_VARIABLE OpenACC_TRY_COMPILE_OUTPUT
)
@@ -215,7 +215,7 @@ function(_OPENACC_GET_SPEC_DATE LANG SPEC_DATE)
_OPENACC_WRITE_SOURCE_FILE("${LANG}" "CHECK_VERSION_SOURCE" OpenACCCheckVersion _OPENACC_TEST_SRC)
set(BIN_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/FindOpenACC/accver_${LANG}.bin")
- try_compile(OpenACC_SPECTEST_${LANG} "${CMAKE_BINARY_DIR}" "${_OPENACC_TEST_SRC}"
+ try_compile(OpenACC_SPECTEST_${LANG} SOURCES "${_OPENACC_TEST_SRC}"
CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${OpenACC_${LANG}_FLAGS}"
COPY_FILE ${BIN_FILE}
OUTPUT_VARIABLE OUTPUT)