[cmake-developers] [CMake 0014366]: Command line definitions ignored if -DCMAKE_C_COMPILER is passed

Mantis Bug Tracker mantis at public.kitware.com
Mon Aug 19 06:35:39 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14366 
====================================================================== 
Reported By:                Stephen Kelly
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14366
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-08-19 06:35 EDT
Last Modified:              2013-08-19 06:35 EDT
====================================================================== 
Summary:                    Command line definitions ignored if
-DCMAKE_C_COMPILER is passed
Description: 

In the Qt 5 unit tests, we pass the compilers at each test run to workaround
broken configuration in the CI system:

 https://bugreports.qt-project.org/browse/QTQAINFRA-609

However, this means that at each invocation after the first, command line
content is not processed:

$ cmake .. -DTESTVAR=True -DCMAKE_C_COMPILER=gcc
TESTVAR = True
-- 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= gcc

-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/lib/icecc/bin/gcc
-- Check for working C compiler: /usr/lib/icecc/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/icecc/bin/c++
-- Check for working CXX compiler: /usr/lib/icecc/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
TESTVAR = 
-- Configuring done
-- Generating done
-- Build files have been written to:
/home/stephen/dev/src/playground/cmake/build

CMakeLists.txt:

message("TESTVAR = ${TESTVAR}")


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-08-19 06:35 Stephen Kelly  New Issue                                    
======================================================================




More information about the cmake-developers mailing list