MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0015829 | CMake | Modules | public | 2015-11-03 06:12 | 2016-06-10 14:31 |
| Reporter | Julien Bigot | ||||
| Assigned To | Kitware Robot | ||||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | moved | ||
| Platform | OS | Debian | OS Version | unstable | |
| Product Version | CMake 3.3.2 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0015829: GenerateExportHeaders does not work for C | ||||
| Description | This is a duplicate of issue 0012959 that has been closed as fixed but is not. The module GenerateExportHeader creates some defines that work for C but it require C++ to be enabled in order to be used. Indeed, the macro check_cxx_compiler_flag is used in many places. That means you can't use project(name C). A fix for this is proposed in comment 0035809 of issue 0014456 | ||||
| Steps To Reproduce | This example will not works: project(mylib C) include(GenerateExportHeader) add_compiler_export_flags() add_library(mylib mylib.c) generate_export_header(mylib) [...] -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY CMake Error at /usr/share/cmake-3.3/Modules/CheckCXXSourceCompiles.cmake:76 (try_compile): Unknown extension ".cxx" for file /[...]/CMakeFiles/CMakeTmp/src.cxx try_compile() works only for enabled languages. Currently these are: C See project() command to enable other languages. Call Stack (most recent call first): /usr/share/cmake-3.3/Modules/CheckCXXCompilerFlag.cmake:50 (CHECK_CXX_SOURCE_COMPILES) /usr/share/cmake-3.3/Modules/GenerateExportHeader.cmake:223 (check_cxx_compiler_flag) /usr/share/cmake-3.3/Modules/GenerateExportHeader.cmake:371 (_test_compiler_hidden_visibility) CMakeLists.txt:6 (generate_export_header) [...] | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2015-11-03 06:12 | Julien Bigot | New Issue | |||
| 2016-06-10 14:29 | Kitware Robot | Note Added: 0042878 | |||
| 2016-06-10 14:29 | Kitware Robot | Status | new => resolved | ||
| 2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||