View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015913CMakeCMakepublic2016-01-12 16:292016-06-10 14:21
ReporterGregory M. Baumgardner 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformCYGWIN-2.3.1(0.291/5/3)OSWindows OS Version7
Product VersionCMake 3.3.2 
Target VersionFixed in Version 
Summary0015913: CMAKE_SYSTEM_NAME is not being set on cmake 3.3.2 Cygwin
DescriptionI installed cmake 3.3.2 directly from the Cygwin distribution, but for some reason I cannot get the if(CYGWIN) to work properly. It is probably related to the fact that the the CMAKE_SYSTEM_NAME is not being set. I have confirmed this with a quick test, but have no idea what is wrong or why I cannot detect Cygwin. The --system-information shows that the CMAKE_SYSTEM_NAME=CYGWIN, but it is not being set the same when I run cmake against my CMakeLists.txt file. It would be nice to have this feature worked as advertised.
Steps To ReproduceRun "cmake ." using supplied CMakeLists.txt file. Output is:

-- Hello World
-- Cygwin is and CMAKE_COMPILER_IS_CYGWIN = and CMAKE_SYSTEM_NAME =

I expected that it should read:

-- Hello World
-- Cygwin is 1 and CMAKE_COMPILER_IS_CYGWIN = 1 and CMAKE_SYSTEM_NAME = CYGWIN
Additional InformationAvoid ctest truncation of output: CTEST_FULL_OUTPUT
========================================================
=== MAIN VARIABLES
========================================================
CMAKE_STATIC_LIBRARY_PREFIX == "lib"
CMAKE_STATIC_LIBRARY_SUFFIX == ".a"
CMAKE_SHARED_LIBRARY_PREFIX == "cyg"
CMAKE_SHARED_LIBRARY_SUFFIX == ".dll"
CMAKE_SHARED_MODULE_PREFIX == "cyg"
CMAKE_SHARED_MODULE_SUFFIX == ".dll"


CMAKE_DL_LIBS == "dl"
CMAKE_LIBRARY_PATH_FLAG == "-L"
CMAKE_LINK_LIBRARY_FLAG == "-l"
CMAKE_SKIP_RPATH == "NO"
CMAKE_SYSTEM_INFO_FILE == "Platform/CYGWIN"
CMAKE_SYSTEM_NAME == "CYGWIN"
CMAKE_SYSTEM == "CYGWIN-2.3.1(0.291/5/3)"
CMAKE_CXX_COMPILER == "/usr/bin/c++.exe"
CMAKE_C_COMPILER == "/usr/bin/cc"
CMAKE_COMPILER_IS_GNUCC == "1"
CMAKE_COMPILER_IS_GNUCXX == "1"

....
CMAKE_COMPILER_IS_CYGWIN "1"
CYGWIN "1"

TagsNo tags attached.
Attached Filestxt file icon CMakeLists.txt [^] (244 bytes) 2016-01-12 16:29 [Show Content]

 Relationships

  Notes
(0040212)
Nils Gladitz (developer)
2016-01-12 17:43

Try moving your project() call before message().

project() is what initializes platform and compiler information.
(0040215)
Gregory M. Baumgardner (reporter)
2016-01-13 08:52

Ok. I was unaware of that. It makes sense now. This issue can be closed.
(0041292)
Kitware Robot (administrator)
2016-06-10 14:21

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
2016-01-12 16:29 Gregory M. Baumgardner New Issue
2016-01-12 16:29 Gregory M. Baumgardner File Added: CMakeLists.txt
2016-01-12 17:43 Nils Gladitz Note Added: 0040212
2016-01-13 08:52 Gregory M. Baumgardner Note Added: 0040215
2016-01-13 09:13 Brad King Status new => resolved
2016-01-13 09:13 Brad King Resolution open => no change required
2016-06-10 14:21 Kitware Robot Note Added: 0041292
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team