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

Enable full compilation and linking #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

nvelozsavino
Copy link

This will allow to open each project CMakeLists.txt and be able to compile and link as the makefile does

@dansheme
Copy link
Member

dansheme commented Nov 9, 2017

Sorry for taking a while to respond, I will be more responsive from now on.
I tried but it is not working for me, I get the following output when CLion is loading the CMake project:

/Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/dansheme/Downloads/nRF5_SDK_14.1.0_1dda907
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at /Applications/CLion.app/Contents/bin/cmake/share/cmake-3.8/Modules/CMakeForceCompiler.cmake:69 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  examples/peripheral/blinky/pca10040/blank/armgcc/CMakeLists.txt:53 (CMAKE_FORCE_C_COMPILER)


CMake Deprecation Warning at /Applications/CLion.app/Contents/bin/cmake/share/cmake-3.8/Modules/CMakeForceCompiler.cmake:83 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  examples/peripheral/blinky/pca10040/blank/armgcc/CMakeLists.txt:54 (CMAKE_FORCE_CXX_COMPILER)

And then it prints the following over and over again in an endless loop:

-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-arm-none-eabi-6-2017-q2-update//bin/arm-none-eabi-gcc
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CMAKE_CXX_COMPILER= /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at /Applications/CLion.app/Contents/bin/cmake/share/cmake-3.8/Modules/CMakeForceCompiler.cmake:69 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  examples/peripheral/blinky/pca10040/blank/armgcc/CMakeLists.txt:53 (CMAKE_FORCE_C_COMPILER)


CMake Deprecation Warning at /Applications/CLion.app/Contents/bin/cmake/share/cmake-3.8/Modules/CMakeForceCompiler.cmake:83 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  examples/peripheral/blinky/pca10040/blank/armgcc/CMakeLists.txt:54 (CMAKE_FORCE_CXX_COMPILER)

Might be because I'm working on a Mac. What system are you on?

@nvelozsavino
Copy link
Author

nvelozsavino commented Nov 9, 2017 via email

@nvelozsavino
Copy link
Author

I commited new changes, it should work now, at least on Linux is working

@dansheme
Copy link
Member

I tried both on Linux and MacOS but there are two issues.

  1. When running from the SDK directory, while the script is in a different directory:
Creating CMakeLists.txt for 
./examples/ant/ant_multi_channels/tx/pca10040/s212/armgcc/Makefile
../../nrf5-sdk-clion/nrf5-sdk-to-clion.sh: line 4: ./nrf5-make2cmake.sh: No such file or directory
  1. When copying the script to the SDK directory and running from there:
Creating CMakeLists.txt for ./examples/ant/ant_multi_channels/tx/pca10040/s212/armgcc/Makefile
Creating CMakeLists.txt for ./examples/ant/ant_multi_channels/tx/pca10040/s212/armgcc/Makefile
make: CMakeLists-generator.mk: No such file or directory
make: *** No rule to make target 'CMakeLists-generator.mk'.  Stop.

And so on for every example in the SDK

nrf5-sdk-to-clion goes back to be an independent script
@nvelozsavino
Copy link
Author

I updated the files to fix the problem with the CMakeLists-generator.mk generated file, and I merge the content of the nrf5-make2cmake.sh into nrf5-sdk-to-clion.sh, now it's independent again

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

Successfully merging this pull request may close these issues.

2 participants