View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014366CMakeCMakepublic2013-08-19 06:352014-07-24 13:46
ReporterStephen Kelly 
Assigned ToStephen Kelly 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.12 
Target VersionFixed in VersionCMake 3.0 
Summary0014366: 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}")

TagsNo tags attached.
Attached Files

 Relationships
has duplicate 0014294closedBrad King Specifying CMAKE_CXX_COMPILER=g++ after first run deletes all cached values 

  Notes
(0033732)
David Cole (manager)
2013-08-19 07:37

Have you tried using -D along with the full path to the compiler?

(instead of just "gcc"...)
(0033733)
Stephen Kelly (developer)
2013-08-19 08:04

Yes, that works.
(0033734)
Stephen Kelly (developer)
2013-08-19 08:36

I added 8b2a2db to next to fix this.
(0036070)
Robert Maynard (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-08-19 06:35 Stephen Kelly New Issue
2013-08-19 07:37 David Cole Note Added: 0033732
2013-08-19 08:04 Stephen Kelly Note Added: 0033733
2013-08-19 08:36 Stephen Kelly Note Added: 0033734
2014-01-07 09:22 Stephen Kelly Status new => resolved
2014-01-07 09:22 Stephen Kelly Fixed in Version => CMake 3.0
2014-01-07 09:22 Stephen Kelly Resolution open => fixed
2014-01-07 09:22 Stephen Kelly Assigned To => Stephen Kelly
2014-06-02 08:37 Robert Maynard Note Added: 0036070
2014-06-02 08:37 Robert Maynard Status resolved => closed
2014-07-24 13:46 Brad King Relationship added has duplicate 0014294


Copyright © 2000 - 2018 MantisBT Team