Skip to content

Commit

Permalink
Add CMake include_guard() for cmake toolchain (#8728)
Browse files Browse the repository at this point in the history
* #8639 Add CMake include_guard() for cmake toolchain

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Use include_guard only for cmake toolchain

Co-authored-by: James <james@conan.io>

Co-authored-by: James <james@conan.io>
  • Loading branch information
uilianries and memsharded committed Mar 29, 2021
1 parent ea15adb commit 4619476
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions conan/tools/cmake/base.py
Expand Up @@ -71,10 +71,8 @@ class CMakeToolchainBase(object):
# Avoid including toolchain file several times (bad if appending to variables like
# CMAKE_CXX_FLAGS. See https://github.com/android/ndk/issues/323
if(CONAN_TOOLCHAIN_INCLUDED)
return()
endif()
set(CONAN_TOOLCHAIN_INCLUDED TRUE)
include_guard()
{% block before_try_compile %}
{# build_type (Release, Debug, etc) is only defined for single-config generators #}
Expand Down

0 comments on commit 4619476

Please sign in to comment.