summaryrefslogtreecommitdiffstats
path: root/Modules/TestCXXAcceptsFlag.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/TestCXXAcceptsFlag.cmake')
-rw-r--r--Modules/TestCXXAcceptsFlag.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake
index ce505f3..2e511ae 100644
--- a/Modules/TestCXXAcceptsFlag.cmake
+++ b/Modules/TestCXXAcceptsFlag.cmake
@@ -25,8 +25,7 @@ macro(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
if(NOT DEFINED ${VARIABLE})
message(CHECK_START "Checking to see if CXX compiler accepts flag ${FLAGS}")
try_compile(${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx
+ SOURCES ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS}
OUTPUT_VARIABLE OUTPUT)
if(${VARIABLE})