cmake: test is a reserved keyword

This commit is contained in:
selsta 2021-07-15 09:30:32 +02:00
parent de3456e127
commit 4414ed401d
No known key found for this signature in database
GPG Key ID: 2EA0A99A8B07AE5E

View File

@ -50,7 +50,7 @@ option (CCACHE "")
file(WRITE "${CMAKE_SOURCE_DIR}/test.cpp" "int main() { return 0; }")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE}")
add_executable(test test.cpp)
add_executable(main test.cpp)
]=])
try_compile(RET "${TEST_PROJECT}/build" "${TEST_PROJECT}" "test" CMAKE_FLAGS -DCCACHE="${CCACHE_FOUND}")
unset(TEST_PROJECT)