View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013551CMakeDocumentationpublic2012-09-20 08:382016-06-10 14:31
ReporterSylwester Arabas 
Assigned ToKitware Robot 
PrioritynormalSeveritytextReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0013551: CMAKE_COMPILER_IS_GNUCXX: mention in the documentation when it starts to be available
DescriptionApparently this variable may only be used after the project() command in CMakeLists.txt... perhaps that's quite obvious but still mentioning it in the docs (e.g. just before the list of "Variables for Languages") might save someone some time. Example below.

HTH,
Sylwester
Steps To Reproduce$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)

if(CMAKE_COMPILER_IS_GNUCXX)
  message("compiler detected as: GNU compiler")
else()
  message("compiler detected as: non-GNU compiler")
endif()

project(test CXX)

execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "--version" COMMAND "head" "-1" OUTPUT_VARIABLE CXX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
message("compiler: ${CMAKE_CXX_COMPILER}")
message("version: ${CXX_VERSION}")


$ cmake .
compiler detected as: non-GNU compiler
-- The CXX compiler identification is GNU 4.7.1
-- 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
compiler: /usr/bin/c++
version: c++ (Debian 4.7.1-6) 4.7.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/slayoo/Temp/test
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042123)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-09-20 08:38 Sylwester Arabas New Issue
2016-06-10 14:28 Kitware Robot Note Added: 0042123
2016-06-10 14:28 Kitware Robot Status new => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team