MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014841 | CMake | CMake | public | 2014-03-26 09:57 | 2014-10-06 10:33 |
Reporter | wim van loocke | ||||
Assigned To | |||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | mint 16 | OS | linux | OS Version | Linux-3.11.0-12- |
Product Version | CMake 2.8.12.2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014841: setting CMAKE_C_COMPILER to gcc creates endless loops | ||||
Description | Create 2 projects cmake_minimum_required(VERSION 2.8.11) project(pro1 ) #adding crosscompiler stuff SET( CMAKE_C_COMPILER ${COMPILER_PATH}${CROSS_COMPILE}gcc ) message("CMAKE_C_COMPILER ${CMAKE_C_COMPILER} " ) SET( CMAKE_CXX_COMPILER ${COMPILER_PATH}${CROSS_COMPILE}g++ ) message("CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER} " ) add_subdirectory(pro2) cmake_minimum_required(VERSION 2.8.4) project(pro2 ) message( STATUS "CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}" ) message( STATUS "CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}" ) | ||||
Steps To Reproduce | just run cmake . and you will see endless loop CMAKE_C_COMPILER gcc CMAKE_CXX_COMPILER g++ -- CMAKE_C_COMPILER = /usr/bin/gcc -- CMAKE_CXX_COMPILER = /usr/bin/g++ -- 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= /usr/bin/cc -- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMAKE_C_COMPILER gcc CMAKE_CXX_COMPILER g++ -- CMAKE_C_COMPILER = /usr/bin/gcc -- CMAKE_CXX_COMPILER = /usr/bin/g++ -- 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= /usr/bin/cc CMAKE_CXX_COMPILER= /usr/bin/c++ -- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info | ||||
Additional Information | I suppose that at the top level project you can define the compiler for all subprojects. I also found out that when SET( CMAKE_C_COMPILER .. ) is done after the add_subdirectory(pro2), there is no endless loop, but i have to redefine CMAKE_C_COMPILER in the CMakeLists.txt of the pro2 | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://public.kitware.com/Bug/file/5105/CMakeLists.txt | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-03-26 09:57 | wim van loocke | New Issue | |||
2014-03-26 09:57 | wim van loocke | File Added: CMakeLists.txt | |||
2014-03-26 10:17 | Rolf Eike Beer | Note Added: 0035526 | |||
2014-03-26 10:45 | Brad King | Note Added: 0035527 | |||
2014-03-26 10:45 | Brad King | Status | new => resolved | ||
2014-03-26 10:45 | Brad King | Resolution | open => no change required | ||
2014-10-06 10:33 | Robert Maynard | Note Added: 0036956 | |||
2014-10-06 10:33 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|