Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake warning with v3.30 and later #190

Open
danielpieczko opened this issue Oct 14, 2024 · 1 comment
Open

CMake warning with v3.30 and later #190

danielpieczko opened this issue Oct 14, 2024 · 1 comment

Comments

@danielpieczko
Copy link
Collaborator

danielpieczko commented Oct 14, 2024

If using CMake v3.30 or later, a warning is printed when running for an XCommon CMake application:

$> cmake -B build -G "Unix Makefiles"
CMake Warning (dev) at /<xtc-path>/15.3.0/XMOS/XTC/15.3.0/build/xcommon_cmake/xcommon.cmake:34 (enable_language):
  project() should be called prior to this enable_language() call.
Call Stack (most recent call first):
  CMakeLists.txt:2 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is Clang 3.6.0
-- The C compiler identification is Clang 3.6.0
-- The ASM compiler identification is XCC
...
@danielpieczko
Copy link
Collaborator Author

This warning can be suppressed by putting the following inside xcommon.cmake before the enable_language() call:

if(POLICY CMP0165)
    cmake_policy(SET CMP0165 OLD)
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant