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 c compiler not set #6

Closed
Sam1370 opened this issue Jul 31, 2019 · 3 comments
Closed

Cmake c compiler not set #6

Sam1370 opened this issue Jul 31, 2019 · 3 comments

Comments

@Sam1370
Copy link

Sam1370 commented Jul 31, 2019

I have this error although I have the xcode command lines tool installed:

CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
  The OLD behavior for policy CMP0046 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


CMake Warning at /usr/local/Cellar/cmake/3.15.1/share/cmake/Modules/Platform/Darwin-Initialize.cmake:131 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.15.1/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
  CMakeLists.txt:34 (project)


CMake Error at /usr/local/Cellar/cmake/3.15.1/share/cmake/Modules/CMakeDetermineCCompiler.cmake:49 (message):
  Could not find compiler set in environment variable CC:

  
  /Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc.
Call Stack (most recent call first):
  CMakeLists.txt:34 (project)


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
@haxpor
Copy link
Owner

haxpor commented Jul 31, 2019

Seem like it cannot find macOS sdk directory. Could you please make sure it's there /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk?

And what is the result from executing this xcode-select -p on your terminal?

@Sam1370
Copy link
Author

Sam1370 commented Jul 31, 2019

Solved, I changed the variables at the beginning to match my system

POSTFIXPATH_SDKROOT=/SDKs/MacOSX10.14.sdk
CCPATH_TOOLCHAIN=/usr/bin/cc
CXXPATH_TOOLCHAIN=/usr/bin/c++

@Sam1370 Sam1370 closed this as completed Jul 31, 2019
@Sam1370
Copy link
Author

Sam1370 commented Jul 31, 2019

@haxpor thanks for your help

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

2 participants